@@ -1317,7 +1317,7 @@ void pick_preferences(bool record) {
|
||||
}
|
||||
|
||||
cLedGroup& uiScale = dynamic_cast<cLedGroup&>(prefsDlog["scaleui"]);
|
||||
double ui_scale = get_float_pref("UIScale", 1.0);
|
||||
double ui_scale = get_ui_scale();
|
||||
if (ui_scale>0.95 && ui_scale<1.05) uiScale.setSelected("1");
|
||||
else if (ui_scale>1.45 && ui_scale<1.55) uiScale.setSelected("1_5");
|
||||
else if (ui_scale>1.95 && ui_scale<2.05) uiScale.setSelected("2");
|
||||
@@ -1326,7 +1326,7 @@ void pick_preferences(bool record) {
|
||||
else uiScale.setSelected("other");
|
||||
|
||||
cLedGroup& uiMapScale = dynamic_cast<cLedGroup&>(prefsDlog["scalemap"]);
|
||||
double ui_map_scale = get_float_pref("UIScaleMap", 1.0);
|
||||
double ui_map_scale = get_ui_scale_map();
|
||||
if (ui_map_scale>0.95 && ui_map_scale<1.05) uiMapScale.setSelected("1");
|
||||
else if (ui_map_scale>1.45 && ui_map_scale<1.55) uiMapScale.setSelected("1_5");
|
||||
else if (ui_map_scale>1.95 && ui_map_scale<2.05) uiMapScale.setSelected("2");
|
||||
@@ -1370,7 +1370,7 @@ void pick_preferences(bool record) {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wfloat-equal"
|
||||
#endif
|
||||
if(get_int_pref("DisplayMode") != store_display_mode || get_float_pref("UIScale") != ui_scale || get_float_pref("UIScaleMap") != ui_map_scale)
|
||||
if(get_int_pref("DisplayMode") != store_display_mode || get_ui_scale() != ui_scale || get_ui_scale_map() != ui_map_scale)
|
||||
changed_display_mode = true;
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
|
@@ -142,9 +142,9 @@ void adjust_window_mode() {
|
||||
winSettings.stencilBits = 1;
|
||||
sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
|
||||
hideMenuBar();
|
||||
double ui_scale = get_float_pref("UIScale", 1.0);
|
||||
double ui_scale = get_ui_scale();
|
||||
if(ui_scale < 0.1) ui_scale = 1.0;
|
||||
float width = 605 * ui_scale, height = 430 * ui_scale;
|
||||
float width = boe_width * ui_scale, height = boe_height * ui_scale;
|
||||
|
||||
// TODO: Make display_mode an enum
|
||||
// 0 - center 1- ul 2 - ur 3 - dl 4 - dr 5 - small win
|
||||
|
@@ -675,7 +675,7 @@ short get_num_of_items(short max_num) {
|
||||
}
|
||||
|
||||
void init_mini_map() {
|
||||
double ui_scale = get_float_pref("UIScaleMap", 1.0);
|
||||
double ui_scale = get_ui_scale();
|
||||
if (ui_scale < 0.1) ui_scale = 1.0;
|
||||
if (mini_map.isOpen()) mini_map.close();
|
||||
mini_map.create(sf::VideoMode(ui_scale*296,ui_scale*277), "Map", sf::Style::Titlebar | sf::Style::Close);
|
||||
|
@@ -141,7 +141,7 @@ void show_logo(cFramerateLimiter& fps_limiter) {
|
||||
if(get_int_pref("DisplayMode") != 5)
|
||||
hideMenuBar();
|
||||
|
||||
double ui_scale = get_float_pref("UIScale", 1.0);
|
||||
double ui_scale = get_ui_scale();
|
||||
if(ui_scale < 1) ui_scale = 1;
|
||||
rectangle logo_from = {0, 0, int(ui_scale *350), int(ui_scale * 350)};
|
||||
logo_from.offset((whole_window.right - logo_from.right) / 2,(whole_window.bottom - logo_from.bottom) / 2);
|
||||
@@ -163,7 +163,7 @@ void show_logo(cFramerateLimiter& fps_limiter) {
|
||||
void plop_fancy_startup(cFramerateLimiter& fps_limiter) {
|
||||
rectangle whole_window = view_rect();
|
||||
|
||||
float ui_scale = get_float_pref("UIScale", 1.0);
|
||||
float ui_scale = get_ui_scale();
|
||||
if (ui_scale<1) ui_scale=1;
|
||||
rectangle from_rect;
|
||||
rectangle intro_from = {0, 0, int(ui_scale * 480), int(ui_scale * 640)};
|
||||
|
Reference in New Issue
Block a user