mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Use our GUIButton in our GUIScrollBar
Note that GUIScrollBar needs an ISimpleTextureSource now due to button styling.
This commit is contained in:
parent
9d62abbe46
commit
91c0439922
8 changed files with 43 additions and 25 deletions
|
@ -666,7 +666,7 @@ void GUIFormSpecMenu::parseScrollBar(parserData* data, const std::string &elemen
|
|||
spec.ftype = f_ScrollBar;
|
||||
spec.send = true;
|
||||
GUIScrollBar *e = new GUIScrollBar(Environment, data->current_parent,
|
||||
spec.fid, rect, is_horizontal, true);
|
||||
spec.fid, rect, is_horizontal, true, m_tsrc);
|
||||
|
||||
auto style = getDefaultStyleForElement("scrollbar", name);
|
||||
e->setNotClipped(style.getBool(StyleSpec::NOCLIP, false));
|
||||
|
@ -1493,7 +1493,7 @@ void GUIFormSpecMenu::createTextField(parserData *data, FieldSpec &spec,
|
|||
gui::IGUIEditBox *e = nullptr;
|
||||
if (is_multiline) {
|
||||
e = new GUIEditBoxWithScrollBar(spec.fdefault.c_str(), true, Environment,
|
||||
data->current_parent, spec.fid, rect, is_editable, true);
|
||||
data->current_parent, spec.fid, rect, m_tsrc, is_editable, true);
|
||||
} else if (is_editable) {
|
||||
e = Environment->addEditBox(spec.fdefault.c_str(), rect, true,
|
||||
data->current_parent, spec.fid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue