Commit Graph

16 Commits

Author SHA1 Message Date
Peter Nelson 1b127628cb
Codechange: Use dynamic_cast with FindWindowById. (#12458)
Missed from 74e09ab.
2024-04-08 22:32:57 +01:00
Peter Nelson d683ec0183
Codechange: Move dropdown and slider out of widgets directory. (#12403)
Also shuffle headers to place widget includes near end.

This leaves the widgets directory solely for defining Widget IDs.
2024-03-31 19:37:16 +01:00
Rubidium 86cb184eb4 Codechange: use std::source_location over __FILE__ and __LINE__ for WindowDesc 2024-03-10 10:14:20 +01: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
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 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
frosch 39e67b6f4c Codechange: Use existing widget ids instead of raw numbers. 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
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
Tyler Trahan 08cb5ba2cd
Fix: Don't show screenshot GUI in screenshots (#9674) 2021-11-07 17:41:24 +01:00
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
TechGeekNZ 3c8d0aa354 Cleanup: Give `TakeScreenshot` a more sensible name 2020-06-27 14:19:35 +01:00
TechGeekNZ ed6f31f601 Cleanup: Remove redundant implementation of TakeScreenshot 2020-06-27 14:19:35 +01:00
JMcKiern 6dfe5c852e Fix #7927: Incorrect resolution shown in "Huge screenshot" query window. (#7949) 2020-01-18 23:05:51 +01:00
TELK e04ca904a9 Feature: Minimap screenshot 2020-01-04 18:21:38 +01:00
pnda e558aa8ff4 Feature: Screenshot window 2020-01-01 10:19:12 +00:00