Modified files for SDL2.

This commit is contained in:
LuisAntonRebollo 2015-01-18 22:52:29 +01:00
parent 33a0579735
commit 475f218bcd
33 changed files with 436 additions and 136 deletions

View file

@ -195,9 +195,9 @@ bool PopupMenu::onMessageObjectReceived(StringTableEntry queue, Message *msg )
// Console Methods
//-----------------------------------------------------------------------------
DefineConsoleMethod(PopupMenu, insertItem, S32, (S32 pos, const char * title, const char * accelerator), ("", ""), "(pos[, title][, accelerator])")
DefineConsoleMethod(PopupMenu, insertItem, S32, (S32 pos, const char * title, const char * accelerator, const char* cmd), ("", "", ""), "(pos[, title][, accelerator][, cmd])")
{
return object->insertItem(pos, title, accelerator);
return object->insertItem(pos, title, accelerator, cmd);
}
DefineConsoleMethod(PopupMenu, removeItem, void, (S32 pos), , "(pos)")
@ -216,9 +216,9 @@ DefineConsoleMethod(PopupMenu, insertSubMenu, S32, (S32 pos, String title, Strin
return object->insertSubMenu(pos, title, mnu);
}
DefineConsoleMethod(PopupMenu, setItem, bool, (S32 pos, const char * title, const char * accelerator), (""), "(pos, title[, accelerator])")
DefineConsoleMethod(PopupMenu, setItem, bool, (S32 pos, const char * title, const char * accelerator, const char *cmd), (""), "(pos, title[, accelerator][, cmd])")
{
return object->setItem(pos, title, accelerator);
return object->setItem(pos, title, accelerator, cmd);
}
//-----------------------------------------------------------------------------

View file

@ -85,11 +85,11 @@ public:
/// returns the menu item's ID, or -1 on failure.
/// implementd on a per-platform basis.
/// TODO: factor out common code
S32 insertItem(S32 pos, const char *title, const char* accelerator);
S32 insertItem(S32 pos, const char *title, const char* accelerator, const char* cmd);
/// Sets the name title and accelerator for
/// an existing item.
bool setItem(S32 pos, const char *title, const char* accelerator);
bool setItem(S32 pos, const char *title, const char* accelerator, const char* cmd);
/// pass NULL for @p title to insert a separator
/// returns the menu item's ID, or -1 on failure.