Commit Graph

45 Commits

Author SHA1 Message Date
Peter Nelson 8afef45d4e
Fix d3c673e: Don't defer OnResize() after ReInit() (#12174)
Some windows resize themselves during painting and issue ReInit(). In this case deferred OnResize() causes a visible glitch as the event is handled on the next redraw.
2024-02-25 08:35:57 +00:00
Peter Nelson a0dfb76e34 Codechange: Replace mishmash of types for widget index with WidgetID.
Indices were stored as int, but often passed around as uint/uint8_t and casts.

Now they should all use WidgetID.
2023-12-30 00:23:57 +00:00
Peter Nelson ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
2023-11-06 20:29:35 +00:00
Peter Nelson f379b31e28 Add: data parameter in Window::Close method.
This allows passing data when closing a window, e.g. to indicate how it was closed.
2023-10-13 20:47:28 +01:00
Patric Stout 07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype (#11190)
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
2023-08-15 18:12:05 +02:00
Rubidium bcfe0fb076 Codechange: introduce GetMainWindow() to properly account for nullptr checks
Some nullptr checks have been removed as they were not triggered with nullptr
with the null video driver and in dedicated server mode.
2023-01-14 21:15:23 +01:00
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
Peter Nelson 4791ff2862 Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed. 2021-04-30 17:08:15 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Jonathan G Rennison 1dba06656d Codechange: Add utility function for whether the focused window is a console 2019-11-10 17:58:42 +00:00
Joan Josep 548ec05a48 Add: News menu entry and shortcut for deleting all messages. (#7240) 2019-02-16 23:15:58 +00:00
Peter Nelson 806e7d25dd Change: Use GUITimer class instead of bare int/uints. 2019-01-11 11:56:21 +00:00
Peter Nelson 2a8fa5fef9 Change: Split up Window::OnTick into OnGameTick and OnRealtimeTick. Adjust timers to work with milliseconds instead of ticks. 2019-01-11 11:56:21 +00:00
michi_cc da09fd3077 (svn r25681) -Change: [Win32] Position the IME composition window at the caret position. 2013-08-05 20:37:14 +00:00
michi_cc 923eb009e8 (svn r25667) -Fix: [Win32] Only forward key presses to the IME system if an edit box has the input focus. 2013-08-05 20:36:20 +00:00
frosch 946749fb01 (svn r24089) -Fix [FS#5136]: Conflicting strategies for resizing the main toolbar and statusbar after resizing the main window. 2012-04-03 20:09:41 +00:00
alberth 4af8c2d5e1 (svn r23704) -Doc: Doxygen comment fixes and additions. 2012-01-01 17:22:32 +00:00
frosch 51ddbbb13d (svn r22242) -Codechange: Let OnInvalidateData() decide itself what to do immediately in command scope, and what to do asynchronously in GUI-scope. 2011-03-13 21:32:13 +00:00
frosch f34e9ff074 (svn r22140) -Fix (r22135): I like the letter 'l' nevertheless. (Alberth) 2011-02-24 21:48:06 +00:00
frosch 19b7249ade (svn r22135) -Fix [FS#4523]: When commands need to invalidate windows, process these events asynchronously before the next redraw. Calling window code directly from command scope uses wrong _current_company and might issue nested DoCommands() which interfer with the running command. 2011-02-23 20:54:55 +00:00
terkhen 8196b03074 (svn r22059) -Fix (r21179): Make the send chat message window follow the position of the status bar. 2011-02-11 18:24:12 +00:00
rubidium 16c90ed48b (svn r21244) -Fix [FS#4240] (r21179): the news message always stayed in the middle; let it follow the setting of the statusbar instead 2010-11-18 19:24:40 +00:00
rubidium a9da53c106 (svn r21179) -Fix [FS#4201] (r69): if the main toolbar's location is configurable, why isn't the statusbar's location configurable? 2010-11-13 23:40:36 +00:00
rubidium 5d38d06313 (svn r18331) -Fix [FS#3334]: news items would with some chat 'bars' not be displayed fully. Fix by erikjanp. 2009-11-29 00:41:08 +00:00
alberth 0bc03c25f4 (svn r17997) -Codechange: Introduce functions for querying top and bottom of the main view. 2009-11-07 17:24:04 +00:00
rubidium 0032405093 (svn r17673) -Codechange: make InvalidateThisWindowData a function of the window class 2009-09-30 21:00:35 +00:00
frosch ebd916be3d (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 2009-09-13 19:15:59 +00:00
frosch 734edc178d (svn r17525) -Cleanup: Remove SetWindowDirty(), it is completely covered by other functions already. 2009-09-13 17:37:47 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
alberth 058bb5d6c3 (svn r16687) -Codechange: Perform re-initialization of windows with nested widgets after a language change. 2009-06-28 20:09:40 +00:00
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 2009-02-09 02:57:15 +00:00
rubidium ac7757324e (svn r15338) -Fix [FS#2598]: close all construction related windows whenever changing company. 2009-02-04 16:59:41 +00:00
rubidium b3f2f40db7 (svn r14785) -Fix [FS#2132]: vehicle list for station gets closed when station view is closed even when the vehicle list is stickied. Other vehicle lists are not deleted when their 'opening' window gets closed so do the same with the station view. 2009-01-02 20:59:04 +00:00
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 2008-09-30 20:39:50 +00:00
rubidium 935434333b (svn r13028) -Codechange: WE_MESSAGE and WE_INVALIDATE_DATA were doing the same thing. 2008-05-10 12:30:27 +00:00
rubidium 402a1e24ba (svn r12977) -Codechange: remove quite some redundant (duplicate) function declarations. 2008-05-06 22:17:12 +00:00
rubidium e6c944a6c4 (svn r12975) -Codechange: replace DeleteWindow(w) with delete w. 2008-05-06 21:28:30 +00:00
rubidium 752c8d8f2e (svn r12790) -Codechange: code style fixes. Patch by Alberth. 2008-04-19 13:28:48 +00:00
rubidium ee02dd7dad (svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth. 2008-04-07 20:28:58 +00:00
glx b7f50533c2 (svn r11914) -Documentation: fix some @file statement 2008-01-18 03:48:29 +00:00
rubidium ac528411df (svn r11818) -Codechange: split player.h into smaller pieces. 2008-01-12 14:10:35 +00:00
rubidium 429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 2007-12-25 11:26:07 +00:00
rubidium d582aea639 (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found. 2007-12-19 20:45:46 +00:00
rubidium 8896bea306 (svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps. 2007-12-19 19:44:29 +00:00