From 44925ad19051d4ffe239b3ba99ea27e7275409dc Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Wed, 22 Jul 2015 12:33:59 -0500 Subject: GUI TextBox Allows the GUI to create a scrollable text box for long text that may not all fit on the screen. Also includes code to allow the console to wrap on spaces and other such characters instead of wrapping in the middle of a word. To see an example of how to add a text box to the XML, see: https://gerrit.omnirom.org/#/c/14183/ Change-Id: Ifd139172ede290046b58ea3fe526e2e06da1d4ef --- gui/pages.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gui/pages.cpp') diff --git a/gui/pages.cpp b/gui/pages.cpp index 9bff289d3..3abd28785 100644 --- a/gui/pages.cpp +++ b/gui/pages.cpp @@ -444,6 +444,13 @@ bool Page::ProcessNode(xml_node<>* page, std::vector*> *templates, in mRenders.push_back(element); mActions.push_back(element); } + else if (type == "textbox") + { + GUITextBox* element = new GUITextBox(child); + mObjects.push_back(element); + mRenders.push_back(element); + mActions.push_back(element); + } else if (type == "template") { if (!templates || !child->first_attribute("name")) -- cgit v1.2.3