equal
deleted
inserted
replaced
18 // delta between mouse cursor and upper left corner of dragged window |
18 // delta between mouse cursor and upper left corner of dragged window |
19 static Point _drag_delta; |
19 static Point _drag_delta; |
20 |
20 |
21 static Window _windows[25]; |
21 static Window _windows[25]; |
22 Window *_z_windows[lengthof(_windows)]; |
22 Window *_z_windows[lengthof(_windows)]; |
23 Window **_last_z_window; // always points to the next free space in the z-array |
23 Window **_last_z_window; ///< always points to the next free space in the z-array |
24 |
24 |
25 void CDECL SetWindowWidgetsDisabledState(Window *w, bool disab_stat, int widgets, ...) |
25 void CDECL SetWindowWidgetsDisabledState(Window *w, bool disab_stat, int widgets, ...) |
26 { |
26 { |
27 va_list wdg_list; |
27 va_list wdg_list; |
28 |
28 |
1884 vp->virtual_width = neww << vp->zoom; |
1884 vp->virtual_width = neww << vp->zoom; |
1885 vp->virtual_height = newh << vp->zoom; |
1885 vp->virtual_height = newh << vp->zoom; |
1886 continue; // don't modify top,left |
1886 continue; // don't modify top,left |
1887 } |
1887 } |
1888 |
1888 |
1889 IConsoleResize(); |
1889 /* XXX - this probably needs something more sane. For example specying |
1890 |
1890 * in a 'backup'-desc that the window should always be centred. */ |
1891 switch (w->window_class) { |
1891 switch (w->window_class) { |
1892 case WC_MAIN_TOOLBAR: |
1892 case WC_MAIN_TOOLBAR: |
1893 top = w->top; |
1893 top = w->top; |
1894 left = PositionMainToolbar(w); // changes toolbar orientation |
1894 left = PositionMainToolbar(w); // changes toolbar orientation |
1895 break; |
1895 break; |
1914 case WC_SEND_NETWORK_MSG: |
1914 case WC_SEND_NETWORK_MSG: |
1915 top = (newh - 26); // 26 = height of status bar + height of chat bar |
1915 top = (newh - 26); // 26 = height of status bar + height of chat bar |
1916 left = (neww - w->width) >> 1; |
1916 left = (neww - w->width) >> 1; |
1917 break; |
1917 break; |
1918 |
1918 |
|
1919 case WC_CONSOLE: |
|
1920 IConsoleResize(w); |
|
1921 break; |
|
1922 |
1919 default: |
1923 default: |
1920 left = w->left; |
1924 left = w->left; |
1921 if (left + (w->width >> 1) >= neww) left = neww - w->width; |
1925 if (left + (w->width >> 1) >= neww) left = neww - w->width; |
1922 top = w->top; |
1926 top = w->top; |
1923 if (top + (w->height >> 1) >= newh) top = newh - w->height; |
1927 if (top + (w->height >> 1) >= newh) top = newh - w->height; |