mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-20 17:39:46 +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,6 +17,7 @@
|
|||
#include "screens/MenuScreen.hpp"
|
||||
#include "settings.hpp"
|
||||
#include "util/stringutil.hpp"
|
||||
#include "window/Window.hpp"
|
||||
#include "assets/assetload_funcs.hpp"
|
||||
#include "content/ContentPack.hpp"
|
||||
|
||||
|
|
@ -24,11 +25,12 @@ using namespace gui;
|
|||
|
||||
void menus::create_version_label(gui::GUI& gui) {
|
||||
auto text = ENGINE_VERSION_STRING + " debug build";
|
||||
// the menu screen keeps no inset, the bar covers the top of it
|
||||
const int top = gui.getEngine().getWindow().getDecorationHeight() + 4;
|
||||
gui.add(guiutil::create(
|
||||
gui,
|
||||
"<label z-index='1000' color='#FFFFFF30' gravity='top-right' "
|
||||
"margin='4'>" +
|
||||
text + "</label>"
|
||||
"margin='4," + std::to_string(top) + ",4,4'>" + text + "</label>"
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue