mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 10:53:51 +00:00
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
|
//
|
||
|
// 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;
|
||
|
};
|
||
|
|
||
|
|