diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index a8c430f2a2..14587513df 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -244,7 +244,6 @@ namespace MWGui getWidget(mScriptView, "ScriptView"); getWidget(mScriptAdapter, "ScriptAdapter"); getWidget(mScriptDisabled, "ScriptDisabled"); - getWidget(mScriptDescription, "ScriptDescription"); #ifndef WIN32 // hide gamma controls since it currently does not work under Linux @@ -333,7 +332,6 @@ namespace MWGui mScriptFilter->eventEditTextChange += MyGUI::newDelegate(this, &SettingsWindow::onScriptFilterChange); mScriptList->eventListMouseItemActivate += MyGUI::newDelegate(this, &SettingsWindow::onScriptListSelection); - mScriptList->eventListMouseItemFocus += MyGUI::newDelegate(this, &SettingsWindow::onScriptListFocus); } void SettingsWindow::onTabChanged(MyGUI::TabControl* /*_sender*/, size_t /*index*/) @@ -780,7 +778,7 @@ namespace MWGui { LuaUi::ScriptSettingsPage page = LuaUi::scriptSettingsPageAt(i); int nameSearch = 2 * weightedSearch(searchRegex, page.mName); - int descriptionSearch = weightedSearch(searchRegex, page.mDescription); + int descriptionSearch = weightedSearch(searchRegex, page.mSearchHints); int search = nameSearch + descriptionSearch; if (search > 0) weightedPages.push_back({ i, page, search }); @@ -820,21 +818,6 @@ namespace MWGui mScriptView->setCanvasSize(canvasSize); } - void SettingsWindow::onScriptListFocus(MyGUI::ListBox*, size_t index) - { - if (index >= mScriptList->getItemCount()) - { - mScriptDescription->setVisible(false); - mScriptView->setVisible(true); - } - else { - size_t page = *mScriptList->getItemDataAt(index); - mScriptDescription->setCaption(LuaUi::scriptSettingsPageAt(page).mDescription); - mScriptDescription->setVisible(true); - mScriptView->setVisible(false); - } - } - void SettingsWindow::onRebindAction(MyGUI::Widget* _sender) { int actionId = *_sender->getUserData(); diff --git a/apps/openmw/mwgui/settingswindow.hpp b/apps/openmw/mwgui/settingswindow.hpp index 217dcf3051..1a888257a8 100644 --- a/apps/openmw/mwgui/settingswindow.hpp +++ b/apps/openmw/mwgui/settingswindow.hpp @@ -52,7 +52,6 @@ namespace MWGui MyGUI::ScrollView* mScriptView; LuaUi::LuaAdapter* mScriptAdapter; MyGUI::EditBox* mScriptDisabled; - MyGUI::EditBox* mScriptDescription; int mCurrentPage; void onTabChanged(MyGUI::TabControl* _sender, size_t index); @@ -84,7 +83,6 @@ namespace MWGui void onScriptFilterChange(MyGUI::EditBox*); void onScriptListSelection(MyGUI::ListBox*, size_t index); - void onScriptListFocus(MyGUI::ListBox*, size_t index); void apply(); diff --git a/components/lua_ui/scriptsettings.cpp b/components/lua_ui/scriptsettings.cpp index a1671186a4..f2ab84bde0 100644 --- a/components/lua_ui/scriptsettings.cpp +++ b/components/lua_ui/scriptsettings.cpp @@ -15,14 +15,14 @@ namespace LuaUi ScriptSettingsPage parse(const sol::table& options) { auto name = options.get_or("name", std::string()); - auto description = options.get_or("description", std::string()); + auto searchHints = options.get_or("searchHints", std::string()); auto element = options.get_or>("element", nullptr); if (name.empty()) Log(Debug::Warning) << "A script settings page has an empty name"; if (!element.get()) Log(Debug::Warning) << "A script settings page has no UI element assigned"; return { - name, description, element + name, searchHints, element }; } } diff --git a/components/lua_ui/scriptsettings.hpp b/components/lua_ui/scriptsettings.hpp index 245c3e0449..c468f9eb0b 100644 --- a/components/lua_ui/scriptsettings.hpp +++ b/components/lua_ui/scriptsettings.hpp @@ -14,7 +14,7 @@ namespace LuaUi struct ScriptSettingsPage { std::string mName; - std::string mDescription; + std::string mSearchHints; std::shared_ptr mElement; }; size_t scriptSettingsPageCount(); diff --git a/files/mygui/openmw_settings_window.layout b/files/mygui/openmw_settings_window.layout index d6ac4f43fa..13f5ada24b 100644 --- a/files/mygui/openmw_settings_window.layout +++ b/files/mygui/openmw_settings_window.layout @@ -666,14 +666,6 @@ - - - - - - - -