summaryrefslogtreecommitdiff
path: root/src/cat/LuaButton.h
blob: 5d0e9368bfa69d188113c2a71daec46a6aa4d415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once

extern "C" {
	#include "lua5.1/lua.h"
	#include "lua5.1/lauxlib.h"
	#include "lua5.1/lualib.h"
}

#include "LuaLuna.h"
#include "LuaComponent.h"

namespace ui
{
	class Button;
}

class LuaScriptInterface;

class LuaButton: public LuaComponent
{
	ui::Button * button;
	int actionFunction;
	void triggerAction();
	int action(lua_State * l);
	int text(lua_State * l);
	int enabled(lua_State * l);
public:
	static const char className[];
	static Luna<LuaButton>::RegType methods[];

	LuaButton(lua_State * l);
	~LuaButton();
};