Yay. Sounds like solid logic. I'll try it out On Wed, Jan 6, 2010 at 9:03 PM, Apache User <dhapache@xxxxxxxxxxxxxxxxxxx>wrote: > User:atrix256 > > Message: Hey Kent here's your feature request about being able to hold down > a button. > > UI_AddButton has a new optional parameter at the end. Pass it a function > name and it will call that as soon as a button press starts. When the > regular click function fires, that means they aren't pressing the button > anymore. > > There's an example in the lavamap. When you start clicking the settings > button it teleports the image to 0,0 and when you let go it makes the button > and image go away. > > My idea on how to do your betting thing... > > #1 - when the "begin press" function is called for your increase bet > button, set a variable IsIncreasingBet from 0 to 1. Call a function called > like "IncreaseBet" > #2 - in the "IncreaseBet" function, check if IsIncreasingBet is 1. If it > is, then increase the bet and do a CallDelayed to IncreaseBet in some amount > of time (maybe 250 milisconds?) > #3 - when the "button press" function is called for your increase bet > button, set the variable IsIncreasingBet to 0 and next time IncreaseBet gets > called, it won't increase the bet, and it wont do a CallDelayed so it cleans > itself up. > > Let me know if you have any questions or if this guy doesn't work for you > right or something (: > > Putting text on the screen feature coming next > > <Files Changed> > U ARRelease.exe > U AR_LuaFuncs.cpp > U AR_UI.cpp > U AR_UI.h > U Docs/Script Help/UI_AddButton.html > U READMETODO.txt > U Scripts/Personal/Alan/ShaderLand.lua > U Scripts/Personal/Alan/lavamap.lua > > >