ashn-dot-dev / natac

Networked implementation of the hexagonal settler game in Sunder
BSD Zero Clause License
4 stars 0 forks source link

Add function to reset the window size #17

Closed ashn-dot-dev closed 6 months ago

ashn-dot-dev commented 7 months ago

Every UI window call starts with the lines:

# Re-set cached window rect in case the screen was resized.          
var win = cstate.*.ui.get_current_container();
win.*.rect.w = ui_w;
win.*.rect.h = ui_h;
win.*.rect.x = ui_x;
win.*.rect.y = ui_y;

Wrap these lines into a single function call.

ashn-dot-dev commented 6 months ago

Added in 219f1bfca76a5aeab0fb095194242f03a47df6f6.