2021-05-26 13:01:50 +00:00
|
|
|
#ifndef GAME_CLIENT_UI_EX_H
|
|
|
|
#define GAME_CLIENT_UI_EX_H
|
|
|
|
|
|
|
|
#include <base/system.h>
|
2021-05-31 09:43:02 +00:00
|
|
|
#include <engine/input.h>
|
|
|
|
#include <engine/kernel.h>
|
2021-05-26 13:01:50 +00:00
|
|
|
#include <game/client/ui.h>
|
|
|
|
|
|
|
|
class IInput;
|
|
|
|
class ITextRender;
|
|
|
|
class IKernel;
|
|
|
|
class IGraphics;
|
|
|
|
|
|
|
|
class CRenderTools;
|
|
|
|
|
|
|
|
class CUIEx
|
|
|
|
{
|
|
|
|
CUI *m_pUI;
|
|
|
|
IInput *m_pInput;
|
|
|
|
ITextRender *m_pTextRender;
|
|
|
|
IKernel *m_pKernel;
|
|
|
|
IGraphics *m_pGraphics;
|
|
|
|
CRenderTools *m_pRenderTools;
|
|
|
|
|
2021-05-31 09:43:02 +00:00
|
|
|
IInput::CEvent *m_pInputEventsArray;
|
|
|
|
int *m_pInputEventCount;
|
|
|
|
|
2021-09-16 14:50:17 +00:00
|
|
|
bool m_MouseIsPress;
|
|
|
|
bool m_HasSelection;
|
|
|
|
|
|
|
|
int m_MousePressX = 0;
|
|
|
|
int m_MousePressY = 0;
|
|
|
|
int m_MouseCurX = 0;
|
|
|
|
int m_MouseCurY = 0;
|
|
|
|
int m_CurSelStart = 0;
|
|
|
|
int m_CurSelEnd = 0;
|
|
|
|
|
|
|
|
int m_CurCursor = 0;
|
|
|
|
|
2021-05-26 13:01:50 +00:00
|
|
|
protected:
|
|
|
|
CUI *UI() { return m_pUI; }
|
|
|
|
IInput *Input() { return m_pInput; }
|
|
|
|
ITextRender *TextRender() { return m_pTextRender; }
|
|
|
|
IKernel *Kernel() { return m_pKernel; }
|
|
|
|
IGraphics *Graphics() { return m_pGraphics; }
|
|
|
|
CRenderTools *RenderTools() { return m_pRenderTools; }
|
|
|
|
|
|
|
|
public:
|
2021-05-31 09:43:02 +00:00
|
|
|
CUIEx(CUI *pUI, IKernel *pKernel, CRenderTools *pRenderTools, IInput::CEvent *pInputEventsArray, int *pInputEventCount);
|
2021-05-26 13:01:50 +00:00
|
|
|
CUIEx() {}
|
|
|
|
|
2021-05-31 09:43:02 +00:00
|
|
|
void Init(CUI *pUI, IKernel *pKernel, CRenderTools *pRenderTools, IInput::CEvent *pInputEventsArray, int *pInputEventCount);
|
2021-05-26 13:01:50 +00:00
|
|
|
|
|
|
|
int DoEditBox(void *pID, const CUIRect *pRect, char *pStr, unsigned StrSize, float FontSize, float *Offset, bool Hidden = false, int Corners = CUI::CORNER_ALL, const char *pEmptyText = "");
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|