summaryrefslogtreecommitdiff
path: root/source/Asura.Editor
diff options
context:
space:
mode:
Diffstat (limited to 'source/Asura.Editor')
-rw-r--r--source/Asura.Editor/widgets/binding/_button.cpp2
-rw-r--r--source/Asura.Editor/widgets/button.h8
2 files changed, 7 insertions, 3 deletions
diff --git a/source/Asura.Editor/widgets/binding/_button.cpp b/source/Asura.Editor/widgets/binding/_button.cpp
index 463aef6..fbae64f 100644
--- a/source/Asura.Editor/widgets/binding/_button.cpp
+++ b/source/Asura.Editor/widgets/binding/_button.cpp
@@ -37,7 +37,7 @@ namespace AsuraEditor
LUAX_STATE(L);
Button* self = state.GetUserdata<Button>(1);
- int msg = state.CheckParam<int>(2);
+ int msg = state.CheckValue<int>(2);
if (!lua_isfunction(L, 3))
return state.ErrorType(3, "callback");
diff --git a/source/Asura.Editor/widgets/button.h b/source/Asura.Editor/widgets/button.h
index 305cd35..14cd041 100644
--- a/source/Asura.Editor/widgets/button.h
+++ b/source/Asura.Editor/widgets/button.h
@@ -36,6 +36,8 @@ namespace AsuraEditor
{
public:
+ LUAX_DECL_FACTORY(Button);
+
Button();
~Button();
@@ -50,10 +52,10 @@ namespace AsuraEditor
int GetStatus();
void SetImage(int status, AEGraphics::Image* image);
- LUAX_DECL_FACTORY(Button);
-
private:
+ //------------------------------------------------------------------------------//
+
LUAX_DECL_ENUM(ButtonStatus);
LUAX_DECL_ENUM(ButtonMessage);
@@ -61,6 +63,8 @@ namespace AsuraEditor
LUAX_DECL_METHOD(_Disconnect);
LUAX_DECL_METHOD(_SetImage);
+ //------------------------------------------------------------------------------//
+
int mStatus; // ǰ״̬
Signal mSignals[_BUTTON_MSG_COUNT]; // 3Ϣsignal
AEGraphics::Image* mImage[_BUTTON_STATUS_COUNT]; // 5״̬ͼ