Tyler Trahan
f6dd5053a3
Feature: Order flag to unbunch vehicles at depot ( #11945 )
2024-02-03 08:04:24 -05:00
Tyler Trahan
f2db624e85
Change: Add dividers between signal groups ( #11897 )
2024-02-02 15:52:20 -05:00
frosch
bd3d687bf9
Codechange: Merge all BaseGraphWindow widget enums into one.
...
Previously it relied on some enum entries using the same integer value.
2024-01-28 14:44:24 +01:00
Tyler Trahan
86981c0983
Fix: Extra refit button when train/RV is in a depot ( #11904 )
2024-01-28 08:01:09 -05:00
Tyler Trahan
fd9e72a7e7
Feature: Use real-time "wallclock" timekeeping units ( #11341 )
2024-01-23 11:36:09 -05:00
Patric Stout
d3b2a576de
Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc ( #11628 )
2024-01-22 19:22:45 +00:00
Peter Nelson
7737aa6640
Codechange: Make all NWidgetPart arrays constexpr.
...
This ensures that the arrays are not created at runtime and prevents using non-constexpr values.
2024-01-16 21:57:05 +00:00
Michael Lutz
e1f5be6244
Add: GUI options to select sprite font and AA mode for all fonts.
2024-01-14 22:50:56 +01:00
Rubidium
e3f49ee7a0
Codechange: coding style fixes
2024-01-04 16:23:54 +01:00
Peter Nelson
268e512fb8
Codechange: Set storage type of widget enums to WidgetID.
2023-12-30 00:23: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
daec0e2ca4
Codechange: Split palette handling to separate file.
2023-12-25 11:22:52 +00:00
Loïc Guilloux
2d3af14181
Add: Horizontal scroll for script debug log ( #11597 )
2023-12-20 22:50:03 +01:00
Peter Nelson
09251d993c
Change: Use sparse padding for network server list. ( #11571 )
2023-12-10 14:48:58 +00:00
Peter Nelson
a29766d6cc
Codechange: Move dropdown list size and position calculation to window.
...
This simplifies initialization of DropdownWindow, as instead of both the caller code and the class needing to know about list sizes and available space, only the DropdownWindow needs to know.
2023-12-09 08:12:34 +00:00
Peter Nelson
f1cceb43a1
Codechange: Move initialization of DropdownWindow members.
2023-12-09 08:12:34 +00:00
Peter Nelson
52b121942b
Codechange: DropdownWindow's selected_index is not actually an index.
2023-12-09 08:12:34 +00:00
Peter Nelson
60565da8f9
Codechange: Add specific WidgetDimension for dropdown list window. ( #11554 )
...
This avoids contorting fullbevel dimensions.
2023-12-07 16:10:09 +00:00
Peter Nelson
89461b5561
Codechange: Don't highlight unselectable dropdown item. ( #11553 )
2023-12-07 16:09:45 +00:00
Peter Nelson
0434c1b474
Feature: (-tte) Add zoom level buttons to sprite aligner.
...
This allows for offsets to be adjusted a different zoom level than currently in use, and offset adjustment and display is also more convenient.
2023-12-04 08:14:02 +00:00
Peter Nelson
1084ab4b66
Add: Website button to Game Options window for basesets.
...
This links to the optional "url" item in the baseset's [metadata] section.
2023-12-03 18:52:33 +00:00
Peter Nelson
2272e8fe0e
Add: Website button for Game Script settings window.
2023-12-03 18:52:33 +00:00
Peter Nelson
f60c14a682
Add: Website button for AI settings window.
2023-12-03 18:52:33 +00:00
Peter Nelson
8db7c79e79
Codechange: Add DropDownIcon constructor to override dimension.
...
This avoids the need to construct a DropDownIcon and set the dimension after.
2023-12-02 15:23:05 +00:00
Peter Nelson
49532914dd
Change: Use CRTP-mixins to compose dropdown list items.
...
This allows list items to built from component parts as required, and additional
functionality is added:
* Icons and text can be positioned at the start or end of the space (templated.)
* Font size of text can be changed (templated.)
* Palette of sprites can be set (runtime.)
2023-12-02 15:23:05 +00:00
Peter Nelson
5489b9fc0c
Codechange: Undo #11447 , drop down list divider lines are now explicit.
2023-11-25 16:45:01 +00:00
Peter Nelson
c18a1494b7
Codechange: Remove FONT_HEIGHT_... macros. ( #11481 )
...
These make it look like we're dealing with a constant, but actually each is a call to `GetCharacterHeight(...)`.
2023-11-21 19:04:24 +00:00
Peter Nelson
08dfe35442
Codechange: Move DropDownList height and width calculation to helper.
2023-11-13 21:30:46 +00:00
Peter Nelson
c877494f7a
Codechange: Simplify autoreplace rail/road types by using separate widget. ( #11457 )
...
This avoids needing to determine which type of list to deal with by additionally checking the window number for VEH_TRAIN/VEH_ROAD.
2023-11-13 12:32:34 +00:00
Peter Nelson
bd2ddb07ca
Change: Move baseset missing/corrupted files label to list item. ( #11455 )
...
This allows any baseset error to be displayed in the drop down list so it is more easily visible, and avoids wasted space in the layout.
2023-11-10 12:25:56 +00:00
Peter Nelson
842cf87765
Change: Bring airport picker inline with other pickers.
2023-11-07 18:27:51 +00:00
Peter Nelson
db18f60beb
Change: Improve layout of road/tram stop pickers.
2023-11-07 18:27:51 +00:00
Peter Nelson
136551408c
Change: Show empty string drop down entries as divider. ( #11447 )
2023-11-06 22:35:01 +00:00
Peter Nelson
badce415ea
Change: Add horizontal scrollbar to Industry Directory window.
...
This list could be very wide depending on industries and language.
2023-11-05 22:22:32 +00:00
Peter Nelson
18fb8e153f
Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.
...
This is to allow unit-tests to produce more useful output.
2023-11-02 22:25:01 +00:00
Peter Nelson
d3cb6e1e67
Codechange: Call Widget::SetDirty/SetLowered directly. ( #11417 )
...
In these instances we already have the widget to hand, so don't need to look it up by index again.
2023-11-01 20:12:08 +00:00
frosch
e81313e93e
Feature: Base graphics can offer parameters for additional settings.
2023-10-31 01:41:50 +01:00
Peter Nelson
129e98fbab
Fix d42a78f: Some raw drop down list strings may need token processing. ( #11400 )
...
Storing the raw string without processing though GetString() caused token
processing to be skipped.
2023-10-28 16:08:44 +01:00
Peter Nelson
a601a1f406
Change: Use modalpopup spacing for goal question windows.
2023-10-26 12:43:20 +01:00
Bernhard Reutner-Fischer
ac42dea7b2
Codechange: Remove unused parameter for Height()
...
DropDownListItem::Height does not need to take an argument so remove it
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2023-10-21 18:53:35 +02:00
Peter Nelson
81ecbaaa33
Codechange: Hide multiplayer headers by setting width to zero.
...
Zero-width is how widgets are hidden elsewhere.
This removes the need for an extra array to lookup if a header is hidden.
2023-10-21 14:26:36 +01:00
Rubidium
f16399f4c9
Codechange: replace x.size() > 0 with !x.empty()
2023-10-20 23:05:43 +02:00
Peter Nelson
fd6f1e844a
Codechange: Avoid emplace_back(new()) into a unique_ptr. ( #11384 )
...
This could theoretically leave an unmanaged pointer in certain circumstances, and directly using
make_unique shows intent.
2023-10-20 18:40:48 +01: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
frosch
f40816503f
Codechange: Add enum items for dynmically created setting dropdowns.
2023-09-20 22:35:32 +02:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Rubidium
3a2509198f
Codechange: use better location for the "invalid" action sentinel value
...
It used to be a random sentinel for end-of-(widget-)list that was used to tell
that no action has taken place yet. Since the last action is practically the
widget that was pressed, add the sentinel to that enumeration.
2023-09-17 19:44:20 +02:00
Niels Martin Hansen
41de0d46f3
Feature: Help and manuals access window
2023-09-13 16:11:08 +02:00
Peter Nelson
e8015e497d
Codechange: Use begin/end of nwidget parts of begin/length.
...
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings.
And this removes 160~ instances of the lengthof() macro.
2023-09-04 10:20:45 +01:00
Richard Wheeler
96fdfb941a
Feature: Transparency option for cost and income indicators ( #11001 )
2023-08-25 16:04:40 +02:00