just tested, yes. The right and left pointing buttons will have a flat angle.My buttons are 100x100 pixels. Will your app work with that size?
Presently fontsize up to 22, could be more if desired.
Kind regards
Bernd
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
just tested, yes. The right and left pointing buttons will have a flat angle.My buttons are 100x100 pixels. Will your app work with that size?
Code: Select all
set the showFocusborder of button "shuffle" to false
Code: Select all
send "solvePuzzle gWidthPadding, gHeightPadding" to me in 10 milliseconds
Code: Select all
solvePuzzle gWidthPadding, gHeightPadding
Code: Select all
send "displayBotButtons tParameter" to me in 10 milliseconds
Code: Select all
displayBotButtons tParameter
Code: Select all
if "displayBotButtons" is not in the pendingMessages then
when you use send in time like in the first version the handler (in this case the mouseUp handler) finishes first and then send the solvePuzzle comman. This means no pending handler because in the second version 'solvePuzzle' starts right when it is issued and after it is finished it will return to the issueing hander-> the mouseUp handler.Why did you use this form on the shuffle button
CODE: SELECT ALL
send "solvePuzzle gWidthPadding, gHeightPadding" to me in 10 milliseconds
rather than
CODE: SELECT ALL
solvePuzzle gWidthPadding, gHeightPadding
The same reason as above. When displayBotButtons is called from the solvePuzzle handler the solvePuzzle handler has finished and has prepared a list of moves to solve the puzzle for the bot. No more calculations necessary. So now I call a handler displayBotButtons with a send in time message to finish the solvePuzzle handler. No pending solvePuzzle handler. Now you have a handler displayBotButtons that you can slow down or speed up at will. That was what you wanted in the first place. In parallel the human can solve his puzzle withouth interfering with the bots moves of the puzzle pieces.Likewise in the "solvePuzzle" handler. Why this:
CODE: SELECT ALL
send "displayBotButtons tParameter" to me in 10 milliseconds
and not this:
CODE: SELECT ALL
displayBotButtons tParameter
depending on how much is going on at the same time Livecode can not always deliver at the specified time. Suppose some calculation is going on because the human player just made a move. The 'displayBotButtons' will fire when all the running handlers are finished. In this paricular case it may not be necessary but it has become a habit to avoid two messages running the same handler. The easiest scenario is to think of a button that sends a message in say 10 seconds. The user hits the button before the 10 seconds are over. Now you have two messages running that will reach the handler after 10 seconds effectively doubling the times the handler is executed. When testing for the pendingmessages it will avoid that scenario.Why in the "displayBotButtons" handler, is this necessary?
CODE: SELECT ALL
if "displayBotButtons" is not in the pendingMessages then
just add the seconds to a variable and display the seconds mod 60 to get the seconds and the seconds div 60 to get the minutes.Finally, how do I change my timers such that beginning with 60 seconds, it will display the elapsed time as minutes:seconds?
THANK YOU! THANK YOU! Your stack is exactly what I needed to make my app's buttons look iOS-correct and consistent.bn wrote:{snip}For the standard iOS buttons I made a stack that produces images for buttons à la iOS.
http://www.berndniggemann.on-rev.com/bt ... vecode.zip
Kind regards
Bernd