Peter Nelson
c2d92433c6
Codechange: Use std::initializer_list for NWidgetPart data. ( #14749 )
...
Avoids using C/C++ arrays.
2025-12-08 20:20:01 +05:00
dP
8404c2a7cc
Merge remote-tracking branch 'upstream/master'
2025-09-28 02:33:49 +05:00
dP
f0f93c68ca
Merge remote-tracking branch 'upstream/master'
2025-06-14 17:01:17 +05:00
dP
df3a6e321f
Merge remote-tracking branch 'upstream/master'
2025-05-14 18:41:13 +05:00
Peter Nelson
3e608b5fe4
Fix: Zoom-scroll extra viewports only if the mouse cursor is over the viewport. ( #14209 )
2025-05-04 14:16:05 +01:00
frosch
8571af9833
Codechange: Turn ZoomLevel into enum class.
2025-05-03 23:21:09 +02:00
Peter Nelson
8275bbfb87
Codechange: Pass Viewport by reference.
...
This means we do not have to care what type of pointer is used.
2025-04-09 22:03:23 +01:00
Peter Nelson
a65db3be0d
Codechange: Move to GetWidgetString for viewport window.
2025-03-03 21:24:18 +00:00
Rubidium
fd4adc55e3
Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
2025-02-16 20:23:00 +01:00
Peter Nelson
28eb5e05c8
Codechange: Use EnumBitSet for NWidContainerFlags.
2025-02-06 19:43:35 +00:00
Peter Nelson
d30e8dd1c1
Codechange: Use EnumBitSet for WindowDefaultFlags.
2025-01-30 08:40:42 +00:00
Rubidium
d8d03212b8
Codechange: replace SetDataTip(SPR_ with SetSpriteTip(STR_
2025-01-02 23:28:43 +01:00
Rubidium
4bf36e3fa6
Codechange: replace SetDataTip(STR_ with SetStringTip(STR_
2025-01-02 23:28:43 +01:00
Peter Nelson
0e1002bca6
Codechange: Use _TOOLTIP instead of _TT suffix for tooltip StringIDs.
2025-01-01 02:28:08 +00:00
dP
a86fd7c621
Update to 15.0-beta1
2024-12-25 20:34:06 +05:00
Steve Goldman
c53ed9fad6
Codechange: Creating enum for 'scrollwheel_scrolling' setting
2024-06-24 21:56:26 +02:00
Peter Nelson
55314513ce
Codechange: Pass NWidgetParts as span instead of begin/end pointers. ( #12779 )
2024-06-12 23:08:35 +01:00
Peter Nelson
4cf6d1dd79
Codechange: Pass WindowDesc by reference instead of pointer. ( #12771 )
...
WindowDesc as passed to Windows is not optional so don't allow to it to be nullptr.
2024-06-11 08:58:03 +01:00
dP
06a70c3b7d
Fix all the gcc warnings
2024-05-05 21:50:54 +05:00
Rubidium
86cb184eb4
Codechange: use std::source_location over __FILE__ and __LINE__ for WindowDesc
2024-03-10 10:14:20 +01:00
dP
a853d1a379
Fix a bunch more compile warnings
2024-02-19 17:56:28 +05:30
dP
cdd69a496d
Fix compilation errors
2024-02-06 20:35:28 +05:30
dP
645bfaffbd
Merge remote-tracking branch 'upstream/master'
2024-02-04 22:50:08 +05:30
dP
33ef333b57
Update to 14.0-beta1
2024-02-04 02:18:17 +05:30
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
6c5aeae01b
Fix #11577 : Extra viewport opened in wrong location. ( #11578 )
...
ExtraViewportWindow calls IninitializeViewport() with focus as 0, which is ambiguous as focus should be either a TileIndex or a VehicleID.
Instead, pass the tile and let InitializeViewport() handle setting all the coordinates.
2023-12-13 02:19:16 +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
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
PeterN
5f99c8c4aa
Fix: Extra viewport cannot be scrolled with right-click-close. ( #10644 )
2023-04-12 19:14:48 +00:00
Rubidium
bcfe0fb076
Codechange: introduce GetMainWindow() to properly account for nullptr checks
...
Some nullptr checks have been removed as they were not triggered with nullptr
with the null video driver and in dedicated server mode.
2023-01-14 21:15:23 +01:00
Pavel Stupnikov
f3ecdf6f7f
Merge remote-tracking branch 'upstream/master' into 13.0
2022-11-26 22:16:25 +04:00
Pavel Stupnikov
be23283677
Update to 13.0-beta1
2022-11-23 14:30:36 +04:00
Bouke Haarsma
93d2d4590f
Fix #9995 : Adjust viewport zoom level for HiDPI displays
...
On HiDPI screens the zoom level is increased for detailed rendering. This causes hard-coded zoom levels to be off by this adjustment. To fix these default zoom levels, we scale the zoom level based on `_gui_zoom` to get the scaled zoom level.
2022-10-18 22:03:21 +02:00
dP
6f44e08cba
Fix return type of citymania::ShowExtraViewportWindow
2022-08-29 14:12:47 +03:00
dP
3c43becb61
Add location button to watch window title
2021-11-09 19:16:01 +03:00
dP
c47930887b
Merge remote-tracking branch 'upstream/1.11' into 1.11
2021-01-25 22:53:44 +03:00
dP
5e4506f493
Update to 1.11.0-beta1
2021-01-23 17:31:11 +03: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
dP
1492a22027
Update to 1.10.0-beta2
2020-01-06 19:06:51 +03:00
dP
c7c3966eec
Update to 1.10.0-beta2
2020-01-06 18:49:34 +03:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
dP
ceea4c88be
Merge 1.10.0-beta1
2019-11-01 16:08:44 +03:00
dP
599ccf0c2b
Update to 1.10.0-beta1
2019-10-31 22:24:28 +03:00
dP
b84a475e14
Initialize with OpenTTD 1.9.3
2019-10-31 21:58:04 +03:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
2019-03-24 16:10:04 +01:00
Pavel Stupnikov
6e2a54355a
Merge 1.9.0-beta2
2019-02-14 00:47:22 +03:00
Pavel Stupnikov
2bda8d4f34
Update to OpenTTD 1.9.0-beta2
...
--HG--
branch : openttd
2019-02-13 15:17:23 +03:00