OpenEnroth bb0c5f2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
GUIWindow Class Reference

#include <GUIWindow.h>

Inheritance diagram for GUIWindow:
GUICredits GUIWindow_Book GUIWindow_BooksButtonOverlay GUIWindow_BranchlessDialogue GUIWindow_CharacterRecord GUIWindow_Chest GUIWindow_Dialogue GUIWindow_GameKeyBindings GUIWindow_GameMenu GUIWindow_GameOptions GUIWindow_GameOver GUIWindow_GameVideoOptions GUIWindow_House GUIWindow_Load GUIWindow_MainMenu GUIWindow_MessageScroll GUIWindow_PartyCreation GUIWindow_QuickReference GUIWindow_Rest GUIWindow_Save GUIWindow_Spellbook GUIWindow_Transition OnButtonClick OnButtonClick2 OnButtonClick3 OnButtonClick4 OnCancel OnCancel2 OnCancel3 OnSaveLoad TargetedSpellUI

Public Member Functions

 GUIWindow (WindowType windowType, Pointi position, Sizei dimensions, std::string_view hint={})
 
virtual ~GUIWindow ()
 
 GUIWindow (const GUIWindow &other)=delete
 
GUIWindowoperator= (const GUIWindow &other)=delete
 
GUIButtonCreateButton (Pointi position, Sizei dimensions, int uButtonType, int uData, UIMessageType msg, unsigned int msg_param, InputAction action=INPUT_ACTION_INVALID, std::string_view label={}, const std::vector< GraphicsImage * > &textures={})
 
GUIButtonCreateButton (std::string id, Pointi position, Sizei dimensions, int uButtonType, int uData, UIMessageType msg, unsigned int msg_param, InputAction action=INPUT_ACTION_INVALID, std::string_view label={}, const std::vector< GraphicsImage * > &textures={})
 
bool Contains (unsigned int x, unsigned int y)
 
int DrawTextInRect (GUIFont *font, Pointi position, Color color, std::string_view text, int rect_width, int reverse_text)
 
void DrawDialoguePanel (std::string_view text)
 
GUIButtonGetControl (unsigned int uID)
 
void setKeyboardControlGroup (int buttonsCount, bool msgOnSelect, int selectStep, int initialPosition)
 
virtual void Update ()
 
void DeleteButtons ()
 

Static Public Member Functions

static void InitializeGUI ()
 
static void DrawText (GUIFont *font, Pointi position, Color color, std::string_view text, Recti frameRect, int maxY=0, Color shadowColor=colorTable.Black)
 
static void DrawTitleText (GUIFont *font, int horizontalMargin, int verticalMargin, Color color, std::string_view text, int lineSpacing, Recti frameRect)
 
static void DrawFlashingInputCursor (int uX, int uY, GUIFont *a2, Recti frameRect)
 
static void DrawShops_next_generation_time_string (Duration time, Recti frameRect)
 
static void DrawMessageBox (bool inside_game_viewport, Recti &frameRect, std::string hint)
 

Public Attributes

Recti frameRect
 
WindowType eWindowType = WINDOW_null
 
int field_24 = 0
 
int pNumPresenceButton = 0
 
int pCurrentPosActiveItem = 0
 
bool _msgOnKeyboardSelect = true
 
int _selectStep = 0
 
int pStartingPosActiveItem = 0
 
WindowInputStatus keyboard_input_status = WINDOW_INPUT_NONE
 
bool receives_keyboard_input = false
 
std::string sHint
 
std::vector< GUIButton * > vButtons
 
std::shared_ptr< Io::Mousemouse = nullptr
 

Constructor & Destructor Documentation

◆ GUIWindow() [1/2]

GUIWindow::GUIWindow ( WindowType  windowType,
Pointi  position,
Sizei  dimensions,
std::string_view  hint = {} 
)

◆ ~GUIWindow()

GUIWindow::~GUIWindow ( )
virtual

◆ GUIWindow() [2/2]

GUIWindow::GUIWindow ( const GUIWindow other)
delete

Member Function Documentation

◆ Contains()

bool GUIWindow::Contains ( unsigned int  x,
unsigned int  y 
)

◆ CreateButton() [1/2]

GUIButton * GUIWindow::CreateButton ( Pointi  position,
Sizei  dimensions,
int  uButtonType,
int  uData,
UIMessageType  msg,
unsigned int  msg_param,
InputAction  action = INPUT_ACTION_INVALID,
std::string_view  label = {},
const std::vector< GraphicsImage * > &  textures = {} 
)

◆ CreateButton() [2/2]

GUIButton * GUIWindow::CreateButton ( std::string  id,
Pointi  position,
Sizei  dimensions,
int  uButtonType,
int  uData,
UIMessageType  msg,
unsigned int  msg_param,
InputAction  action = INPUT_ACTION_INVALID,
std::string_view  label = {},
const std::vector< GraphicsImage * > &  textures = {} 
)

◆ DeleteButtons()

void GUIWindow::DeleteButtons ( )

◆ DrawDialoguePanel()

void GUIWindow::DrawDialoguePanel ( std::string_view  text)

Draws the dialogue panel with background, e.g. for showing Arcomage rules in a tavern. Automatically switches to smaller font if text is too tall.

Parameters
textText to display in the panel. If empty, nothing is drawn.

◆ DrawFlashingInputCursor()

void GUIWindow::DrawFlashingInputCursor ( int  uX,
int  uY,
GUIFont a2,
Recti  frameRect 
)
static

◆ DrawMessageBox()

void GUIWindow::DrawMessageBox ( bool  inside_game_viewport,
Recti frameRect,
std::string  hint 
)
static

◆ DrawShops_next_generation_time_string()

void GUIWindow::DrawShops_next_generation_time_string ( Duration  time,
Recti  frameRect 
)
static

◆ DrawText()

void GUIWindow::DrawText ( GUIFont font,
Pointi  position,
Color  color,
std::string_view  text,
Recti  frameRect,
int  maxY = 0,
Color  shadowColor = colorTable.Black 
)
static

◆ DrawTextInRect()

int GUIWindow::DrawTextInRect ( GUIFont font,
Pointi  position,
Color  color,
std::string_view  text,
int  rect_width,
int  reverse_text 
)

◆ DrawTitleText()

void GUIWindow::DrawTitleText ( GUIFont font,
int  horizontalMargin,
int  verticalMargin,
Color  color,
std::string_view  text,
int  lineSpacing,
Recti  frameRect 
)
static

◆ GetControl()

GUIButton * GUIWindow::GetControl ( unsigned int  uID)

◆ InitializeGUI()

void GUIWindow::InitializeGUI ( )
static

◆ operator=()

GUIWindow & GUIWindow::operator= ( const GUIWindow other)
delete

◆ setKeyboardControlGroup()

void GUIWindow::setKeyboardControlGroup ( int  buttonsCount,
bool  msgOnSelect,
int  selectStep,
int  initialPosition 
)
Original binary offset:
0x41D08F

◆ Update()

virtual void GUIWindow::Update ( )
inlinevirtual

Member Data Documentation

◆ _msgOnKeyboardSelect

bool GUIWindow::_msgOnKeyboardSelect = true

◆ _selectStep

int GUIWindow::_selectStep = 0

◆ eWindowType

WindowType GUIWindow::eWindowType = WINDOW_null

◆ field_24

int GUIWindow::field_24 = 0

◆ frameRect

Recti GUIWindow::frameRect

◆ keyboard_input_status

WindowInputStatus GUIWindow::keyboard_input_status = WINDOW_INPUT_NONE

◆ mouse

std::shared_ptr<Io::Mouse> GUIWindow::mouse = nullptr

◆ pCurrentPosActiveItem

int GUIWindow::pCurrentPosActiveItem = 0

◆ pNumPresenceButton

int GUIWindow::pNumPresenceButton = 0

◆ pStartingPosActiveItem

int GUIWindow::pStartingPosActiveItem = 0

◆ receives_keyboard_input

bool GUIWindow::receives_keyboard_input = false

◆ sHint

std::string GUIWindow::sHint

◆ vButtons

std::vector<GUIButton*> GUIWindow::vButtons

The documentation for this class was generated from the following files: