Commit Graph

638 Commits (86cb184eb4401b2cd77fa2404cac8dcec6b9a7cf)

Author SHA1 Message Date
Rubidium 86cb184eb4 Codechange: use std::source_location over __FILE__ and __LINE__ for WindowDesc 3 months ago
Peter Nelson 912d7bd80e Codechange: Give ColourShade values names instead of numbers. 3 months ago
Peter Nelson ae3390fe48 Codechange: Add ColourShade enum. 3 months ago
Peter Nelson 0463d4c198 Codechange: Remove direct access to _colour_gradient.
Access is now through GetColourGradient, which ensures parameters are in range.
3 months ago
Rubidium 4c117dd2d8 Revert #11993: new number format system does not and cannot work for CJK languages
There are too many intricacies that I am unaware of that are popping up after
asking whether things are right or not.
I do not want to keep playing whack-a-mole, so just revert the whole thing.

This reverts:
15be383b93
360fe8b0b6
1aa9a5c0ab
59f56941e5
7e2eefb91f
b741b2ba6f
609d0071d5
9f8fd80112
a253205b93
819c6c756e
3 months ago
Rubidium 15be383b93 Fix a253205: remove (now) unused currency separator 4 months ago
Patric Stout 839f2e025c
Fix: visually also disable vsync when not using HW acceleration (#12066) 4 months ago
Patric Stout 849fd5ae03
Change: [Script] replace easy/medium/hard values with default value (#11959) 4 months ago
Tyler Trahan 41f2eed425
Feature: Settings to scale cargo production of towns and industries (#10606) 4 months ago
merni-ns 5a88027a19
Feature: Infinite money mode (#11902) 4 months ago
frosch 022b9e92d2 Codechange: Move settings string formatting into IntSettingDesc members. 4 months ago
Peter Nelson fef0bfcfd3
Fix: TextfileWindow called virtual methods before constructor completed. (#11889)
SetStringParameters() was called during widget tree init in the constructor.

Calls within a constructor cannot call the derived classes methods. This would result in invalid data being passed to the string system, which could then crash.
4 months ago
Tyler Trahan 21581b6ab3
Feature: Setting for minutes per calendar year (#11428) 4 months ago
Tyler Trahan fd9e72a7e7
Feature: Use real-time "wallclock" timekeeping units (#11341) 4 months ago
Patric Stout d3b2a576de
Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc (#11628) 4 months ago
Peter Nelson 7faa3848de
Change: Mark whole screen dirty when toggling font AA. (#11825) 5 months ago
Michael Lutz fd59393899
Fix #11791, e1f5be62: Run missing-glyph detection after toggling sprite font. (#11812) 5 months ago
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.
5 months ago
Jonathan G Rennison 94e74a45c2
Fix: Viewport virt coords not updated when sprite font toggled (#11784) 5 months ago
Peter Nelson 53fa54f8e9
Fix e1f5be62: Clear font cache when toggling sprite font. (#11780)
This is necessary for the sprite font height and ascender to be updated correctly.
5 months ago
Michael Lutz e1f5be6244 Add: GUI options to select sprite font and AA mode for all fonts. 5 months ago
Peter Nelson e3bb6497f7 Codechange: Don't assume game options widget is a dropdown list. 5 months ago
Peter Nelson 8ca867ef63 Codechange: Replace game options' style-breaking if-condition with switch. 5 months ago
Tyler Trahan 1e56bd1e5a
Change: Reorganize Settings menu items (#11683) 5 months ago
EmperorJake 6522351a1f Feature: Setting to disable the loading speed penalty for trains longer than the station 5 months ago
Rubidium e3f49ee7a0 Codechange: coding style fixes 5 months ago
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.
5 months ago
Tyler Trahan 2bada59193 Feature: Mode to display timetable in seconds 6 months ago
Peter Nelson 54d45a6047 Codechange: Don't keep autosave_interval in std::chrono::minutes.
This variable is saved as a setting which requires the variable type to be known, but std::chrono::minutes may vary depending on system type.

Instead, keep as uint32_t and convert to std::chrono::minutes only when setting the timer.
6 months ago
Loïc Guilloux 2a22063d77
Change: Remember the active game option window tab (#11547) 6 months ago
Peter Nelson 58c252b81a Cleanup: Remove unnecessary pressed button offset code. 6 months ago
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.
6 months ago
Peter Nelson 9a92e02fa7
Change: Add tooltips for text file buttons, and shorten Website / Readme buttons. (#11534) 6 months ago
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.)
6 months ago
rubidium42 27082f9efa Codechange: pass std::string references to OpenBrowser 6 months ago
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(...)`.
6 months ago
Peter Nelson c80fa7d752
Codechange: Simplify setting minimum width for game options dropdown lists. (#11474)
Height isn't necessary as drop down controls already have sufficient height, so we can use GetDropDownListDimension() to get the width.
7 months ago
Peter Nelson 293a26f248
Change: Use sparse padding and SETTING_BUTTON sizes for custom currency window. (#11472) 7 months ago
Peter Nelson 17ceed0241
Change: Use sparse padding for Game Options window. (#11463) 7 months ago
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.
7 months ago
Peter Nelson 18fb8e153f Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.
This is to allow unit-tests to produce more useful output.
7 months ago
frosch e81313e93e Feature: Base graphics can offer parameters for additional settings. 7 months ago
frosch 0b7ecf6102 Codechange: use the shortname as unique id to identify the base graphics in openttd.cfg. 7 months ago
frosch 97df27e41f Codechange: Store base graphics settings in a separate section in openttd.cfg. 7 months ago
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>
8 months ago
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.
8 months ago
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.
8 months ago
Peter Nelson 49dae08a3b Codechange: Add missing override specifiers. 8 months ago
frosch f40816503f Codechange: Add enum items for dynmically created setting dropdowns. 9 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 9 months ago