Changeset View
Changeset View
Standalone View
Standalone View
source/gui/GUIbase.h
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
// seem to be defined anywhere in the predefined header. | // seem to be defined anywhere in the predefined header. | ||||
#include "ps/Shapes.h" | #include "ps/Shapes.h" | ||||
#include "scriptinterface/ScriptInterface.h" | #include "scriptinterface/ScriptInterface.h" | ||||
class IGUIObject; | class IGUIObject; | ||||
// Object settings setups | // Object settings setups | ||||
// Setup an object's ConstructObject function | // Setup an object's ConstructObject function | ||||
#define GUI_OBJECT(obj) \ | #define GUI_OBJECT(obj) \ | ||||
public: \ | public: \ | ||||
static IGUIObject* ConstructObject(CGUI* pGUI) \ | static IGUIObject* ConstructObject(CGUI* pGUI) \ | ||||
{ return new obj(pGUI); } | { \ | ||||
IGUIObject* foo = static_cast<IGUIObject*>(new obj(pGUI)); \ | |||||
foo->AddSettings(); \ | |||||
return foo; \ | |||||
} | |||||
elexis: This screams for a template function. | |||||
/** | /** | ||||
* Message types. | * Message types. | ||||
* @see SGUIMessage | * @see SGUIMessage | ||||
*/ | */ | ||||
enum EGUIMessageType | enum EGUIMessageType | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
This screams for a template function.