2014-04-03 04:08:06 +02:00
|
|
|
/*****************************************************************************
|
2019-03-17 08:16:15 +01:00
|
|
|
* Copyright (c) 2014-2019 OpenRCT2 developers
|
2014-04-03 04:08:06 +02:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
2014-04-03 04:08:06 +02:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
2014-04-03 04:08:06 +02:00
|
|
|
*****************************************************************************/
|
|
|
|
|
2018-06-22 23:21:44 +02:00
|
|
|
#include <openrct2-ui/interface/Widget.h>
|
2017-08-06 21:20:05 +02:00
|
|
|
#include <openrct2-ui/windows/Window.h>
|
2018-06-22 23:21:44 +02:00
|
|
|
#include <openrct2/drawing/Drawing.h>
|
|
|
|
#include <openrct2/interface/Colour.h>
|
2018-01-06 18:32:25 +01:00
|
|
|
#include <openrct2/localisation/Localisation.h>
|
2017-09-18 17:05:28 +02:00
|
|
|
#include <openrct2/sprites.h>
|
2014-04-03 04:08:06 +02:00
|
|
|
|
2018-05-16 20:41:29 +02:00
|
|
|
// clang-format off
|
2016-06-12 18:19:31 +02:00
|
|
|
static rct_widget window_title_logo_widgets[] = {
|
2017-06-06 23:24:18 +02:00
|
|
|
{ WIDGETS_END },
|
2016-06-12 18:19:31 +02:00
|
|
|
};
|
|
|
|
|
2015-07-10 02:39:16 +02:00
|
|
|
static void window_title_logo_paint(rct_window *w, rct_drawpixelinfo *dpi);
|
2014-04-29 21:10:23 +02:00
|
|
|
|
2015-07-10 02:39:16 +02:00
|
|
|
static rct_window_event_list window_title_logo_events = {
|
2017-08-15 10:07:44 +02:00
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
|
|
|
nullptr,
|
2017-06-06 23:24:18 +02:00
|
|
|
window_title_logo_paint,
|
2017-08-15 10:07:44 +02:00
|
|
|
nullptr
|
2014-04-29 21:10:23 +02:00
|
|
|
};
|
2018-05-16 20:41:29 +02:00
|
|
|
// clang-format on
|
2014-04-29 21:10:23 +02:00
|
|
|
|
2014-04-03 04:08:06 +02:00
|
|
|
/**
|
|
|
|
* Creates the window containing the logo and the expansion packs on the title screen.
|
|
|
|
* rct2: 0x0066B679 (part of 0x0066B3E8)
|
|
|
|
*/
|
2018-06-22 23:21:44 +02:00
|
|
|
rct_window* window_title_logo_open()
|
2014-04-03 04:08:06 +02:00
|
|
|
{
|
2018-07-21 11:50:45 +02:00
|
|
|
rct_window* window = window_create(
|
2019-10-19 13:07:03 +02:00
|
|
|
ScreenCoordsXY(0, 0), 232, 136, &window_title_logo_events, WC_TITLE_LOGO, WF_STICK_TO_BACK | WF_TRANSPARENT);
|
2017-06-06 23:24:18 +02:00
|
|
|
window->widgets = window_title_logo_widgets;
|
|
|
|
window_init_scroll_widgets(window);
|
|
|
|
window->colours[0] = TRANSLUCENT(COLOUR_GREY);
|
|
|
|
window->colours[1] = TRANSLUCENT(COLOUR_GREY);
|
|
|
|
window->colours[2] = TRANSLUCENT(COLOUR_GREY);
|
2017-08-06 05:22:00 +02:00
|
|
|
|
|
|
|
return window;
|
2014-04-21 11:27:48 +02:00
|
|
|
}
|
2014-04-29 21:10:23 +02:00
|
|
|
|
|
|
|
/**
|
2018-06-22 23:21:44 +02:00
|
|
|
*
|
|
|
|
* rct2: 0x0066B872
|
|
|
|
*/
|
|
|
|
static void window_title_logo_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
2014-04-29 21:10:23 +02:00
|
|
|
{
|
2018-06-20 17:28:51 +02:00
|
|
|
int32_t x = 2;
|
|
|
|
int32_t y = 2;
|
2020-03-01 20:32:35 +01:00
|
|
|
gfx_draw_sprite(dpi, SPR_G2_LOGO, w->windowPos.x + x, w->windowPos.y + y, 0);
|
|
|
|
gfx_draw_sprite(dpi, SPR_G2_TITLE, w->windowPos.x + x + 104, w->windowPos.y + y + 18, 0);
|
2015-12-21 05:03:37 +01:00
|
|
|
}
|