summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-14 17:41:23 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-14 17:41:23 +0300
commit606f836e9d1c17801ed4564a300cdbaa26097383 (patch)
tree1caf3bfcc5224ea32ec7c2ce18627cf48313cad7 /src/gui
parent0bea9cbee260faff6db5c4d440edfad78bdb6cf2 (diff)
downloadmanaverse-606f836e9d1c17801ed4564a300cdbaa26097383.tar.gz
manaverse-606f836e9d1c17801ed4564a300cdbaa26097383.tar.bz2
manaverse-606f836e9d1c17801ed4564a300cdbaa26097383.tar.xz
manaverse-606f836e9d1c17801ed4564a300cdbaa26097383.zip
Use CREATEWIDGET macro in actions.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/createwidget.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/createwidget.h b/src/gui/widgets/createwidget.h
index 9c72b95f5..70722a9e3 100644
--- a/src/gui/widgets/createwidget.h
+++ b/src/gui/widgets/createwidget.h
@@ -25,6 +25,9 @@
var = new type(__VA_ARGS__); \
var->postInit()
+#define CREATEWIDGET0(type, ...) \
+ (new type(__VA_ARGS__))->postInit()
+
#define CREATEWIDGET1(var, type) \
var = new type; \
var->postInit()
@@ -32,4 +35,7 @@
#define CREATEWIDGET2(type, ...) \
static_cast<type*>(Widget::callPostInit(new type(__VA_ARGS__)))
+#define CREATEWIDGETR0(type) \
+ static_cast<type*>(Widget::callPostInit(new type))
+
#endif // GUI_WIDGETS_CREATEWIDGET_H