aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiEditBox.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2021-01-13 09:05:09 +0100
committerGitHub <noreply@github.com>2021-01-13 09:05:09 +0100
commit4b012828213e3086f11afb3b94ce7aab85a52f55 (patch)
treee23dc7d1f72feecab374d6854185965e5ff5c718 /src/gui/guiEditBox.h
parent1946835ee87bdd20c586f6bb79c422da1cad4685 (diff)
downloadminetest-4b012828213e3086f11afb3b94ce7aab85a52f55.tar.gz
minetest-4b012828213e3086f11afb3b94ce7aab85a52f55.tar.bz2
minetest-4b012828213e3086f11afb3b94ce7aab85a52f55.zip
Factorize more guiEditBoxes code (#10789)
* Factorize more guiEditBoxes code
Diffstat (limited to 'src/gui/guiEditBox.h')
-rw-r--r--src/gui/guiEditBox.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/guiEditBox.h b/src/gui/guiEditBox.h
index 3e41c7e51..a20eb61d7 100644
--- a/src/gui/guiEditBox.h
+++ b/src/gui/guiEditBox.h
@@ -129,6 +129,14 @@ public:
//! called if an event happened.
virtual bool OnEvent(const SEvent &event);
+ //! Writes attributes of the element.
+ virtual void serializeAttributes(io::IAttributes *out,
+ io::SAttributeReadWriteOptions *options) const;
+
+ //! Reads attributes of the element
+ virtual void deserializeAttributes(
+ io::IAttributes *in, io::SAttributeReadWriteOptions *options);
+
protected:
virtual void breakText() = 0;
@@ -147,7 +155,7 @@ protected:
virtual s32 getCursorPos(s32 x, s32 y) = 0;
bool processKey(const SEvent &event);
- virtual void inputChar(wchar_t c) = 0;
+ virtual void inputChar(wchar_t c);
//! returns the line number that the cursor is on
s32 getLineFromPos(s32 pos);