mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2026-05-06 07:56:46 -04:00
* Fix #26460: Delete, build, forward and backward buttons in Ride Construction window are always held * Fix #26462: Opening Tile Inspector crashes the game
This commit is contained in:
@@ -2079,7 +2079,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
WIDX_BANKING_GROUPBOX, WIDX_CONSTRUCT, WIDX_DEMOLISH, WIDX_PREVIOUS_SECTION,
|
||||
WIDX_NEXT_SECTION, WIDX_ENTRANCE_EXIT_GROUPBOX, WIDX_ENTRANCE, WIDX_EXIT })
|
||||
{
|
||||
if (isWidgetPressed(preservedIndex))
|
||||
if (widgets[preservedIndex].flags.has(WidgetFlag::isPressed))
|
||||
newPressedWidgets |= (1uLL << preservedIndex);
|
||||
}
|
||||
|
||||
|
||||
@@ -474,16 +474,21 @@ namespace OpenRCT2::Ui::Windows
|
||||
ViewportInteractionItem::footpath, ViewportInteractionItem::pathAddition, ViewportInteractionItem::parkEntrance,
|
||||
ViewportInteractionItem::wall, ViewportInteractionItem::largeScenery, ViewportInteractionItem::banner);
|
||||
|
||||
static constexpr WidgetIndex kDisabledWidgetsDefault[] = {
|
||||
WIDX_BUTTON_MOVE_UP, WIDX_BUTTON_MOVE_DOWN, WIDX_BUTTON_REMOVE, WIDX_BUTTON_ROTATE, WIDX_BUTTON_COPY,
|
||||
};
|
||||
static constexpr WidgetIndex kDisabledWidgetsLargeScenery[] = { WIDX_BUTTON_ROTATE };
|
||||
|
||||
// clang-format off
|
||||
static constexpr std::initializer_list<WidgetIndex> kDisabledWidgetsByPage[] = {
|
||||
{ WIDX_BUTTON_MOVE_UP, WIDX_BUTTON_MOVE_DOWN, WIDX_BUTTON_REMOVE, WIDX_BUTTON_ROTATE, WIDX_BUTTON_COPY },
|
||||
static constexpr std::span<const WidgetIndex> kDisabledWidgetsByPage[] = {
|
||||
kDisabledWidgetsDefault,
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{ WIDX_BUTTON_ROTATE },
|
||||
kDisabledWidgetsLargeScenery,
|
||||
{},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
Reference in New Issue
Block a user