Commit Graph

270 Commits

Author SHA1 Message Date
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 2021-05-29 21:08:25 +02:00
frosch f6d5c0136e Codechange: make Window destruction not rely on undefined behavior. 2021-05-12 23:22:41 +02:00
frosch f96f113951 Codechange: use IterateFromBack/Front only if the order is important.
Use Iterate if the order does not matter.
2021-05-12 23:22:41 +02:00
frosch 22567a1f43 Codechange: use iterators instead of 'subranges' when iterating from a specific window.
Using iterators makes it easier to include or exclude the start window in the iteration.
2021-05-12 23:22:41 +02:00
frosch aba239479b Codechange: remove excessive templating in favour of a single const_cast.
The const_cast will be removed again in a later commit.
2021-05-12 23:22:41 +02:00
glx22 14e92bd8e2 Codechange: Replace window related FOR_ALL with range-based for loops 2021-04-29 21:08:24 +02:00
Peter Nelson 51b4bd6c38 Codechange: Add widget text colour override property. 2021-04-22 16:42:04 +01:00
Peter Nelson 636e37d183 Codechange: Add internal widget alignment property, along with widget part. 2021-04-22 16:42:04 +01:00
Jonathan G Rennison 3ede756d23 Fix: Viewport drag tooltips not being removed when dragging over other windows 2021-04-08 19:34:45 +02:00
glx c0d7949d7c Fix: Don't use a timer for hundredth tick determination 2021-01-10 14:07:17 +01:00
Niels Martin Hansen 2d9fa81bd0 Feature: Plant clumps of trees in editor by dragging on the landscape 2020-12-27 01:03:27 +01:00
TechGeekNZ a10013dd00 Codechange: Spell 'Viewport' consistently
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
2020-07-27 17:31:29 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Jonathan G Rennison 81f159434d Codechange: Add EditBoxGainedFocus method to VideoDriver base class 2019-11-10 17:58:42 +00:00
glx 410b81537c Fix 801cbea9c: operator< is not always the best idea
Also removes unused and anyway broken SmallMap::SortByKey() function.
2019-04-13 21:05:25 +02:00
glx 801cbea9cc Codechange: use std::sort() for all std::vector types 2019-04-13 12:49:18 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 2019-03-26 20:15:57 +00:00
peter1138 f5f33da126 Codechange: Implement OnTooltip event for custom window tooltips.
This avoids windows from needing to know or care about tooltip delay settings.
2019-03-20 23:00:32 +00:00
peter1138 4da83d2f66 Fix #7386: Measurement tooltip for tunnels, aqueducts & docks did not display or flickered.
Measurement tooltip was auto-closed as the hover/right-click test for tooltips was not
satisfied in this case. This is fixed by keeping the tooltip visible and instead explicitly
closing the tooltip when the PlaceObject is cancelled/completed.
2019-03-20 23:00:32 +00:00
Peter Nelson de9f54ccc1 Codechange: Change scrolling_scrollbar to mouse_capture_widget, and dispatch OnClick() event if widget is not a scrollbar.
This allows any widget to support mouse capture.
2019-02-21 08:11:35 +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
frosch 1cf09f804b (svn r27147) -Fix: Scale (non-custom) default window sizes according to GUI zoom. 2015-02-13 21:25:48 +00:00
frosch e113f5e4a1 (svn r27146) -Fix: Make statusbar and chat-entry window use the same width as the toolbar. Otherwise they lack a size definition. 2015-02-13 21:13:45 +00:00
alberth 78896895cf (svn r27085) -Fix: Always return a valid window to the world generation gui code. 2014-12-18 18:20:59 +00:00
alberth edea2ce96d (svn r27084) -Doc: Improve documentation of AllocateWindowDescFront. 2014-12-18 16:50:11 +00:00
peter1138 0877f892c5 (svn r26960) -Codechange: Draw sort button symbols as sprites, and pad sort buttons with non-static width. 2014-10-05 11:20:02 +00:00
frosch 12ddbb7cb1 (svn r25864) -Fix: Use the actual sprite dimensions for sizing the dropdown arrow of dropdown widgets. 2013-10-13 19:18:30 +00:00
michi_cc d15c1c5d4a (svn r25692) -Add: Replacement of a part of the edit box text with a new string. 2013-08-05 20:37:57 +00:00
michi_cc 30867c487f (svn r25691) -Add: [OSX] Support for mouse selection in the IME composition string. 2013-08-05 20:37:53 +00:00
michi_cc e2ec0ddb03 (svn r25690) -Change: [OSX] Position the candidate window at the caret position. 2013-08-05 20:37:48 +00:00
michi_cc f5e4131492 (svn r25689) -Add: [OSX] Display the IME composition string ourself. 2013-08-05 20:37:44 +00:00
michi_cc 0883cf76e3 (svn r25684) -Change: [Win32] Draw the composition string ourselves if possible. 2013-08-05 20:37:25 +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 7422120014 (svn r25679) -Codechange: [Win32] Get the result string of an IME input directly without a trip through the window messaging system. 2013-08-05 20:37:06 +00:00
michi_cc 13873d2534 (svn r25678) -Codechange: Notify the video driver when an edit box lost (global) focus so it can abort any current input composition. 2013-08-05 20:37:02 +00:00
michi_cc 270d8aa639 (svn r25670) -Codechange: Pass UCS-4 characters to the edit box key handler. 2013-08-05 20:36:32 +00:00
michi_cc b911f4a452 (svn r25668) -Codechange: Pass proper Unicode UCS-4 characters instead of just UCS-2 to the window key press handlers. 2013-08-05 20:36:24 +00:00
frosch fef30983e6 (svn r25414) -Codechange: Move handling of global hotkeys to HotkeyList. 2013-06-15 15:31:22 +00:00
frosch 6291383823 (svn r25411) -Add: Window::OnHotkey 2013-06-15 15:30:16 +00:00
frosch 18ae9c78bc (svn r25402) -Fix-ish: Prevent copying of BasePool and WindowDesc, since they register in static vectors. 2013-06-15 15:06:22 +00:00
frosch 05c472f08a (svn r25295) -Feature: Allow saving window sizes as default sizes. 2013-05-26 19:30:31 +00:00
frosch 4e4e635916 (svn r25294) -Feature: Add another button to window title bars to resize the window to its default size. 2013-05-26 19:30:07 +00:00
frosch ed851034f5 (svn r25292) -Feature: Save stickyness of windows when Ctrl+Clicking the sticky button. 2013-05-26 19:27:44 +00:00
frosch 23ba42b66c (svn r25291) -Add: WindowDesc ability to load and store information in a config file. 2013-05-26 19:27:22 +00:00
frosch 8157a8afd8 (svn r25290) -Add: Assign string names to notable windows. 2013-05-26 19:25:01 +00:00
frosch b6d76c4d4c (svn r25288) -Codechange: No need to copy the WindowDesc flags if the WindowDesc is directly accessible. 2013-05-26 19:24:11 +00:00
frosch 56e4a8c4d6 (svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction. 2013-05-26 19:23:42 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
glx 5d74b679e6 (svn r24780) -Fix [FS#5378]: passing an int to a function expecting a byte can have side effects when MSVC optimises it 2012-12-03 21:03:13 +00:00