// // Created by koncord on 21.11.17. // #pragma once #include #include class Player; class Window { public: static void Init(LuaState &lua); public: Window(Player *player, int id); ~Window(); void setSize(short x, short y); void setCallback(sol::function); int getID(); void show(); void clear(); void call(const mwmp::BasePlayer::GUIWindow &window); void addButton(short x, short y, const std::string &label, sol::optional active); void addLabel(short x, short y, const std::string &label); void addEditBox(short x, short y, short w, short h, const std::string &id, sol::optional active); void addPassiveListBox(short x, short y, short w, short h,const std::string &id, sol::table data, sol::optional active); void addActiveListBox(short x, short y, short w, short h,const std::string &id, sol::table data, sol::optional active); void addSlider(short x, short y, short w, short h,const std::string &id, sol::optional active); private: Player *player; bool changed; sol::function callback; mwmp::BasePlayer::GUIWindow guiWindow; };