Skip to content

Commit

Permalink
More fixes for dirty hack
Browse files Browse the repository at this point in the history
  • Loading branch information
TheQwertiest committed Nov 24, 2017
1 parent ed06ad9 commit e24a62c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Scripts/Panel_Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,19 @@ function Menu() {
this.on_paint = function (gr) {
if (!has_notified) {
// When on_paint is called all other panels are loaded and can receive notifications
mode_handler.fix_window_size();
window.NotifyOthers('show_tooltips', g_properties.show_tooltips);
window.NotifyOthers('minimode_state', common_vars.minimode_state);

has_notified = true;
on_size();

// on_paint will be called after on_size
return;
// Dirty, dirty hack to adjust window size
var saved_w = window.Width;
var saved_h = window.Height;
mode_handler.fix_window_size();
if (saved_w != window.Width || saved_h != window.Height) {
window.Repaint();
return;
}
}

gr.FillSolidRect(this.x - pad, this.y - pad, this.w + 2*pad, this.h + pad, pssBackColor);
Expand Down

0 comments on commit e24a62c

Please sign in to comment.