aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-11-10 19:37:45 +0100
committersapier <Sapier at GMX dot net>2013-11-10 19:37:45 +0100
commit0f9440fa61fbfd95b0c06217d08b07c81c897ee0 (patch)
tree2e1845fe07af64c1b6f4b6b533ccdb50a8b399ec /src
parentd75b1718f8768cca1390c463215e65c4ec9ef6c4 (diff)
downloadminetest-0f9440fa61fbfd95b0c06217d08b07c81c897ee0.tar.gz
minetest-0f9440fa61fbfd95b0c06217d08b07c81c897ee0.tar.bz2
minetest-0f9440fa61fbfd95b0c06217d08b07c81c897ee0.zip
Fix "TODO read modinfo" in modmanager to improve ui usability
Diffstat (limited to 'src')
-rw-r--r--src/guiFormSpecMenu.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index e0ef55acd..aa1e2d9c9 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -721,8 +721,15 @@ void GUIFormSpecMenu::parseTextList(parserData* data,std::string element) {
scrollbar->setPos(data->listbox_scroll[fname_w]);
}
}
+ else {
+ gui::IGUIScrollBar *scrollbar = getListboxScrollbar(e);
+ if (scrollbar) {
+ scrollbar->setPos(0);
+ }
+ }
- if (str_initial_selection != "")
+ if ((str_initial_selection != "") &&
+ (str_initial_selection != "0"))
e->setSelected(stoi(str_initial_selection.c_str())-1);
m_listboxes.push_back(std::pair<FieldSpec,gui::IGUIListBox*>(spec,e));