mirror of
https://github.com/BluTac10/Xbox-Neo.git
synced 2026-05-31 15:24:38 +00:00
Implement Book & Quill: - IUIScene_WritingBookMenu and UIScene_BookAndQuillMenu for UI - Edited UIControl_Label to add direct editing (quite hardcoded to my needs right now) - Reimplement scrapped custom payload packets for books and signing - Other misc changes TODO: - Coloured and scambled text - Book copying - Clean up code
52 lines
1.0 KiB
C++
52 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include "UIControl_Base.h"
|
|
|
|
class UIControl_Label : public UIControl_Base
|
|
{
|
|
private:
|
|
bool m_reinitEnabled;
|
|
|
|
public:
|
|
UIControl_Label();
|
|
|
|
#ifdef _WINDOWS64
|
|
bool m_bDirectEditing = false;
|
|
wstring m_textBeforeEdit;
|
|
IggyName m_funcSetCaretIndex;
|
|
wstring m_editBuffer;
|
|
int m_iCursorPos;
|
|
int m_iCharLimit;
|
|
int m_iLineLimit = 15;
|
|
int m_iDirectEditCooldown;
|
|
int m_iCaretBlinkTimer;
|
|
bool m_bhasBeenSelected = false;
|
|
bool signing = false;
|
|
int iRealWidth = 0;
|
|
|
|
int m_cPosMin = 0;
|
|
int m_cPosMax;
|
|
#endif
|
|
|
|
virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName);
|
|
|
|
void init(UIString label, int id = -1);
|
|
virtual void ReInit();
|
|
|
|
void disableReinitialisation() { m_reinitEnabled = false; }
|
|
|
|
enum EDirectEditResult
|
|
{
|
|
eDirectEdit_Continue,
|
|
eDirectEdit_Confirmed,
|
|
eDirectEdit_Cancelled,
|
|
};
|
|
|
|
wstring authorName;
|
|
|
|
void beginDirectEdit(int charLimit, bool bSigning, wstring author);
|
|
void UpdateCaretIndex(int index);
|
|
EDirectEditResult tickDirectEdit();
|
|
void cancelDirectEdit();
|
|
void confirmDirectEdit();
|
|
}; |