1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

changes to status bar according to review comments:

- renamed IStatusBar API to more clear names
- removed "locking" of status bar
- added comments for IStatusBar API
- removed dynamic_casts to CGStatusBar, now IStatusBar API is fully
sufficient
This commit is contained in:
Ivan Savenko
2022-12-12 18:23:41 +02:00
parent 1558c28c0a
commit d40d5250b7
6 changed files with 150 additions and 87 deletions

View File

@@ -220,8 +220,20 @@ class IStatusBar
{
public:
virtual ~IStatusBar();
/// set current text for the status bar
virtual void write(const std::string & text) = 0;
/// remove any current text from the status bar
virtual void clear() = 0;
virtual void clearIfMatching(const std::string & Text) = 0;
virtual void write(const std::string & Text) = 0;
virtual void lock(bool shouldLock) = 0;
/// remove text from status bar if current text matches tested text
virtual void clearIfMatching(const std::string & testedText) = 0;
/// enables mode for entering text instead of showing hover text
virtual void setEnteringMode(bool on) = 0;
/// overrides hover text from controls with text entered into in-game console (for chat/cheats)
virtual void setEnteredText(const std::string & text) = 0;
};