2017-06-01 21:55:10 +02:00
|
|
|
#pragma region Copyright (c) 2014-2017 OpenRCT2 Developers
|
2014-04-09 15:43:27 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
|
|
|
|
*
|
2016-05-04 19:24:41 +02:00
|
|
|
* OpenRCT2 is the work of many authors, a full list can be found in contributors.md
|
|
|
|
* For more information, visit https://github.com/OpenRCT2/OpenRCT2
|
2014-04-09 15:43:27 +02:00
|
|
|
*
|
|
|
|
* OpenRCT2 is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2016-05-04 19:24:41 +02:00
|
|
|
*
|
|
|
|
* A full copy of the GNU General Public License can be found in licence.txt
|
2014-04-09 15:43:27 +02:00
|
|
|
*****************************************************************************/
|
2016-05-04 19:24:41 +02:00
|
|
|
#pragma endregion
|
2014-04-09 15:43:27 +02:00
|
|
|
|
2014-04-24 19:53:42 +02:00
|
|
|
#ifndef _WINDOW_DROPDOWN_H_
|
|
|
|
#define _WINDOW_DROPDOWN_H_
|
|
|
|
|
2014-10-06 18:36:58 +02:00
|
|
|
#include "../common.h"
|
2016-10-01 22:57:09 +02:00
|
|
|
#include "../interface/window.h"
|
2014-04-09 15:43:27 +02:00
|
|
|
|
2017-06-20 10:40:38 +02:00
|
|
|
#define DROPDOWN_SEPARATOR 0
|
|
|
|
#define DROPDOWN_FORMAT_COLOUR_PICKER 0xFFFE
|
|
|
|
#define DROPDOWN_FORMAT_LAND_PICKER 0xFFFF
|
2017-07-24 13:08:38 +02:00
|
|
|
#define DROPDOWN_ITEMS_MAX_SIZE 128
|
2014-04-09 15:43:27 +02:00
|
|
|
|
2015-05-07 20:31:11 +02:00
|
|
|
enum
|
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
DROPDOWN_FLAG_CUSTOM_HEIGHT = (1 << 6),
|
|
|
|
DROPDOWN_FLAG_STAY_OPEN = (1 << 7)
|
2015-05-07 20:31:11 +02:00
|
|
|
};
|
|
|
|
|
2017-09-18 17:05:28 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2017-01-04 22:17:08 +01:00
|
|
|
extern sint32 gAppropriateImageDropdownItemsPerRow[];
|
2014-04-18 20:00:27 +02:00
|
|
|
|
2017-01-04 22:17:08 +01:00
|
|
|
extern sint32 gDropdownNumItems;
|
2017-07-23 08:29:42 +02:00
|
|
|
extern rct_string_id gDropdownItemsFormat[DROPDOWN_ITEMS_MAX_SIZE];
|
|
|
|
extern sint64 gDropdownItemsArgs[DROPDOWN_ITEMS_MAX_SIZE];
|
2015-09-01 08:08:28 +02:00
|
|
|
extern bool gDropdownIsColour;
|
2017-01-04 22:17:08 +01:00
|
|
|
extern sint32 gDropdownLastColourHover;
|
|
|
|
extern sint32 gDropdownHighlightedIndex;
|
|
|
|
extern sint32 gDropdownDefaultIndex;
|
|
|
|
|
|
|
|
bool dropdown_is_checked(sint32 index);
|
|
|
|
bool dropdown_is_disabled(sint32 index);
|
|
|
|
void dropdown_set_checked(sint32 index, bool value);
|
|
|
|
void dropdown_set_disabled(sint32 index, bool value);
|
|
|
|
|
2017-01-13 20:28:02 +01:00
|
|
|
void window_dropdown_show_text(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, size_t num_items);
|
2017-02-16 19:35:59 +01:00
|
|
|
void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 custom_height, uint8 flags, size_t num_items, sint32 width);
|
2017-01-04 22:17:08 +01:00
|
|
|
void window_dropdown_show_image(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, sint32 numItems, sint32 itemWidth, sint32 itemHeight, sint32 numColumns);
|
2014-04-21 11:27:48 +02:00
|
|
|
void window_dropdown_close();
|
2017-01-04 22:17:08 +01:00
|
|
|
sint32 dropdown_index_from_point(sint32 x, sint32 y, rct_window* w);
|
2014-09-14 19:43:36 +02:00
|
|
|
void window_dropdown_show_colour(rct_window *w, rct_widget *widget, uint8 dropdownColour, uint8 selectedColour);
|
2014-09-23 22:22:14 +02:00
|
|
|
void window_dropdown_show_colour_available(rct_window *w, rct_widget *widget, uint8 dropdownColour, uint8 selectedColour, uint32 availableColours);
|
2014-04-24 19:53:42 +02:00
|
|
|
|
2017-09-18 17:05:28 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-10-12 15:58:15 +02:00
|
|
|
#endif
|