mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 09:59:44 +00:00
Fix the issues found while reviewing the engine frame
Use util::str2wstr_utf8 for the window title instead of the deprecated codecvt conversion, choose the bar control icon with a switch, and keep the frontend layout in sync when a frame is drawn from the refresh callback the platform calls while it blocks the main loop. The frame forgets its interaction state when the window mode changes or the cursor gets locked, a bar click that only moved the window is no longer a double click, and one frame per size is drawn per resize. The tooltips of the two window settings were only present in the Russian locale and under a key the settings page never asks for: they are named display.<id>.tooltip now and translated in both locales. The version label of the debug build moves below the bar that covers the menu screen.
This commit is contained in:
parent
c635549892
commit
fbedfad478
10 changed files with 173 additions and 153 deletions
|
|
@ -17,7 +17,7 @@ struct DisplaySettings;
|
|||
enum class DecorationButton {
|
||||
CLOSE,
|
||||
MINIMIZE,
|
||||
MAXIMIZE,
|
||||
MAXIMIZE
|
||||
};
|
||||
|
||||
struct DecorationButtonLayout {
|
||||
|
|
@ -73,10 +73,6 @@ public:
|
|||
return empty;
|
||||
}
|
||||
|
||||
/// @brief Whether the engine draws the window frame itself here
|
||||
///
|
||||
/// The bar height and its buttons only mean something when it does, and
|
||||
/// the window settings are only shown where that is the case.
|
||||
/// @brief Handler the windowing system calls when it wants a repaint
|
||||
///
|
||||
/// Windows runs a modal loop while the user drags a window border and the
|
||||
|
|
@ -92,6 +88,10 @@ public:
|
|||
return refreshHandler;
|
||||
}
|
||||
|
||||
/// @brief Whether the engine draws the window frame itself here
|
||||
///
|
||||
/// The bar height and its buttons only mean something when it does, and
|
||||
/// the window settings are only shown where that is the case.
|
||||
virtual bool hasEngineFrame() const {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -106,7 +106,8 @@ public:
|
|||
return -1;
|
||||
}
|
||||
|
||||
virtual const std::vector<DecorationButtonLayout>& getDecorationButtons() const {
|
||||
virtual const std::vector<DecorationButtonLayout>& getDecorationButtons()
|
||||
const {
|
||||
static const std::vector<DecorationButtonLayout> empty;
|
||||
return empty;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue