You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
7 years ago
|
//
|
||
|
// Created by koncord on 21.11.17.
|
||
|
//
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <components/openmw-mp/Base/BasePlayer.hpp>
|
||
|
#include <apps/openmw-mp/Script/LuaState.hpp>
|
||
|
|
||
|
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<bool> 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<bool> active);
|
||
|
void addPassiveListBox(short x, short y, short w, short h,const std::string &id, sol::table data, sol::optional<bool> active);
|
||
|
void addActiveListBox(short x, short y, short w, short h,const std::string &id, sol::table data, sol::optional<bool> active);
|
||
|
void addSlider(short x, short y, short w, short h,const std::string &id, sol::optional<bool> active);
|
||
|
private:
|
||
|
Player *player;
|
||
|
bool changed;
|
||
|
|
||
|
sol::function callback;
|
||
|
mwmp::BasePlayer::GUIWindow guiWindow;
|
||
|
};
|
||
|
|
||
|
|