summaryrefslogtreecommitdiff
path: root/src/cat/LuaButton.h
blob: 69a77a4e79a04e61a838ee6cac778380c0a6c84f (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 "lua.h"
	#include "lauxlib.h"
	#include "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();
};