mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Fix positioning of "Install new track" button
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
- Fix: [#21794] Lay-down coaster cars reverse on first frames of downwards corkscrew.
|
- Fix: [#21794] Lay-down coaster cars reverse on first frames of downwards corkscrew.
|
||||||
- Fix: [#23508] Simultaneous virtual floors shown for ride and footpath.
|
- Fix: [#23508] Simultaneous virtual floors shown for ride and footpath.
|
||||||
- Fix: [#23581] [Plugin] Food/drink items given to guests have no consumption duration set.
|
- Fix: [#23581] [Plugin] Food/drink items given to guests have no consumption duration set.
|
||||||
|
- Fix: [#23591] “Install new track” button in Track Designs Manager is misaligned.
|
||||||
|
|
||||||
0.4.18 (2025-01-08)
|
0.4.18 (2025-01-08)
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ namespace OpenRCT2::Ui::Windows
|
|||||||
MakeWidget ({ 0, 43}, {WW, 357}, WindowWidgetType::Resize, WindowColour::Secondary ),
|
MakeWidget ({ 0, 43}, {WW, 357}, WindowWidgetType::Resize, WindowColour::Secondary ),
|
||||||
MakeWidget ({ 4, 60}, {288, 277}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL ),
|
MakeWidget ({ 4, 60}, {288, 277}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL ),
|
||||||
MakeWidget ({391, 45}, {114, 114}, WindowWidgetType::FlatBtn, WindowColour::Secondary ),
|
MakeWidget ({391, 45}, {114, 114}, WindowWidgetType::FlatBtn, WindowColour::Secondary ),
|
||||||
MakeWidget ({350, 22}, {122, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_INSTALL_NEW_TRACK_DESIGN, STR_INSTALL_NEW_TRACK_DESIGN_TIP ),
|
MakeWidget ({340, 22}, {122, 14}, WindowWidgetType::Button, WindowColour::Primary, STR_INSTALL_NEW_TRACK_DESIGN, STR_INSTALL_NEW_TRACK_DESIGN_TIP ),
|
||||||
MakeDropdownWidgets({470, 22}, {114, 14}, WindowWidgetType::DropdownMenu, WindowColour::Primary, STR_OBJECT_FILTER, STR_OBJECT_FILTER_TIP ),
|
MakeDropdownWidgets({470, 22}, {114, 14}, WindowWidgetType::DropdownMenu, WindowColour::Primary, STR_OBJECT_FILTER, STR_OBJECT_FILTER_TIP ),
|
||||||
MakeWidget ({ 4, 45}, {211, 14}, WindowWidgetType::TextBox, WindowColour::Secondary ),
|
MakeWidget ({ 4, 45}, {211, 14}, WindowWidgetType::TextBox, WindowColour::Secondary ),
|
||||||
MakeWidget ({218, 45}, { 70, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_OBJECT_SEARCH_CLEAR ),
|
MakeWidget ({218, 45}, { 70, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_OBJECT_SEARCH_CLEAR ),
|
||||||
@@ -858,19 +858,20 @@ namespace OpenRCT2::Ui::Windows
|
|||||||
widgets[WIDX_LIST].bottom = height - 14;
|
widgets[WIDX_LIST].bottom = height - 14;
|
||||||
widgets[WIDX_PREVIEW].left = width - 209;
|
widgets[WIDX_PREVIEW].left = width - 209;
|
||||||
widgets[WIDX_PREVIEW].right = width - 96;
|
widgets[WIDX_PREVIEW].right = width - 96;
|
||||||
ResizeDropdown(WIDX_FILTER_DROPDOWN, { width - kFilterWidth - 10, 22 }, { kFilterWidth, 14 });
|
|
||||||
widgets[WIDX_INSTALL_TRACK].left = width - 250;
|
|
||||||
widgets[WIDX_INSTALL_TRACK].right = width - 137;
|
|
||||||
widgets[WIDX_RELOAD_OBJECT].left = width - 9 - 24;
|
widgets[WIDX_RELOAD_OBJECT].left = width - 9 - 24;
|
||||||
widgets[WIDX_RELOAD_OBJECT].right = width - 9;
|
widgets[WIDX_RELOAD_OBJECT].right = width - 9;
|
||||||
|
|
||||||
|
auto& dropdownWidget = widgets[WIDX_FILTER_DROPDOWN];
|
||||||
|
ResizeDropdown(WIDX_FILTER_DROPDOWN, { width - kFilterWidth - 10, dropdownWidget.top }, { kFilterWidth, 14 });
|
||||||
|
auto& installTrackWidget = widgets[WIDX_INSTALL_TRACK];
|
||||||
|
installTrackWidget.moveToX(dropdownWidget.left - installTrackWidget.width() - 10);
|
||||||
|
|
||||||
// Set pressed widgets
|
// Set pressed widgets
|
||||||
pressed_widgets |= 1uLL << WIDX_PREVIEW;
|
pressed_widgets |= 1uLL << WIDX_PREVIEW;
|
||||||
SetPressedTab();
|
SetPressedTab();
|
||||||
|
|
||||||
// Set window title and buttons
|
// Set window title and buttons
|
||||||
auto& titleWidget = widgets[WIDX_TITLE];
|
auto& titleWidget = widgets[WIDX_TITLE];
|
||||||
auto& installTrackWidget = widgets[WIDX_INSTALL_TRACK];
|
|
||||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)
|
if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)
|
||||||
{
|
{
|
||||||
titleWidget.text = STR_TRACK_DESIGNS_MANAGER_SELECT_RIDE_TYPE;
|
titleWidget.text = STR_TRACK_DESIGNS_MANAGER_SELECT_RIDE_TYPE;
|
||||||
|
|||||||
@@ -140,6 +140,16 @@ struct Widget
|
|||||||
moveDown(coords.y - top);
|
moveDown(coords.y - top);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void moveToX(int16_t x)
|
||||||
|
{
|
||||||
|
moveRight(x - left);
|
||||||
|
}
|
||||||
|
|
||||||
|
void moveToY(int16_t y)
|
||||||
|
{
|
||||||
|
moveDown(y - top);
|
||||||
|
}
|
||||||
|
|
||||||
bool IsVisible() const
|
bool IsVisible() const
|
||||||
{
|
{
|
||||||
return !(flags & OpenRCT2::WIDGET_FLAGS::IS_HIDDEN);
|
return !(flags & OpenRCT2::WIDGET_FLAGS::IS_HIDDEN);
|
||||||
@@ -322,17 +332,17 @@ constexpr int32_t WC_TRACK_DESIGN_PLACE__WIDX_ROTATE = 3;
|
|||||||
constexpr int32_t WC_EDITOR_PARK_ENTRANCE__WIDX_ROTATE_ENTRANCE_BUTTON = 6;
|
constexpr int32_t WC_EDITOR_PARK_ENTRANCE__WIDX_ROTATE_ENTRANCE_BUTTON = 6;
|
||||||
constexpr int32_t WC_EDITOR_OBJECT_SELECTION__WIDX_TAB_1 = 22;
|
constexpr int32_t WC_EDITOR_OBJECT_SELECTION__WIDX_TAB_1 = 22;
|
||||||
constexpr int32_t WC_STAFF__WIDX_PICKUP = 9;
|
constexpr int32_t WC_STAFF__WIDX_PICKUP = 9;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE = 13;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE = 15;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_COPY = 16;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_COPY = 18;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_PASTE = 15;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_PASTE = 17;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_SORT = 14;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_SORT = 16;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_REMOVE = 10;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_REMOVE = 12;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_UP = 11;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_UP = 13;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_DOWN = 12;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_BUTTON_MOVE_DOWN = 14;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_X_INCREASE = 5;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_X_INCREASE = 6;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_X_DECREASE = 6;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_X_DECREASE = 7;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_Y_INCREASE = 8;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_Y_INCREASE = 10;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_Y_DECREASE = 9;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SPINNER_Y_DECREASE = 11;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_SURFACE = EnumValue(TileInspectorPage::Surface);
|
constexpr int32_t WC_TILE_INSPECTOR__TILE_INSPECTOR_PAGE_SURFACE = EnumValue(TileInspectorPage::Surface);
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SURFACE_SPINNER_HEIGHT_INCREASE = 27;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SURFACE_SPINNER_HEIGHT_INCREASE = 27;
|
||||||
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SURFACE_SPINNER_HEIGHT_DECREASE = 28;
|
constexpr int32_t WC_TILE_INSPECTOR__WIDX_SURFACE_SPINNER_HEIGHT_DECREASE = 28;
|
||||||
|
|||||||
Reference in New Issue
Block a user