hollyhock
Loading...
Searching...
No Matches
textBox.hpp
1#pragma once
2#include <cstdint>
3#include "util.hpp"
4
6struct GUITextBox_Wrapped_VTable {
7 VTABLE_FAKE_ENTRY(32, 0);
8
9 // Args: text
10 VTableFunction<void, const char *> SetText;
11};
12
14struct GUITextBox_Wrapped {
15 uint8_t unknown0[0x4C];
16
17 struct GUITextBox_Wrapped_VTable *vtable;
18
19 uint8_t unknown1[0x4];
20
21 const char *text;
22
23 uint8_t unknown2[0x48];
24};
25#ifndef __clang__
26static_assert(sizeof(struct GUITextBox_Wrapped) == 0xA0);
27#endif
28
29class GUITextBox : public GUIElement {
30public:
31 enum Flag {
33 FlagDrawBox = 1 << 3,
34
36 FlagEditable = 1 << 8
37 };
38
40 int x, int y, int width,
41 int maxLength, bool countLengthByBytes
42 );
44 int x, int y, int width,
45 const char *text, int maxLength, bool countLengthByBytes
46 );
47
48 const char *GetText();
49 void SetText(const char *text);
50};
Definition util.hpp:78
Definition textBox.hpp:29
Flag
Definition textBox.hpp:31
@ FlagDrawBox
Enables drawing the text box's outline and background.
Definition textBox.hpp:33
@ FlagEditable
Allows the contents of the text box to be modified.
Definition textBox.hpp:36
const char * GetText()
Definition textBox.cpp:87
void SetText(const char *text)
Definition textBox.cpp:99