static void shortcut_remove_top_bottom_toolbar_toggle()
{
	if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO)
		return;

	if (window_find_by_class(WC_TOP_TOOLBAR) != NULL) {
		window_close(window_find_by_class(WC_TOP_TOOLBAR));
		window_close(window_find_by_class(WC_BOTTOM_TOOLBAR));
	} else {
		if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) == 0) {
			window_top_toolbar_open();
			window_game_bottom_toolbar_open();
		} else {
			window_top_toolbar_open();
			window_editor_bottom_toolbar_open();
		}
	}
}
Exemple #2
0
/**
* Creates the main editor window that holds the main viewport.
*  rct2: 0x0066EF38
*/
void window_editor_main_open()
{
	rct_window* window;

	window_editor_main_widgets[0].right = gScreenWidth;
	window_editor_main_widgets[0].bottom = gScreenHeight;
	window = window_create(0, 0, window_editor_main_widgets[0].right, window_editor_main_widgets[0].bottom,
		&window_editor_main_events, WC_MAIN_WINDOW, WF_STICK_TO_BACK);
	window->widgets = window_editor_main_widgets;

	viewport_create(window, window->x, window->y, window->width, window->height, 0, 0x0FFF, 0x0FFF, 0, 0x1, -1);
	window->viewport->flags |= 0x0400;

	gCurrentRotation = 0;
	gShowGridLinesRefCount = 0;
	gShowLandRightsRefCount = 0;
	gShowConstuctionRightsRefCount = 0;
	gFootpathSelectedType = 0;

	window_top_toolbar_open();
	window_editor_bottom_toolbar_open();
}
Exemple #3
0
/**
* Creates the main editor window that holds the main viewport.
*  rct2: 0x0066EF38
*/
void window_editor_main_open()
{
	rct_window* window;

	window_editor_main_widgets[0].right = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16);
	window_editor_main_widgets[0].bottom = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, uint16);
	window = window_create(0, 0, window_editor_main_widgets[0].right, window_editor_main_widgets[0].bottom,
		&window_editor_main_events, WC_MAIN_WINDOW, WF_STICK_TO_BACK);
	window->widgets = window_editor_main_widgets;

	viewport_create(window, window->x, window->y, window->width, window->height, 0, 0x0FFF, 0x0FFF, 0, 0x1, -1);
	window->viewport->flags |= 0x0400;

	RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, sint32) = 0;
	RCT2_GLOBAL(0x009E32B0, uint8) = 0;
	RCT2_GLOBAL(0x009E32B2, uint8) = 0;
	RCT2_GLOBAL(0x009E32B3, uint8) = 0;
	RCT2_GLOBAL(RCT2_ADDRESS_SELECTED_PATH_TYPE, uint8) = 0;

	window_top_toolbar_open();
	window_editor_bottom_toolbar_open();
}