diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 21:05:14 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 21:05:14 +0000 |
commit | 403cd3acdb7b7fedf2b5e823326611bb32113385 (patch) | |
tree | dff28e68ec5c8015279ea1120dc822f2896f9ace /src/script/api/game/game_event_types.hpp.sq | |
parent | 3ada3b9cc5b63a593c2b2655aafedbcbdedcd041 (diff) | |
download | openttd-403cd3acdb7b7fedf2b5e823326611bb32113385.tar.xz |
(svn r23631) -Add: ScriptWindow, to manipulate windows on the client (GameScript only)
Diffstat (limited to 'src/script/api/game/game_event_types.hpp.sq')
-rw-r--r-- | src/script/api/game/game_event_types.hpp.sq | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/script/api/game/game_event_types.hpp.sq b/src/script/api/game/game_event_types.hpp.sq index 6358dbeae..25734cdaf 100644 --- a/src/script/api/game/game_event_types.hpp.sq +++ b/src/script/api/game/game_event_types.hpp.sq @@ -232,3 +232,20 @@ void SQGSEventAdminPort_Register(Squirrel *engine) SQGSEventAdminPort.PostRegister(engine); } + + +template <> const char *GetClassName<ScriptEventWindowWidgetClick, ST_GS>() { return "GSEventWindowWidgetClick"; } + +void SQGSEventWindowWidgetClick_Register(Squirrel *engine) +{ + DefSQClass<ScriptEventWindowWidgetClick, ST_GS> SQGSEventWindowWidgetClick("GSEventWindowWidgetClick"); + SQGSEventWindowWidgetClick.PreRegister(engine, "GSEvent"); + + SQGSEventWindowWidgetClick.DefSQStaticMethod(engine, &ScriptEventWindowWidgetClick::Convert, "Convert", 2, ".x"); + + SQGSEventWindowWidgetClick.DefSQMethod(engine, &ScriptEventWindowWidgetClick::GetWindowClass, "GetWindowClass", 1, "x"); + SQGSEventWindowWidgetClick.DefSQMethod(engine, &ScriptEventWindowWidgetClick::GetWindowNumber, "GetWindowNumber", 1, "x"); + SQGSEventWindowWidgetClick.DefSQMethod(engine, &ScriptEventWindowWidgetClick::GetWidgetNumber, "GetWidgetNumber", 1, "x"); + + SQGSEventWindowWidgetClick.PostRegister(engine); +} |