OpenEnroth efd3b88
Loading...
Searching...
No Matches
Classes | Functions | Variables
UIPopup.cpp File Reference
#include <array>
#include <algorithm>
#include <string>
#include <utility>
#include "Engine/Engine.h"
#include "Engine/AssetsManager.h"
#include "Engine/EngineIocContainer.h"
#include "Engine/Graphics/Sprites.h"
#include "Engine/Graphics/Viewport.h"
#include "Engine/Graphics/Vis.h"
#include "Engine/Graphics/Image.h"
#include "Engine/Graphics/Renderer/Renderer.h"
#include "Engine/Localization.h"
#include "Engine/Objects/Actor.h"
#include "Engine/Objects/Chest.h"
#include "Engine/Objects/ObjectList.h"
#include "Engine/Objects/SpriteObject.h"
#include "Engine/Objects/NPC.h"
#include "Engine/Objects/CharacterEnumFunctions.h"
#include "Engine/Objects/MonsterEnumFunctions.h"
#include "Engine/Random/Random.h"
#include "Engine/Tables/ItemTable.h"
#include "Engine/Tables/PortraitFrameTable.h"
#include "Engine/Spells/Spells.h"
#include "Engine/Party.h"
#include "Engine/MapEnumFunctions.h"
#include "Engine/Time/Timer.h"
#include "Engine/Conditions.h"
#include "Engine/Objects/ActorEnumFunctions.h"
#include "Engine/Spells/SpellEnumFunctions.h"
#include "Io/Mouse.h"
#include "GUI/GUIButton.h"
#include "GUI/GUIMessageQueue.h"
#include "GUI/UI/Books/MapBook.h"
#include "GUI/UI/UICharacter.h"
#include "GUI/UI/UIPopup.h"
#include "ItemGrid.h"
#include "GUI/UI/UIGame.h"
#include "GUI/UI/UIStatusBar.h"
#include "GUI/UI/UIChest.h"
#include "GUI/UI/Houses/Shops.h"
#include "Media/Audio/AudioPlayer.h"
#include "Library/Logger/Logger.h"

Classes

struct  stat_coord
 

Functions

void Inventory_ItemPopupAndAlchemy ()
 
Color GetSpellColor (SpellId spellId)
 
uint64_t GetExperienceRequiredForLevel (int level)
 
static void CharacterUI_DrawTooltip (std::string_view title, std::string_view content)
 
void DrawPopupWindow (unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight)
 
void GameUI_DrawItemInfo (Item *inspect_item)
 
std::pair< int, int > MonsterPopup_Draw (unsigned int uActorID, GUIWindow *pWindow)
 
std::string CharacterUI_GetSkillDescText (int uPlayerID, Skill uPlayerSkillType)
 Generating message for skill description popup. More...
 
void CharacterUI_SkillsTab_ShowHint ()
 
void CharacterUI_StatsTab_ShowHint ()
 
void DrawSpellDescriptionPopup (SpellId spell_id)
 
static void drawBuffPopupWindow ()
 
void showSpellbookInfo (ItemId spellbook)
 
void ShowPopupShopSkills ()
 
void ShowPopupShopItem ()
 
void GameUI_CharacterQuickRecord_Draw (GUIWindow *window, int characterIndex)
 
void GameUI_DrawNPCPopup (int _this)
 
void UI_OnMouseRightClick (Pointi mousePos)
 

Variables

GraphicsImageparchment = nullptr
 
GraphicsImagemessagebox_corner_x = nullptr
 
GraphicsImagemessagebox_corner_y = nullptr
 
GraphicsImagemessagebox_corner_z = nullptr
 
GraphicsImagemessagebox_corner_w = nullptr
 
GraphicsImagemessagebox_border_top = nullptr
 
GraphicsImagemessagebox_border_bottom = nullptr
 
GraphicsImagemessagebox_border_left = nullptr
 
GraphicsImagemessagebox_border_right = nullptr
 
bool holdingMouseRightButton = false
 
bool rightClickItemActionPerformed = false
 
bool identifyOrRepairReactionPlayed = false
 
std::array< stat_coord, 26 > stat_string_coord
 
std::array< int16_t, 4 > RightClickPortraitXmin = {{20, 131, 242, 357}}
 
std::array< int16_t, 4 > RightClickPortraitXmax = {{83, 198, 312, 423}}
 
IndexedArray< int, MONSTER_TYPE_FIRST, MONSTER_TYPE_LASTmonster_popup_y_offsets
 
static constexpr IndexedArray< Color, SPECIAL_ATTACK_FIRST, SPECIAL_ATTACK_LASTmonsterSpecialAttackColors
 
static constexpr IndexedArray< Color, MONSTER_SPECIAL_ABILITY_FIRST, MONSTER_SPECIAL_ABILITY_LASTmonsterSpecialAbilityColors
 

Function Documentation

◆ CharacterUI_DrawTooltip()

static void CharacterUI_DrawTooltip ( std::string_view  title,
std::string_view  content 
)
static
Original binary offset:
0x4179BC

◆ CharacterUI_GetSkillDescText()

std::string CharacterUI_GetSkillDescText ( int  uPlayerID,
Skill  uPlayerSkillType 
)

Generating message for skill description popup.

Original binary offset:
0x00417BB5
Parameters
uPlayerIDCharacter identifier.
uPlayerSkillTypeSkill type identifier.

◆ CharacterUI_SkillsTab_ShowHint()

void CharacterUI_SkillsTab_ShowHint ( )

◆ CharacterUI_StatsTab_ShowHint()

void CharacterUI_StatsTab_ShowHint ( )

◆ drawBuffPopupWindow()

static void drawBuffPopupWindow ( )
static
Original binary offset:
0x41D73D

◆ DrawPopupWindow()

void DrawPopupWindow ( unsigned int  uX,
unsigned int  uY,
unsigned int  uWidth,
unsigned int  uHeight 
)

◆ DrawSpellDescriptionPopup()

void DrawSpellDescriptionPopup ( SpellId  spell_id)

◆ GameUI_CharacterQuickRecord_Draw()

void GameUI_CharacterQuickRecord_Draw ( GUIWindow window,
int  characterIndex 
)

◆ GameUI_DrawItemInfo()

void GameUI_DrawItemInfo ( Item inspect_item)

◆ GameUI_DrawNPCPopup()

void GameUI_DrawNPCPopup ( int  _this)

◆ GetExperienceRequiredForLevel()

uint64_t GetExperienceRequiredForLevel ( int  level)

◆ GetSpellColor()

Color GetSpellColor ( SpellId  spellId)

◆ Inventory_ItemPopupAndAlchemy()

void Inventory_ItemPopupAndAlchemy ( )

◆ MonsterPopup_Draw()

std::pair< int, int > MonsterPopup_Draw ( unsigned int  uActorID,
GUIWindow pWindow 
)

Render the monster info popup

Parameters
uActorIDID of the actor to show info for
pWindowThe window to render into, or null to measure content only
Returns
Actual width/height needed to render

Geometry hardcoded constants

◆ ShowPopupShopItem()

void ShowPopupShopItem ( )

◆ ShowPopupShopSkills()

void ShowPopupShopSkills ( )

◆ showSpellbookInfo()

void showSpellbookInfo ( ItemId  spellbook)
Original binary offset:
0x4B1523

◆ UI_OnMouseRightClick()

void UI_OnMouseRightClick ( Pointi  mousePos)

Variable Documentation

◆ holdingMouseRightButton

bool holdingMouseRightButton = false

◆ identifyOrRepairReactionPlayed

bool identifyOrRepairReactionPlayed = false

◆ messagebox_border_bottom

GraphicsImage* messagebox_border_bottom = nullptr

◆ messagebox_border_left

GraphicsImage* messagebox_border_left = nullptr

◆ messagebox_border_right

GraphicsImage* messagebox_border_right = nullptr

◆ messagebox_border_top

GraphicsImage* messagebox_border_top = nullptr

◆ messagebox_corner_w

GraphicsImage* messagebox_corner_w = nullptr

◆ messagebox_corner_x

GraphicsImage* messagebox_corner_x = nullptr

◆ messagebox_corner_y

GraphicsImage* messagebox_corner_y = nullptr

◆ messagebox_corner_z

GraphicsImage* messagebox_corner_z = nullptr

◆ monster_popup_y_offsets

IndexedArray<int, MONSTER_TYPE_FIRST, MONSTER_TYPE_LAST> monster_popup_y_offsets

◆ monsterSpecialAbilityColors

constexpr IndexedArray<Color, MONSTER_SPECIAL_ABILITY_FIRST, MONSTER_SPECIAL_ABILITY_LAST> monsterSpecialAbilityColors
staticconstexpr
Initial value:
= {
}
constexpr ColorTable colorTable
Definition: ColorTable.h:80
const Color EasternBlue
Definition: ColorTable.h:25
const Color Sunflower
Definition: ColorTable.h:39
const Color Mercury
Definition: ColorTable.h:31

◆ monsterSpecialAttackColors

constexpr IndexedArray<Color, SPECIAL_ATTACK_FIRST, SPECIAL_ATTACK_LAST> monsterSpecialAttackColors
staticconstexpr
Initial value:
= {
}
const Color Primrose
Definition: ColorTable.h:33
const Color JazzberryJam
Definition: ColorTable.h:65
const Color DarkOrange
Definition: ColorTable.h:23
const Color LaserLemon
Definition: ColorTable.h:29
const Color NavyBlue
Definition: ColorTable.h:59
const Color Cioccolato
Definition: ColorTable.h:64
const Color GreenTeal
Definition: ColorTable.h:50
const Color Eucalyptus
Definition: ColorTable.h:77
const Color MoonRaker
Definition: ColorTable.h:30
const Color CornFlowerBlue
Definition: ColorTable.h:22
const Color BoltBlue
Definition: ColorTable.h:72
const Color FlushOrange
Definition: ColorTable.h:26
const Color StarkWhite
Definition: ColorTable.h:38
const Color VibrantGreen
Definition: ColorTable.h:57
const Color BloodRed
Definition: ColorTable.h:56
const Color White
Definition: ColorTable.h:45
const Color OrangeyRed
Definition: ColorTable.h:46
const Color ScienceBlue
Definition: ColorTable.h:52
const Color DirtyYellow
Definition: ColorTable.h:51
const Color MediumGrey
Definition: ColorTable.h:48
const Color Mimosa
Definition: ColorTable.h:71

◆ parchment

GraphicsImage* parchment = nullptr

◆ rightClickItemActionPerformed

bool rightClickItemActionPerformed = false

◆ RightClickPortraitXmax

std::array<int16_t, 4> RightClickPortraitXmax = {{83, 198, 312, 423}}

◆ RightClickPortraitXmin

std::array<int16_t, 4> RightClickPortraitXmin = {{20, 131, 242, 357}}

◆ stat_string_coord

std::array<stat_coord, 26> stat_string_coord
Initial value:
=
{{
{0x1A, 0x39, 0xDC, 0x12}, {0x1A, 0x4A, 0xDC, 0x12},
{0x1A, 0x5B, 0xDC, 0x12}, {0x1A, 0x6C, 0xDC, 0x12},
{0x1A, 0x7D, 0xDC, 0x12}, {0x1A, 0x8E, 0xDC, 0x12},
{0x1A, 0x9F, 0xDC, 0x12}, {0x1A, 0xC6, 0xDC, 0x12},
{0x1A, 0xD7, 0xDC, 0x12}, {0x1A, 0xE8, 0xDC, 0x12},
{0x1A, 0x10C, 0xDC, 0x12}, {0x1A, 0x11E, 0xDC, 0x12},
{0x111, 0x36, 0xBA, 0x12}, {0x111, 0x47, 0xBA, 0x12},
{0x111, 0x58, 0xBA, 0x12}, {0x111, 0x7E, 0xBA, 0x12},
{0x111, 0x8F, 0xBA, 0x12}, {0x111, 0xA0, 0xBA, 0x12},
{0x111, 0xB1, 0xBA, 0x12}, {0x111, 0xCA, 0xBA, 0x12},
{0x111, 0xDD, 0xBA, 0x12}, {0x111, 0xF0, 0xBA, 0x12},
{0x111, 0x103, 0xBA, 0x12}, {0x111, 0x116, 0xBA, 0x12},
{0x111, 0x129, 0xBA, 0x12}, {0x13E, 0x12, 0x89, 0x12},
}}