Ok,
Now you can add autorepeating buttons to your skins/scripts as easy as pie, with this library.
It's dead simple to use, all you have to do is this:
Download Here
Included also in this is an example script, shows it being used in a nokia-like volume up/down toggle.
Enjoy!
Will
[edit: updated download location]
Now you can add autorepeating buttons to your skins/scripts as easy as pie, with this library.
It's dead simple to use, all you have to do is this:
You can use it with as many buttons as you like, just add them as you'd expect. Can't say fairer than that can I?code:
#include "../../../lib/std.mi"
#include "../../../lib/AutoRepeatButton.m"
Global AutoRepeatButton MyButton;
System.OnScriptLoaded() {
AutoRepeat_Load();
MyButton = getContainer("MyContainer").getLayout("MyLayout").getObject("MyButton");
}
System.OnScriptUnloading() {
AutoRepeat_Unload();
}
MyButton.OnLeftClick() {
if(AutoRepeat_ClickType != 0) {
/* insert code which will be run when the button
autorepeats or is clicked */
}
}
Download Here
Included also in this is an example script, shows it being used in a nokia-like volume up/down toggle.
Enjoy!
Will
[edit: updated download location]
Comment