1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

anchor bottom toolbar to window width

This commit is contained in:
IntelOrca
2014-04-15 02:36:58 +01:00
parent 98aab20369
commit 03db7f5bc0
4 changed files with 32 additions and 8 deletions

View File

@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommand>$(TargetDir)\openrct2.exe</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>
</LocalDebuggerCommandArguments>
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<PropertyGroup>
<ShowAllFiles>false</ShowAllFiles>
</PropertyGroup>
@@ -15,4 +8,9 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommand>$(TargetDir)\openrct2.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

View File

@@ -142,7 +142,7 @@ static void osinterface_resize(int width, int height)
RCT2_GLOBAL(0x009ABDEC, sint32) = (height >> 3) + 1;
RCT2_CALLPROC_EBPSAFE(0x0066B905); // resize_gui()
RCT2_CALLPROC_EBPSAFE(0x006ED7E5); // gfx_invalidate_screen()
gfx_invalidate_screen();
}
static void osinterface_update_palette(char* colours, int start_index, int num_colours)

View File

@@ -299,6 +299,7 @@ static int scenario_load_basic(char *path)
loc_67628F :
return _eax;
}
return 1;
}
CloseHandle(hFile);
}

View File

@@ -34,10 +34,12 @@ static enum WINDOW_GAME_BOTTOM_TOOLBAR_WIDGET_IDX {
WIDX_MONEY,
WIDX_GUESTS,
WIDX_PARK_RATING,
WIDX_MIDDLE_OUTSET,
WIDX_MIDDLE_INSET,
WIDX_NEWS_SUBJECT,
WIDX_NEWS_LOCATE,
WIDX_RIGHT_OUTSET,
WIDX_RIGHT_INSET,
WIDX_DATE
@@ -227,11 +229,34 @@ static void window_game_bottom_toolbar_tooltip()
*/
static void window_game_bottom_toolbar_invalidate()
{
int x;
rct_window *w;
rct_news_item *newsItem;
__asm mov w, esi
// Anchor the middle and right panel to the right
x = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16);
w->width = x;
x--;
window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right = x;
x -= 2;
window_game_bottom_toolbar_widgets[WIDX_RIGHT_INSET].right = x;
x -= 115;
window_game_bottom_toolbar_widgets[WIDX_RIGHT_INSET].left = x;
x -= 2;
window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left = x;
x--;
window_game_bottom_toolbar_widgets[WIDX_MIDDLE_OUTSET].right = x;
x -= 2;
window_game_bottom_toolbar_widgets[WIDX_MIDDLE_INSET].right = x;
x -= 3;
window_game_bottom_toolbar_widgets[WIDX_NEWS_LOCATE].right = x;
x -= 23;
window_game_bottom_toolbar_widgets[WIDX_NEWS_LOCATE].left = x;
window_game_bottom_toolbar_widgets[WIDX_DATE].left = window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left + 2;
window_game_bottom_toolbar_widgets[WIDX_DATE].right = window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right - 2;
window_game_bottom_toolbar_widgets[WIDX_LEFT_INSET].type = WWT_EMPTY;
window_game_bottom_toolbar_widgets[WIDX_RIGHT_INSET].type = WWT_EMPTY;