Cleanup
This commit is contained in:
+12
-20
@@ -313,25 +313,6 @@ function base_resize() {
|
||||
base_redraw_ui();
|
||||
}
|
||||
|
||||
function base_redraw_ui() {
|
||||
ui_header_handle.redraws = 2;
|
||||
ui_base_hwnds[tab_area_t.STATUS].redraws = 2;
|
||||
ui_menubar_menu_handle.redraws = 2;
|
||||
ui_nodes_hwnd.redraws = 2;
|
||||
ui_box_hwnd.redraws = 2;
|
||||
ui_view2d_hwnd.redraws = 2;
|
||||
// Redraw viewport
|
||||
if (context_raw.ddirty < 0) {
|
||||
context_raw.ddirty = 0;
|
||||
}
|
||||
ui_base_hwnds[tab_area_t.SIDEBAR0].redraws = 2;
|
||||
ui_base_hwnds[tab_area_t.SIDEBAR1].redraws = 2;
|
||||
ui_toolbar_handle.redraws = 2;
|
||||
if (context_raw.split_view) {
|
||||
context_raw.ddirty = 1;
|
||||
}
|
||||
}
|
||||
|
||||
function base_update() {
|
||||
if (mouse_movement_x != 0 || mouse_movement_y != 0) {
|
||||
iron_mouse_set_cursor(cursor_t.ARROW);
|
||||
@@ -2074,13 +2055,24 @@ function ui_base_on_tab_drop(to: ui_handle_t, to_position: i32, from: ui_handle_
|
||||
}
|
||||
}
|
||||
|
||||
function ui_base_tag_ui_redraw() {
|
||||
function base_redraw_ui() {
|
||||
ui_header_handle.redraws = 2;
|
||||
ui_base_hwnds[tab_area_t.STATUS].redraws = 2;
|
||||
ui_menubar_menu_handle.redraws = 2;
|
||||
ui_menubar_hwnd.redraws = 2;
|
||||
ui_nodes_hwnd.redraws = 2;
|
||||
ui_box_hwnd.redraws = 2;
|
||||
ui_view2d_hwnd.redraws = 2;
|
||||
// Redraw viewport
|
||||
if (context_raw.ddirty < 0) {
|
||||
context_raw.ddirty = 0;
|
||||
}
|
||||
ui_base_hwnds[tab_area_t.SIDEBAR0].redraws = 2;
|
||||
ui_base_hwnds[tab_area_t.SIDEBAR1].redraws = 2;
|
||||
ui_toolbar_handle.redraws = 2;
|
||||
if (context_raw.split_view) {
|
||||
context_raw.ddirty = 1;
|
||||
}
|
||||
}
|
||||
|
||||
function ui_base_make_empty_envmap(col: i32) {
|
||||
|
||||
@@ -27,7 +27,7 @@ function box_preferences_show() {
|
||||
let locale_code: string = box_preferences_locales[locale_handle.position];
|
||||
config_raw.locale = locale_code;
|
||||
translator_load_translations(locale_code);
|
||||
ui_base_tag_ui_redraw();
|
||||
base_redraw_ui();
|
||||
}
|
||||
|
||||
let hscale: ui_handle_t = ui_handle(__ID__);
|
||||
@@ -101,7 +101,7 @@ function box_preferences_show() {
|
||||
}
|
||||
config_raw.show_asset_names = ui_check(h_show_asset_names, tr("Show Asset Names"));
|
||||
if (ui.changed) {
|
||||
ui_base_tag_ui_redraw();
|
||||
base_redraw_ui();
|
||||
}
|
||||
|
||||
///if !(arm_android || arm_ios)
|
||||
@@ -117,7 +117,7 @@ function box_preferences_show() {
|
||||
ui_touch_tooltip = config_raw.touch_ui;
|
||||
config_load_theme(config_raw.theme);
|
||||
box_preferences_set_scale();
|
||||
ui_base_tag_ui_redraw();
|
||||
base_redraw_ui();
|
||||
}
|
||||
///end
|
||||
|
||||
|
||||
@@ -385,7 +385,7 @@ function config_load_theme(theme: string, tag_redraw: bool = true) {
|
||||
|
||||
if (tag_redraw) {
|
||||
ui.ops.theme = base_theme;
|
||||
ui_base_tag_ui_redraw();
|
||||
base_redraw_ui();
|
||||
}
|
||||
|
||||
if (config_raw.touch_ui) {
|
||||
|
||||
Reference in New Issue
Block a user