mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Use our GUIButton in our GUIScrollBar
Note that GUIScrollBar needs an ISimpleTextureSource now due to button styling.
This commit is contained in:
@@ -25,9 +25,10 @@ numerical
|
||||
//! constructor
|
||||
GUIEditBoxWithScrollBar::GUIEditBoxWithScrollBar(const wchar_t* text, bool border,
|
||||
IGUIEnvironment* environment, IGUIElement* parent, s32 id,
|
||||
const core::rect<s32>& rectangle, bool writable, bool has_vscrollbar)
|
||||
const core::rect<s32>& rectangle, ISimpleTextureSource *tsrc,
|
||||
bool writable, bool has_vscrollbar)
|
||||
: GUIEditBox(environment, parent, id, rectangle, border, writable),
|
||||
m_background(true), m_bg_color_used(false)
|
||||
m_background(true), m_bg_color_used(false), m_tsrc(tsrc)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
setDebugName("GUIEditBoxWithScrollBar");
|
||||
@@ -635,7 +636,7 @@ void GUIEditBoxWithScrollBar::createVScrollBar()
|
||||
irr::core::rect<s32> scrollbarrect = m_frame_rect;
|
||||
scrollbarrect.UpperLeftCorner.X += m_frame_rect.getWidth() - m_scrollbar_width;
|
||||
m_vscrollbar = new GUIScrollBar(Environment, getParent(), -1,
|
||||
scrollbarrect, false, true);
|
||||
scrollbarrect, false, true, m_tsrc);
|
||||
|
||||
m_vscrollbar->setVisible(false);
|
||||
m_vscrollbar->setSmallStep(3 * fontHeight);
|
||||
|
Reference in New Issue
Block a user