1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Add custom colorable GUIButton implementation

This commit is contained in:
rubenwardy 2019-03-15 18:39:23 +00:00
parent 41ad0f4f20
commit d1a1c5cbf0
9 changed files with 2471 additions and 19 deletions

View file

@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <iterator>
#include <sstream>
#include <limits>
#include "guiButton.h"
#include "guiFormSpecMenu.h"
#include "guiTable.h"
#include "constants.h"
@ -698,9 +699,8 @@ void GUIFormSpecMenu::parseButton(parserData* data, const std::string &element,
spec.ftype = f_Button;
if(type == "button_exit")
spec.is_exit = true;
gui::IGUIButton* e = Environment->addButton(rect, this, spec.fid,
spec.flabel.c_str());
GUIButton *e = GUIButton::addButton(Environment, rect, this, spec.fid, spec.flabel.c_str());
if (spec.fname == data->focused_fieldname) {
Environment->setFocus(e);
}