mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 17:42:29 +01:00
Merge pull request #23591 from Gymnasiast/small-window-fixes
Small window fixes
This commit is contained in:
@@ -3788,3 +3788,5 @@ STR_6721 :At least one mechanic peep animations object must be selected
|
|||||||
STR_6722 :At least one security peep animations object must be selected
|
STR_6722 :At least one security peep animations object must be selected
|
||||||
STR_6723 :At least one entertainer peep animations object must be selected
|
STR_6723 :At least one entertainer peep animations object must be selected
|
||||||
STR_6724 :Scenario Texts
|
STR_6724 :Scenario Texts
|
||||||
|
STR_6725 :X:
|
||||||
|
STR_6726 :Y:
|
||||||
|
|||||||
@@ -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)
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -2102,6 +2102,8 @@ namespace OpenRCT2
|
|||||||
STR_TILE_INSPECTOR_WALL_SLOPED_LEFT = 5977,
|
STR_TILE_INSPECTOR_WALL_SLOPED_LEFT = 5977,
|
||||||
STR_TILE_INSPECTOR_WALL_SLOPED_RIGHT = 5978,
|
STR_TILE_INSPECTOR_WALL_SLOPED_RIGHT = 5978,
|
||||||
STR_TILE_INSPECTOR_WALL_TYPE = 5979,
|
STR_TILE_INSPECTOR_WALL_TYPE = 5979,
|
||||||
|
STR_TILE_INSPECTOR_X_LABEL = 6725,
|
||||||
|
STR_TILE_INSPECTOR_Y_LABEL = 6726,
|
||||||
|
|
||||||
// Window: TitleExit
|
// Window: TitleExit
|
||||||
STR_EXIT = 1924,
|
STR_EXIT = 1924,
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -79,9 +79,11 @@ namespace OpenRCT2::Ui::Windows
|
|||||||
WIDX_TITLE,
|
WIDX_TITLE,
|
||||||
WIDX_CLOSE,
|
WIDX_CLOSE,
|
||||||
WIDX_LIST,
|
WIDX_LIST,
|
||||||
|
WIDX_SPINNER_X_LABEL,
|
||||||
WIDX_SPINNER_X,
|
WIDX_SPINNER_X,
|
||||||
WIDX_SPINNER_X_INCREASE,
|
WIDX_SPINNER_X_INCREASE,
|
||||||
WIDX_SPINNER_X_DECREASE,
|
WIDX_SPINNER_X_DECREASE,
|
||||||
|
WIDX_SPINNER_Y_LABEL,
|
||||||
WIDX_SPINNER_Y,
|
WIDX_SPINNER_Y,
|
||||||
WIDX_SPINNER_Y_INCREASE,
|
WIDX_SPINNER_Y_INCREASE,
|
||||||
WIDX_SPINNER_Y_DECREASE,
|
WIDX_SPINNER_Y_DECREASE,
|
||||||
@@ -262,8 +264,10 @@ namespace OpenRCT2::Ui::Windows
|
|||||||
#define MAIN_TILE_INSPECTOR_WIDGETS \
|
#define MAIN_TILE_INSPECTOR_WIDGETS \
|
||||||
WINDOW_SHIM(WINDOW_TITLE, WW, WH), \
|
WINDOW_SHIM(WINDOW_TITLE, WW, WH), \
|
||||||
MakeWidget({3, 57}, {WW - 6, WH - PADDING_BOTTOM - 58}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL), /* Element list */ \
|
MakeWidget({3, 57}, {WW - 6, WH - PADDING_BOTTOM - 58}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL), /* Element list */ \
|
||||||
/* X and Y spinners */ \
|
/* X and Y spinners */ \
|
||||||
|
MakeWidget ({ 4, 24}, {38, 14}, WindowWidgetType::Label, WindowColour::Secondary, STR_TILE_INSPECTOR_X_LABEL), \
|
||||||
MakeSpinnerWidgets({20, 23}, {51, 12}, WindowWidgetType::Spinner, WindowColour::Secondary), /* Spinner X (3 widgets) */ \
|
MakeSpinnerWidgets({20, 23}, {51, 12}, WindowWidgetType::Spinner, WindowColour::Secondary), /* Spinner X (3 widgets) */ \
|
||||||
|
MakeWidget ({74, 24}, {38, 14}, WindowWidgetType::Label, WindowColour::Secondary, STR_TILE_INSPECTOR_Y_LABEL), \
|
||||||
MakeSpinnerWidgets({90, 23}, {51, 12}, WindowWidgetType::Spinner, WindowColour::Secondary), /* Spinner Y (3 widgets) */ \
|
MakeSpinnerWidgets({90, 23}, {51, 12}, WindowWidgetType::Spinner, WindowColour::Secondary), /* Spinner Y (3 widgets) */ \
|
||||||
/* Top buttons */ \
|
/* Top buttons */ \
|
||||||
MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 0, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_REMOVE_SELECTED_ELEMENT_TIP ), /* Remove button */ \
|
MakeWidget(ToolbarButtonAnchor + ToolbarButtonOffsetX * 0, ToolbarButtonSize, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_REMOVE_SELECTED_ELEMENT_TIP ), /* Remove button */ \
|
||||||
@@ -1046,25 +1050,25 @@ static uint64_t PageDisabledWidgets[] = {
|
|||||||
ScreenCoordsXY screenCoords(windowPos.x, windowPos.y);
|
ScreenCoordsXY screenCoords(windowPos.x, windowPos.y);
|
||||||
|
|
||||||
// Draw coordinates
|
// Draw coordinates
|
||||||
DrawText(dpi, screenCoords + ScreenCoordsXY(5, 24), { colours[1] }, "X:");
|
auto yOffset = widgets[WIDX_SPINNER_X_LABEL].top;
|
||||||
DrawText(dpi, screenCoords + ScreenCoordsXY(74, 24), { colours[1] }, "Y:");
|
|
||||||
if (_tileSelected)
|
if (_tileSelected)
|
||||||
{
|
{
|
||||||
auto tileCoords = TileCoordsXY{ _toolMap };
|
auto tileCoords = TileCoordsXY{ _toolMap };
|
||||||
auto ft = Formatter();
|
auto ft = Formatter();
|
||||||
ft.Add<int32_t>(tileCoords.x);
|
ft.Add<int32_t>(tileCoords.x);
|
||||||
DrawTextBasic(
|
DrawTextBasic(
|
||||||
dpi, screenCoords + ScreenCoordsXY{ 43, 24 }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::RIGHT });
|
dpi, screenCoords + ScreenCoordsXY{ 43, yOffset }, STR_FORMAT_INTEGER, ft,
|
||||||
|
{ colours[1], TextAlignment::RIGHT });
|
||||||
ft = Formatter();
|
ft = Formatter();
|
||||||
ft.Add<int32_t>(tileCoords.y);
|
ft.Add<int32_t>(tileCoords.y);
|
||||||
DrawTextBasic(
|
DrawTextBasic(
|
||||||
dpi, screenCoords + ScreenCoordsXY{ 113, 24 }, STR_FORMAT_INTEGER, ft,
|
dpi, screenCoords + ScreenCoordsXY{ 113, yOffset }, STR_FORMAT_INTEGER, ft,
|
||||||
{ colours[1], TextAlignment::RIGHT });
|
{ colours[1], TextAlignment::RIGHT });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DrawText(dpi, screenCoords + ScreenCoordsXY(43 - 7, 24), { colours[1] }, "-");
|
DrawText(dpi, screenCoords + ScreenCoordsXY(43 - 7, yOffset), { colours[1] }, "-");
|
||||||
DrawText(dpi, screenCoords + ScreenCoordsXY(113 - 7, 24), { colours[1] }, "-");
|
DrawText(dpi, screenCoords + ScreenCoordsXY(113 - 7, yOffset), { colours[1] }, "-");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (windowTileInspectorSelectedIndex != -1)
|
if (windowTileInspectorSelectedIndex != -1)
|
||||||
|
|||||||
@@ -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