Project Alice
Loading...
Searching...
No Matches
gui_graphics.hpp File Reference
#include <vector>
#include <array>
#include "constants.hpp"
#include "dcon_generated.hpp"
#include "unordered_dense.h"
#include "container_types.hpp"
#include "parsers.hpp"
#include "cyto_any.hpp"
Include dependency graph for gui_graphics.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ui::xy_pair
 
struct  ui::gfx_object
 
struct  ui::text_base_data
 
struct  ui::button_data
 
struct  ui::text_data
 
struct  ui::image_data
 
struct  ui::overlapping_data
 
struct  ui::list_box_data
 
struct  ui::scrollbar_data
 
struct  ui::window_data
 
struct  ui::position_data
 
struct  ui::element_data
 
union  ui::element_data::internal_data
 
struct  ui::window_extension
 
class  ui::definitions
 
struct  ui::element_target
 
struct  ui::chat_message
 
struct  ui::hash_text_key
 
struct  ui::state
 
struct  ui::mouse_probe
 

Namespaces

namespace  parsers
 
namespace  ui
 

Typedefs

using ui::ui_hook_fn = std::unique_ptr< element_base >(*)(sys::state &, dcon::gui_def_id)
 

Enumerations

enum class  ui::object_type : uint8_t {
  ui::generic_sprite = 0x00 , ui::bordered_rect = 0x01 , ui::horizontal_progress_bar = 0x02 , ui::vertical_progress_bar = 0x03 ,
  ui::flag_mask = 0x04 , ui::tile_sprite = 0x05 , ui::text_sprite = 0x06 , ui::barchart = 0x07 ,
  ui::piechart = 0x08 , ui::linegraph = 0x09
}
 
enum class  ui::element_type : uint8_t {
  ui::button = 0x01 , ui::text = 0x02 , ui::image = 0x03 , ui::position = 0x04 ,
  ui::overlapping = 0x05 , ui::listbox = 0x06 , ui::scrollbar = 0x07 , ui::window = 0x00
}
 
enum class  ui::alignment : uint8_t { ui::left = 0x00 , ui::right = 0x01 , ui::centered = 0x02 , ui::justified = 0x03 }
 
enum class  ui::rotation : uint8_t { ui::upright = (0x00 << rotation_bit_offset) , ui::r90_left = (0x01 << rotation_bit_offset) , ui::r90_right = (0x02 << rotation_bit_offset) }
 
enum class  ui::orientation : uint8_t {
  ui::upper_left = (0x00 << orientation_bit_offset) , ui::upper_right = (0x01 << orientation_bit_offset) , ui::lower_left = (0x02 << orientation_bit_offset) , ui::lower_right = (0x03 << orientation_bit_offset) ,
  ui::upper_center = (0x04 << orientation_bit_offset) , ui::lower_center = (0x05 << orientation_bit_offset) , ui::center = (0x06 << orientation_bit_offset)
}
 
enum class  ui::clicksound : uint16_t { ui::none = (0x00 << clicksound_bit_offset) , ui::click = (0x01 << clicksound_bit_offset) , ui::close_window = (0x02 << clicksound_bit_offset) , ui::start_game = (0x03 << clicksound_bit_offset) }
 
enum class  ui::button_scripting : uint16_t { ui::none = (0x00 << button_scripting_bit_offset) , ui::province = (0x01 << button_scripting_bit_offset) , ui::nation = (0x02 << button_scripting_bit_offset) }
 
enum class  ui::text_background : uint8_t { ui::none = (0x00 << text_background_bit_offset) , ui::tiles_dialog = (0x01 << text_background_bit_offset) , ui::transparency = (0x02 << text_background_bit_offset) , ui::small_tiles_dialog = (0x03 << text_background_bit_offset) }
 
enum class  ui::step_size : uint8_t {
  ui::one = 0x00 , ui::two = 0x01 , ui::one_tenth = 0x02 , ui::one_hundredth = 0x03 ,
  ui::one_thousandth = 0x04 , ui::twenty_five = 0x40
}
 
enum class  ui::message_result { ui::unseen , ui::seen , ui::consumed }
 
enum class  ui::focus_result { ui::ignored , ui::accepted }
 
enum class  ui::tooltip_behavior { ui::tooltip , ui::variable_tooltip , ui::position_sensitive_tooltip , ui::no_tooltip }
 

Functions

void ui::load_text_gui_definitions (sys::state &state, parsers::building_gfx_context &context, parsers::error_handler &err)
 
xy_pair ui::child_relative_location (sys::state &state, element_base const &parent, element_base const &child)
 
xy_pair ui::get_absolute_location (sys::state &state, element_base const &node)
 
xy_pair ui::child_relative_non_mirror_location (sys::state &state, element_base const &parent, element_base const &child)
 
xy_pair ui::get_absolute_non_mirror_location (sys::state &state, element_base const &node)
 
template<typename T >
constexpr ui_hook_fn ui::hook ()
 
void ui::populate_definitions_map (sys::state &state)
 
void ui::make_size_from_graphics (sys::state &state, ui::element_data &dat)
 
std::unique_ptr< element_base > ui::make_element (sys::state &state, std::string_view name)
 
std::unique_ptr< element_base > ui::make_element_immediate (sys::state &state, dcon::gui_def_id id)
 
void ui::show_main_menu_nation_basic (sys::state &state)
 
void ui::show_main_menu_nation_picker (sys::state &state)
 
int32_t ui::ui_width (sys::state const &state)
 
int32_t ui::ui_height (sys::state const &state)
 
void ui::create_in_game_windows (sys::state &state)
 

Variables

constexpr int32_t ui::rotation_bit_offset = 3
 
constexpr int32_t ui::orientation_bit_offset = 5
 
constexpr int32_t ui::clicksound_bit_offset = 2
 
constexpr int32_t ui::checkbox_bit_offset = clicksound_bit_offset + 2
 
constexpr int32_t ui::button_scripting_bit_offset = checkbox_bit_offset + 1
 
constexpr int32_t ui::text_background_bit_offset = 2