Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: Endrit on April 09, 2012, 06:30:54 PM
-
Hi guys ,
How are You ?
I have a little problem !!!
Here's my problem : I have a some buttons and a editor in a window , I'd like to use this buttons like the numbers in the keyboard .
But I have no idea how to do it .
on "one" {
code ????
}
what should insert ??
thanks guys !
-
You can do something like "Game.ApplyEvent("Keypress");" . Then you can edit the on "Keypress" section in your game.script file.
Greets,
Spellbreaker
-
Thanks spellbreaker
but i really don't understand nothing about scripting can you explain step by step ::slug ::slug ::slug ::slug
-
You should read the WME Wiki. Otherwise you will get lost in keycodes, eventhandling and stuff. I already wrote what you have to do:
In the Button you make something like
on "LeftClick" {
Game.ApplyEvent("Keypress");".
}
Then you have to edit the Keypress section in your game.script file. You then have to check in which scene you currently are, and then check the keys. That way you can check both keypresses and mousclicks on your buttons.
Greets,
Spellbreaker