diff options
author | Vladimir Krasheninnikov <boba09@list.ru> | 2025-02-09 12:32:35 +0100 |
---|---|---|
committer | Vladimir Krasheninnikov <boba09@list.ru> | 2025-02-09 12:32:35 +0100 |
commit | c5fa4ccf0fd0cd27005f0fdb68698717a6375c41 (patch) | |
tree | 08003b474d181f6842406b88efe8225465f9da29 /source/frontend/StarCharSelection.cpp | |
parent | e20ad7a712433736ca326abd2945103daef5c9a7 (diff) |
Add the clear button for the filter
Diffstat (limited to 'source/frontend/StarCharSelection.cpp')
-rw-r--r-- | source/frontend/StarCharSelection.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/frontend/StarCharSelection.cpp b/source/frontend/StarCharSelection.cpp index 2bf4f93..6cbfb9b 100644 --- a/source/frontend/StarCharSelection.cpp +++ b/source/frontend/StarCharSelection.cpp @@ -36,6 +36,10 @@ CharSelectionPane::CharSelectionPane(PlayerStoragePtr playerStorage, m_search = convert<TextBoxWidget>(obj)->getText().trim().toLower(); updateCharacterPlates(); }); + guiReader.registerCallback("clearSearch", [=](Widget*) { + auto searchCharacter = fetchChild<TextBoxWidget>("searchCharacter"); + searchCharacter->setText(""); + }); guiReader.construct(root.assets()->json("/interface/windowconfig/charselection.config"), this); } |