Commit Graph

285 Commits (56085be9bda8d5682c15544a058d988a6ae00b3b)

Author SHA1 Message Date
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 1 year ago
Patric Stout 60399e17bd Codechange: C++-ify the Layouter and related functions
They all now access a std::string_view, instead of a "const char *"
or std::string (in some cases).

Additionally, GetCharAtPosition and friends now return an index
instead of a "const char *", as it makes for a more clear interface.
1 year ago
Rubidium 68ff3fd062 Change: include fmt.h C++ headers in stdafx.h
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
1 year ago
Peter Nelson 35ba49bfb4 Change: Rename text colour NWidgetPart to SetTextStyle and add font size.
This allows to set both text colour and size for any widget with default
drawing.
1 year ago
Peter Nelson e8df28d7f3 Add: parameter for ReInit() to reposition window to default. 1 year ago
Patric Stout 1ba4dcc924 Codechange: migrate all Window-related timers to the new framework
This means we also say goodbye to GUITimers.
1 year ago
PeterN 23eec0b7b3
Fix #8971: Resize QueryStrings with interface scale change. (#10281)
* Fix: Use width of caret symbol '_' for text entry.

This replaces an arbitrary pixel width with the space actually required.

* Fix #8971: Update QueryString sizes with interface scale change.
1 year ago
Bernard Teo 8a78fa7121
Feature: Contextual actions for vehicles grouped by shared orders (#8425) 2 years ago
Peter Nelson ecb5393c55 Change: Standardize progress bar layout.
Progress bars are drawn differently depending on when it was added, with
different layouts and sizes.

This change adds a standard padding size to use, and makes all progress
bars visually similar, with scaled padding.
2 years ago
Peter Nelson e554fd7808 Change: Hide WidgetDrawDistances from general use. 2 years ago
Peter Nelson 890b2666d3 Change: Use scaled WidgetDimensions. 2 years ago
Peter Nelson 23a8222200 Change: Split vscroll and hscroll padding.
Vertical and horizontal scrollbars are different sizes, this allows
different padding for each type.
2 years ago
Peter Nelson b5693becdc Add: Define scaled WidgetDimensions.
Includes RectPadding container.
2 years ago
Peter Nelson 17d1fe26c2 Codechange: Helpers to allow passing a Rect to some functions. 2 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 3 years ago
frosch f6d5c0136e Codechange: make Window destruction not rely on undefined behavior. 3 years ago
frosch f96f113951 Codechange: use IterateFromBack/Front only if the order is important.
Use Iterate if the order does not matter.
3 years ago
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.
3 years ago
frosch aba239479b Codechange: remove excessive templating in favour of a single const_cast.
The const_cast will be removed again in a later commit.
3 years ago
glx22 14e92bd8e2 Codechange: Replace window related FOR_ALL with range-based for loops 3 years ago
Peter Nelson 51b4bd6c38 Codechange: Add widget text colour override property. 3 years ago
Peter Nelson 636e37d183 Codechange: Add internal widget alignment property, along with widget part. 3 years ago
Jonathan G Rennison 3ede756d23 Fix: Viewport drag tooltips not being removed when dragging over other windows 3 years ago
glx c0d7949d7c Fix: Don't use a timer for hundredth tick determination 3 years ago
Niels Martin Hansen 2d9fa81bd0 Feature: Plant clumps of trees in editor by dragging on the landscape 3 years ago
TechGeekNZ a10013dd00 Codechange: Spell 'Viewport' consistently
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jonathan G Rennison 81f159434d Codechange: Add EditBoxGainedFocus method to VideoDriver base class 5 years ago
glx 410b81537c Fix 801cbea9c: operator< is not always the best idea
Also removes unused and anyway broken SmallMap::SortByKey() function.
5 years ago
glx 801cbea9cc Codechange: use std::sort() for all std::vector types 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 5 years ago
peter1138 f5f33da126 Codechange: Implement OnTooltip event for custom window tooltips.
This avoids windows from needing to know or care about tooltip delay settings.
5 years ago
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.
5 years ago
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.
5 years ago
Peter Nelson 2a8fa5fef9 Change: Split up Window::OnTick into OnGameTick and OnRealtimeTick. Adjust timers to work with milliseconds instead of ticks. 5 years ago
frosch 1cf09f804b (svn r27147) -Fix: Scale (non-custom) default window sizes according to GUI zoom. 9 years ago
frosch e113f5e4a1 (svn r27146) -Fix: Make statusbar and chat-entry window use the same width as the toolbar. Otherwise they lack a size definition. 9 years ago
alberth 78896895cf (svn r27085) -Fix: Always return a valid window to the world generation gui code. 10 years ago
alberth edea2ce96d (svn r27084) -Doc: Improve documentation of AllocateWindowDescFront. 10 years ago
peter1138 0877f892c5 (svn r26960) -Codechange: Draw sort button symbols as sprites, and pad sort buttons with non-static width. 10 years ago
frosch 12ddbb7cb1 (svn r25864) -Fix: Use the actual sprite dimensions for sizing the dropdown arrow of dropdown widgets. 11 years ago
michi_cc d15c1c5d4a (svn r25692) -Add: Replacement of a part of the edit box text with a new string. 11 years ago
michi_cc 30867c487f (svn r25691) -Add: [OSX] Support for mouse selection in the IME composition string. 11 years ago
michi_cc e2ec0ddb03 (svn r25690) -Change: [OSX] Position the candidate window at the caret position. 11 years ago
michi_cc f5e4131492 (svn r25689) -Add: [OSX] Display the IME composition string ourself. 11 years ago
michi_cc 0883cf76e3 (svn r25684) -Change: [Win32] Draw the composition string ourselves if possible. 11 years ago
michi_cc da09fd3077 (svn r25681) -Change: [Win32] Position the IME composition window at the caret position. 11 years ago
michi_cc 7422120014 (svn r25679) -Codechange: [Win32] Get the result string of an IME input directly without a trip through the window messaging system. 11 years ago