Example #1
0
	static int l_set_enabled(lua_State *l) {
		UI::Widget *w = LuaObject<UI::Widget>::CheckFromLua(1);
		const bool enable = lua_toboolean(l, 2);
		if (enable) {
			w->Enable();
		} else {
			w->Disable();
		}
		return 0;
	}
Example #2
0
		static int l_disable(lua_State *l)
		{
			UI::Widget *w = LuaObject<UI::Widget>::CheckFromLua(1);
			w->Disable();
			return 0;
		}