mirror of
https://github.com/minetest/minetest.git
synced 2024-09-20 07:20:46 +03:00
remove console scrollbar setting
This commit is contained in:
parent
73695ee878
commit
a78eba2d0d
@ -759,10 +759,6 @@ clickable_chat_weblinks (Chat weblinks) bool true
|
||||
# Optional override for chat weblink color.
|
||||
chat_weblink_color (Weblink color) string #8888FF
|
||||
|
||||
# Whether or not to display a scrollbar in the chatwindow.
|
||||
# Recommended for mobile players.
|
||||
chat_scrollbar (Show chat scrollbar) bool false
|
||||
|
||||
# Font size of the recent chat text and chat prompt in point (pt).
|
||||
# Value 0 will use the default font size.
|
||||
chat_font_size (Chat font size) int 0 0 72
|
||||
|
@ -134,7 +134,6 @@ void set_default_settings()
|
||||
settings->setDefault("occlusion_culler", "bfs");
|
||||
settings->setDefault("enable_raytraced_culling", "true");
|
||||
settings->setDefault("chat_weblink_color", "#8888FF");
|
||||
settings->setDefault("chat_scrollbar", "true");
|
||||
|
||||
// Keymap
|
||||
settings->setDefault("remote_port", "30000");
|
||||
|
@ -97,7 +97,6 @@ GUIChatConsole::GUIChatConsole(
|
||||
m_is_ctrl_down = false;
|
||||
m_cache_clickable_chat_weblinks = g_settings->getBool("clickable_chat_weblinks");
|
||||
|
||||
m_scrollbar_enabled = g_settings->getBool("chat_scrollbar");
|
||||
m_scrollbar = new GUIScrollBar(env, this, -1, core::rect<s32>(0, 0, 30, m_height), false, true, tsrc);
|
||||
m_scrollbar->setSubElement(true);
|
||||
m_scrollbar->setLargeStep(1);
|
||||
@ -235,9 +234,7 @@ void GUIChatConsole::reformatConsole()
|
||||
if (cols <= 0 || rows <= 0)
|
||||
cols = rows = 0;
|
||||
|
||||
if (m_scrollbar_enabled) {
|
||||
m_scrollbar->setRelativePosition(core::rect<s32> (m_screensize.X - 32, 0, m_screensize.X, m_height));
|
||||
}
|
||||
m_scrollbar->setRelativePosition(core::rect<s32> (m_screensize.X - 32, 0, m_screensize.X, m_height));
|
||||
|
||||
recalculateConsolePosition();
|
||||
m_chat_backend->reformat(cols, rows);
|
||||
@ -350,7 +347,7 @@ void GUIChatConsole::drawText()
|
||||
|
||||
|
||||
core::recti rect;
|
||||
if (m_scrollbar_enabled && m_scrollbar->isVisible())
|
||||
if (m_scrollbar->isVisible())
|
||||
// leave 4 pixels of space between scrollbar and text
|
||||
rect = core::rect<s32> (0, 0, m_screensize.X - 32 - 4, m_height);
|
||||
else
|
||||
@ -743,7 +740,7 @@ void GUIChatConsole::setVisible(bool visible)
|
||||
m_height = 0;
|
||||
recalculateConsolePosition();
|
||||
}
|
||||
m_scrollbar->setVisible(visible && m_scrollbar_enabled);
|
||||
m_scrollbar->setVisible(visible);
|
||||
}
|
||||
|
||||
bool GUIChatConsole::weblinkClick(s32 col, s32 row)
|
||||
@ -818,12 +815,9 @@ void GUIChatConsole::updatePrimarySelection()
|
||||
|
||||
void GUIChatConsole::updateScrollbar()
|
||||
{
|
||||
if (!m_scrollbar_enabled)
|
||||
return;
|
||||
|
||||
m_scrollbar->setMin(m_chat_backend->getConsoleBuffer().getTopScrollPos());
|
||||
m_scrollbar->setMax(m_chat_backend->getConsoleBuffer().getBottomScrollPos());
|
||||
m_scrollbar->setPos(m_chat_backend->getConsoleBuffer().getScrollPosition());
|
||||
m_scrollbar->setVisible(m_scrollbar_enabled && m_scrollbar->getMin() != m_scrollbar->getMax());
|
||||
m_scrollbar->setVisible(m_scrollbar->getMin() != m_scrollbar->getMax());
|
||||
m_scrollbar->setPageSize(m_fontsize.Y * m_chat_backend->getConsoleBuffer().getLineCount());
|
||||
}
|
@ -142,6 +142,4 @@ private:
|
||||
bool m_cache_clickable_chat_weblinks;
|
||||
// Track if a ctrl key is currently held down
|
||||
bool m_is_ctrl_down;
|
||||
// Render a scrollbar (mainly for Android)
|
||||
bool m_scrollbar_enabled;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user