summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/script/api/game/game_window.hpp.sq1
-rw-r--r--src/script/api/script_window.hpp1
-rw-r--r--src/signs_gui.cpp21
-rw-r--r--src/widgets/sign_widget.h1
4 files changed, 0 insertions, 24 deletions
diff --git a/src/script/api/game/game_window.hpp.sq b/src/script/api/game/game_window.hpp.sq
index 5f22b3d37..c438c610e 100644
--- a/src/script/api/game/game_window.hpp.sq
+++ b/src/script/api/game/game_window.hpp.sq
@@ -1020,7 +1020,6 @@ void SQGSWindow_Register(Squirrel *engine)
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_SCROLLBAR, "WID_SIL_SCROLLBAR");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_FILTER_TEXT, "WID_SIL_FILTER_TEXT");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_FILTER_MATCH_CASE_BTN, "WID_SIL_FILTER_MATCH_CASE_BTN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_FILTER_CLEAR_BTN, "WID_SIL_FILTER_CLEAR_BTN");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_FILTER_ENTER_BTN, "WID_SIL_FILTER_ENTER_BTN");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_CAPTION, "WID_QES_CAPTION");
SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_TEXT, "WID_QES_TEXT");
diff --git a/src/script/api/script_window.hpp b/src/script/api/script_window.hpp
index da5d59c55..18c6449ed 100644
--- a/src/script/api/script_window.hpp
+++ b/src/script/api/script_window.hpp
@@ -2143,7 +2143,6 @@ public:
WID_SIL_SCROLLBAR = ::WID_SIL_SCROLLBAR, ///< Scrollbar of list.
WID_SIL_FILTER_TEXT = ::WID_SIL_FILTER_TEXT, ///< Text box for typing a filter string.
WID_SIL_FILTER_MATCH_CASE_BTN = ::WID_SIL_FILTER_MATCH_CASE_BTN, ///< Button to toggle if case sensitive filtering should be used.
- WID_SIL_FILTER_CLEAR_BTN = ::WID_SIL_FILTER_CLEAR_BTN, ///< Button to clear the filter.
WID_SIL_FILTER_ENTER_BTN = ::WID_SIL_FILTER_ENTER_BTN, ///< Scroll to first sign.
};
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp
index b34816259..0f2d31690 100644
--- a/src/signs_gui.cpp
+++ b/src/signs_gui.cpp
@@ -172,17 +172,6 @@ struct SignListWindow : Window, SignList {
}
/**
- * Empties the string buffer that is edited by the filter text edit widget.
- * It also triggers the redraw of the widget so it become visible that the string has been made empty.
- */
- void ClearFilterTextWidget()
- {
- this->filter_editbox.text.DeleteAll();
-
- this->SetWidgetDirty(WID_SIL_FILTER_TEXT);
- }
-
- /**
* This function sets the filter string of the sign list. The contents of
* the edit widget is not updated by this function. Depending on if the
* new string is zero-length or not the clear button is made
@@ -192,10 +181,6 @@ struct SignListWindow : Window, SignList {
{
/* check if there is a new filter string */
this->string_filter.SetFilterTerm(new_filter_string);
- this->SetWidgetDisabledState(WID_SIL_FILTER_CLEAR_BTN, StrEmpty(new_filter_string));
-
- /* Repaint the clear button since its disabled state may have changed */
- this->SetWidgetDirty(WID_SIL_FILTER_CLEAR_BTN);
/* Rebuild the list of signs */
this->InvalidateData();
@@ -263,11 +248,6 @@ struct SignListWindow : Window, SignList {
}
break;
- case WID_SIL_FILTER_CLEAR_BTN:
- this->ClearFilterTextWidget(); // Empty the text in the EditBox widget
- this->SetFilterString(""); // Use empty text as filter text (= view all signs)
- break;
-
case WID_SIL_FILTER_MATCH_CASE_BTN:
SignList::match_case = !SignList::match_case; // Toggle match case
this->SetWidgetLoweredState(WID_SIL_FILTER_MATCH_CASE_BTN, SignList::match_case); // Toggle button pushed state
@@ -379,7 +359,6 @@ static const NWidgetPart _nested_sign_list_widgets[] = {
SetDataTip(STR_LIST_FILTER_OSKTITLE, STR_LIST_FILTER_TOOLTIP),
EndContainer(),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SIL_FILTER_MATCH_CASE_BTN), SetDataTip(STR_SIGN_LIST_MATCH_CASE, STR_SIGN_LIST_MATCH_CASE_TOOLTIP),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SIL_FILTER_CLEAR_BTN), SetDataTip(STR_SIGN_LIST_CLEAR, STR_SIGN_LIST_CLEAR_TOOLTIP),
EndContainer(),
EndContainer(),
NWidget(NWID_VERTICAL),
diff --git a/src/widgets/sign_widget.h b/src/widgets/sign_widget.h
index 1d75508e6..676e6741b 100644
--- a/src/widgets/sign_widget.h
+++ b/src/widgets/sign_widget.h
@@ -20,7 +20,6 @@ enum SignListWidgets {
WID_SIL_SCROLLBAR, ///< Scrollbar of list.
WID_SIL_FILTER_TEXT, ///< Text box for typing a filter string.
WID_SIL_FILTER_MATCH_CASE_BTN, ///< Button to toggle if case sensitive filtering should be used.
- WID_SIL_FILTER_CLEAR_BTN, ///< Button to clear the filter.
WID_SIL_FILTER_ENTER_BTN, ///< Scroll to first sign.
};