ScummVM
Kyra::GUI_v2 Class Referenceabstract

#include <gui_v2.h>

Inheritance diagram for Kyra::GUI_v2:
Collaboration diagram for Kyra::GUI_v2:

Public Member Functions

 GUI_v2 (KyraEngine_v2 *vm)
 
virtual void initStaticData ()=0
 
ButtonaddButtonToList (Button *list, Button *newButton)
 
void processButton (Button *button)
 
int processButtonList (Button *button, uint16 inputFlag, int8 mouseWheel)
 
- Public Member Functions inherited from Kyra::GUI_v1
 GUI_v1 (KyraEngine_v1 *vm)
 
virtual ~GUI_v1 ()
 
virtual int redrawShadedButtonCallback (Button *button)
 
virtual int redrawButtonCallback (Button *button)
 
virtual void initMenuLayout (Menu &menu)
 
void initMenu (Menu &menu)
 
void processHighlights (Menu &menu)
 
virtual void createScreenThumbnail (Graphics::Surface &dst)=0
 
- Public Member Functions inherited from Kyra::GUI
 GUI (KyraEngine_v1 *vm)
 
virtual ~GUI ()
 
void notifyUpdateSaveSlotsList ()
 

Protected Member Functions

void updateButton (Button *button)
 
virtual void setupPalette ()
 
virtual void restorePalette ()
 
virtual char * getTableString (int id)=0
 
virtual uint8 textFieldColor1 () const =0
 
virtual uint8 textFieldColor2 () const =0
 
virtual uint8 textFieldColor3 () const =0
 
virtual void getInput ()
 
ButtongetButtonListData ()
 
ButtongetScrollUpButton ()
 
ButtongetScrollDownButton ()
 
int scrollUpButton (Button *button)
 
int scrollDownButton (Button *button)
 
Button::Callback getScrollUpButtonHandler () const
 
Button::Callback getScrollDownButtonHandler () const
 
void renewHighlight (Menu &menu)
 
void backUpPage1 (uint8 *buffer)
 
void restorePage1 (const uint8 *buffer)
 
void setupSavegameNames (Menu &menu, int num)
 
int resumeGame (Button *caller)
 
int clickLoadSlot (Button *caller)
 
int cancelLoadMenu (Button *caller)
 
int saveMenu (Button *caller)
 
int clickSaveSlot (Button *caller)
 
int cancelSaveMenu (Button *caller)
 
int deleteMenu (Button *caller)
 
int quitOptionsMenu (Button *caller)
 
int toggleWalkspeed (Button *caller)
 
int toggleText (Button *caller)
 
virtual void setupOptionsButtons ()=0
 
virtual int sliderHandler (Button *caller)=0
 
const char * nameInputProcess (char *buffer, int x, int y, uint8 c1, uint8 c2, uint8 c3, int bufferSize)
 
int finishSavename (Button *caller)
 
int cancelSavename (Button *caller)
 
bool checkSavegameDescription (const char *buffer, int size)
 
int getCharWidth (uint8 c)
 
void drawTextfieldBlock (int x, int y, uint8 c)
 
bool choiceDialog (int name, bool type)
 
int choiceYes (Button *caller)
 
int choiceNo (Button *caller)
 
- Protected Member Functions inherited from Kyra::GUI_v1
virtual void printMenuText (const char *str, int x, int y, uint8 c0, uint8 c1, uint8 c2)
 
virtual int getMenuCenterStringX (const char *str, int x1, int x2)
 
virtual uint8 defaultColor1 () const =0
 
virtual uint8 defaultColor2 () const =0
 
virtual const char * getMenuTitle (const Menu &menu)=0
 
virtual const char * getMenuItemTitle (const MenuItem &menuItem)=0
 
virtual const char * getMenuItemLabel (const MenuItem &menuItem)=0
 
void updateAllMenuButtons ()
 
void updateMenuButton (Button *button)
 
void redrawText (const Menu &menu)
 
void redrawHighlight (const Menu &menu)
 
void checkTextfieldInput ()
 
- Protected Member Functions inherited from Kyra::GUI
void updateSaveFileList (Common::String targetName, bool excludeQuickSaves=false)
 
int getNextSavegameSlot ()
 
void updateSaveSlotsList (Common::String targetName, bool force=false)
 
virtual void sortSaveSlots ()
 

Protected Attributes

KyraEngine_v2_vm
 
Screen_v2_screen
 
bool _buttonListChanged
 
Button_backUpButtonList
 
Button_specialProcessButton
 
uint16 _flagsModifier
 
Button _menuButtons [7]
 
Button _scrollUpButton
 
Button _scrollDownButton
 
Menu _mainMenu
 
Menu _gameOptions
 
Menu _audioOptions
 
Menu _choiceMenu
 
Menu _loadMenu
 
Menu _saveMenu
 
Menu _savenameMenu
 
Menu _deathMenu
 
Button::Callback _scrollUpFunctor
 
Button::Callback _scrollDownFunctor
 
Button _sliderButtons [3][4]
 
Menu_currentMenu
 
bool _isLoadMenu
 
bool _isDeathMenu
 
bool _isSaveMenu
 
bool _isDeleteMenu
 
bool _isChoiceMenu
 
bool _isOptionsMenu
 
bool _madeSave
 
bool _loadedSave
 
bool _restartGame
 
bool _reloadTemporarySave
 
int _savegameOffset
 
bool _noLoadProcess
 
bool _noSaveProcess
 
int _saveSlot
 
char _saveDescription [0x51]
 
int _slotToDelete
 
Button::Callback _sliderHandlerFunctor
 
bool _finishNameInput
 
bool _cancelNameInput
 
bool _choice
 
- Protected Attributes inherited from Kyra::GUI_v1
TextDisplayer_text
 
Button_menuButtonList
 
bool _displayMenu
 
bool _displaySubMenu
 
bool _cancelSubMenu
 
Button::Callback _redrawShadedButtonFunctor
 
Button::Callback _redrawButtonFunctor
 
uint32 _lastScreenUpdate
 
- Protected Attributes inherited from Kyra::GUI
KyraEngine_v1_vm
 
Screen_screen
 
Common::Array< int_saveSlots
 
uint32 _lastScreenUpdate
 
char ** _savegameList
 
int _savegameListSize
 
bool _saveSlotsListUpdateNeeded
 
Common::KeyState _keyPressed
 

Static Protected Attributes

static const int _sliderBarsPosition []
 

Detailed Description

Definition at line 102 of file gui_v2.h.

Constructor & Destructor Documentation

◆ GUI_v2()

Kyra::GUI_v2::GUI_v2 ( KyraEngine_v2 vm)

Definition at line 33 of file gui_v2.cpp.

Member Function Documentation

◆ addButtonToList()

Button * Kyra::GUI_v2::addButtonToList ( Button list,
Button newButton 
)
virtual

Reimplemented from Kyra::GUI_v1.

Definition at line 50 of file gui_v2.cpp.

◆ backUpPage1()

void Kyra::GUI_v2::backUpPage1 ( uint8 buffer)
protected

Definition at line 423 of file gui_v2.cpp.

◆ cancelLoadMenu()

int Kyra::GUI_v2::cancelLoadMenu ( Button caller)
protected

Definition at line 579 of file gui_v2.cpp.

◆ cancelSaveMenu()

int Kyra::GUI_v2::cancelSaveMenu ( Button caller)
protected

Definition at line 674 of file gui_v2.cpp.

◆ cancelSavename()

int Kyra::GUI_v2::cancelSavename ( Button caller)
protected

Definition at line 808 of file gui_v2.cpp.

◆ checkSavegameDescription()

bool Kyra::GUI_v2::checkSavegameDescription ( const char *  buffer,
int  size 
)
protected

Definition at line 814 of file gui_v2.cpp.

◆ choiceDialog()

bool Kyra::GUI_v2::choiceDialog ( int  name,
bool  type 
)
protected

Definition at line 841 of file gui_v2.cpp.

◆ choiceNo()

int Kyra::GUI_v2::choiceNo ( Button caller)
protected

Definition at line 872 of file gui_v2.cpp.

◆ choiceYes()

int Kyra::GUI_v2::choiceYes ( Button caller)
protected

Definition at line 865 of file gui_v2.cpp.

◆ clickLoadSlot()

int Kyra::GUI_v2::clickLoadSlot ( Button caller)
protected

Definition at line 564 of file gui_v2.cpp.

◆ clickSaveSlot()

int Kyra::GUI_v2::clickSaveSlot ( Button caller)
protected

Definition at line 633 of file gui_v2.cpp.

◆ deleteMenu()

int Kyra::GUI_v2::deleteMenu ( Button caller)
protected

Definition at line 682 of file gui_v2.cpp.

◆ drawTextfieldBlock()

void Kyra::GUI_v2::drawTextfieldBlock ( int  x,
int  y,
uint8  c 
)
protected

Definition at line 837 of file gui_v2.cpp.

◆ finishSavename()

int Kyra::GUI_v2::finishSavename ( Button caller)
protected

Definition at line 802 of file gui_v2.cpp.

◆ getButtonListData()

Button* Kyra::GUI_v2::getButtonListData ( )
inlineprotectedvirtual

Implements Kyra::GUI_v1.

Definition at line 141 of file gui_v2.h.

◆ getCharWidth()

int Kyra::GUI_v2::getCharWidth ( uint8  c)
protected

Definition at line 828 of file gui_v2.cpp.

◆ getInput()

void Kyra::GUI_v2::getInput ( )
protectedvirtual

Definition at line 393 of file gui_v2.cpp.

◆ getScrollDownButton()

Button* Kyra::GUI_v2::getScrollDownButton ( )
inlineprotectedvirtual

Implements Kyra::GUI_v1.

Definition at line 144 of file gui_v2.h.

◆ getScrollDownButtonHandler()

Button::Callback Kyra::GUI_v2::getScrollDownButtonHandler ( ) const
inlineprotectedvirtual

Implements Kyra::GUI_v1.

Definition at line 151 of file gui_v2.h.

◆ getScrollUpButton()

Button* Kyra::GUI_v2::getScrollUpButton ( )
inlineprotectedvirtual

Implements Kyra::GUI_v1.

Definition at line 143 of file gui_v2.h.

◆ getScrollUpButtonHandler()

Button::Callback Kyra::GUI_v2::getScrollUpButtonHandler ( ) const
inlineprotectedvirtual

Implements Kyra::GUI_v1.

Definition at line 150 of file gui_v2.h.

◆ getTableString()

virtual char* Kyra::GUI_v2::getTableString ( int  id)
protectedpure virtual

Implemented in Kyra::GUI_HoF, and Kyra::GUI_MR.

◆ initStaticData()

virtual void Kyra::GUI_v2::initStaticData ( )
pure virtual

Implemented in Kyra::GUI_HoF, and Kyra::GUI_MR.

◆ nameInputProcess()

const char * Kyra::GUI_v2::nameInputProcess ( char *  buffer,
int  x,
int  y,
uint8  c1,
uint8  c2,
uint8  c3,
int  bufferSize 
)
protected

Definition at line 739 of file gui_v2.cpp.

◆ processButton()

void Kyra::GUI_v2::processButton ( Button button)
virtual

Implements Kyra::GUI_v1.

Definition at line 56 of file gui_v2.cpp.

◆ processButtonList()

int Kyra::GUI_v2::processButtonList ( Button button,
uint16  inputFlag,
int8  mouseWheel 
)
virtual

_screen_cursorDisable

Implements Kyra::GUI_v1.

Definition at line 133 of file gui_v2.cpp.

◆ quitOptionsMenu()

int Kyra::GUI_v2::quitOptionsMenu ( Button caller)
protected

Definition at line 526 of file gui_v2.cpp.

◆ renewHighlight()

void Kyra::GUI_v2::renewHighlight ( Menu menu)
protected

Definition at line 410 of file gui_v2.cpp.

◆ restorePage1()

void Kyra::GUI_v2::restorePage1 ( const uint8 buffer)
protected

Definition at line 427 of file gui_v2.cpp.

◆ restorePalette()

virtual void Kyra::GUI_v2::restorePalette ( )
inlineprotectedvirtual

Reimplemented in Kyra::GUI_HoF.

Definition at line 126 of file gui_v2.h.

◆ resumeGame()

int Kyra::GUI_v2::resumeGame ( Button caller)
protected

Definition at line 520 of file gui_v2.cpp.

◆ saveMenu()

int Kyra::GUI_v2::saveMenu ( Button caller)
protected

Definition at line 586 of file gui_v2.cpp.

◆ scrollDownButton()

int Kyra::GUI_v2::scrollDownButton ( Button button)
protected

Definition at line 500 of file gui_v2.cpp.

◆ scrollUpButton()

int Kyra::GUI_v2::scrollUpButton ( Button button)
protected

Definition at line 480 of file gui_v2.cpp.

◆ setupOptionsButtons()

virtual void Kyra::GUI_v2::setupOptionsButtons ( )
protectedpure virtual

Implemented in Kyra::GUI_HoF, and Kyra::GUI_MR.

◆ setupPalette()

virtual void Kyra::GUI_v2::setupPalette ( )
inlineprotectedvirtual

Reimplemented in Kyra::GUI_HoF.

Definition at line 125 of file gui_v2.h.

◆ setupSavegameNames()

void Kyra::GUI_v2::setupSavegameNames ( Menu menu,
int  num 
)
protected

Definition at line 431 of file gui_v2.cpp.

◆ sliderHandler()

virtual int Kyra::GUI_v2::sliderHandler ( Button caller)
protectedpure virtual

Implemented in Kyra::GUI_HoF, and Kyra::GUI_MR.

◆ textFieldColor1()

virtual uint8 Kyra::GUI_v2::textFieldColor1 ( ) const
protectedpure virtual

Implemented in Kyra::GUI_MR, and Kyra::GUI_HoF.

◆ textFieldColor2()

virtual uint8 Kyra::GUI_v2::textFieldColor2 ( ) const
protectedpure virtual

Implemented in Kyra::GUI_MR, and Kyra::GUI_HoF.

◆ textFieldColor3()

virtual uint8 Kyra::GUI_v2::textFieldColor3 ( ) const
protectedpure virtual

Implemented in Kyra::GUI_MR, and Kyra::GUI_HoF.

◆ toggleText()

int Kyra::GUI_v2::toggleText ( Button caller)
protected

Definition at line 544 of file gui_v2.cpp.

◆ toggleWalkspeed()

int Kyra::GUI_v2::toggleWalkspeed ( Button caller)
protected

Definition at line 532 of file gui_v2.cpp.

◆ updateButton()

void Kyra::GUI_v2::updateButton ( Button button)
protectedvirtual

Reimplemented from Kyra::GUI_v1.

Definition at line 372 of file gui_v2.cpp.

Member Data Documentation

◆ _audioOptions

Menu Kyra::GUI_v2::_audioOptions
protected

Definition at line 139 of file gui_v2.h.

◆ _backUpButtonList

Button* Kyra::GUI_v2::_backUpButtonList
protected

Definition at line 120 of file gui_v2.h.

◆ _buttonListChanged

bool Kyra::GUI_v2::_buttonListChanged
protected

Definition at line 119 of file gui_v2.h.

◆ _cancelNameInput

bool Kyra::GUI_v2::_cancelNameInput
protected

Definition at line 213 of file gui_v2.h.

◆ _choice

bool Kyra::GUI_v2::_choice
protected

Definition at line 224 of file gui_v2.h.

◆ _choiceMenu

Menu Kyra::GUI_v2::_choiceMenu
protected

Definition at line 139 of file gui_v2.h.

◆ _currentMenu

Menu* Kyra::GUI_v2::_currentMenu
protected

Definition at line 160 of file gui_v2.h.

◆ _deathMenu

Menu Kyra::GUI_v2::_deathMenu
protected

Definition at line 139 of file gui_v2.h.

◆ _finishNameInput

bool Kyra::GUI_v2::_finishNameInput
protected

Definition at line 213 of file gui_v2.h.

◆ _flagsModifier

uint16 Kyra::GUI_v2::_flagsModifier
protected

Definition at line 122 of file gui_v2.h.

◆ _gameOptions

Menu Kyra::GUI_v2::_gameOptions
protected

Definition at line 139 of file gui_v2.h.

◆ _isChoiceMenu

bool Kyra::GUI_v2::_isChoiceMenu
protected

Definition at line 165 of file gui_v2.h.

◆ _isDeathMenu

bool Kyra::GUI_v2::_isDeathMenu
protected

Definition at line 162 of file gui_v2.h.

◆ _isDeleteMenu

bool Kyra::GUI_v2::_isDeleteMenu
protected

Definition at line 164 of file gui_v2.h.

◆ _isLoadMenu

bool Kyra::GUI_v2::_isLoadMenu
protected

Definition at line 161 of file gui_v2.h.

◆ _isOptionsMenu

bool Kyra::GUI_v2::_isOptionsMenu
protected

Definition at line 166 of file gui_v2.h.

◆ _isSaveMenu

bool Kyra::GUI_v2::_isSaveMenu
protected

Definition at line 163 of file gui_v2.h.

◆ _loadedSave

bool Kyra::GUI_v2::_loadedSave
protected

Definition at line 168 of file gui_v2.h.

◆ _loadMenu

Menu Kyra::GUI_v2::_loadMenu
protected

Definition at line 139 of file gui_v2.h.

◆ _madeSave

bool Kyra::GUI_v2::_madeSave
protected

Definition at line 167 of file gui_v2.h.

◆ _mainMenu

Menu Kyra::GUI_v2::_mainMenu
protected

Definition at line 139 of file gui_v2.h.

◆ _menuButtons

Button Kyra::GUI_v2::_menuButtons[7]
protected

Definition at line 136 of file gui_v2.h.

◆ _noLoadProcess

bool Kyra::GUI_v2::_noLoadProcess
protected

Definition at line 183 of file gui_v2.h.

◆ _noSaveProcess

bool Kyra::GUI_v2::_noSaveProcess
protected

Definition at line 188 of file gui_v2.h.

◆ _reloadTemporarySave

bool Kyra::GUI_v2::_reloadTemporarySave
protected

Definition at line 170 of file gui_v2.h.

◆ _restartGame

bool Kyra::GUI_v2::_restartGame
protected

Definition at line 169 of file gui_v2.h.

◆ _saveDescription

char Kyra::GUI_v2::_saveDescription[0x51]
protected

Definition at line 190 of file gui_v2.h.

◆ _savegameOffset

int Kyra::GUI_v2::_savegameOffset
protected

Definition at line 172 of file gui_v2.h.

◆ _saveMenu

Menu Kyra::GUI_v2::_saveMenu
protected

Definition at line 139 of file gui_v2.h.

◆ _savenameMenu

Menu Kyra::GUI_v2::_savenameMenu
protected

Definition at line 139 of file gui_v2.h.

◆ _saveSlot

int Kyra::GUI_v2::_saveSlot
protected

Definition at line 189 of file gui_v2.h.

◆ _screen

Screen_v2* Kyra::GUI_v2::_screen
protected

Definition at line 117 of file gui_v2.h.

◆ _scrollDownButton

Button Kyra::GUI_v2::_scrollDownButton
protected

Definition at line 138 of file gui_v2.h.

◆ _scrollDownFunctor

Button::Callback Kyra::GUI_v2::_scrollDownFunctor
protected

Definition at line 149 of file gui_v2.h.

◆ _scrollUpButton

Button Kyra::GUI_v2::_scrollUpButton
protected

Definition at line 137 of file gui_v2.h.

◆ _scrollUpFunctor

Button::Callback Kyra::GUI_v2::_scrollUpFunctor
protected

Definition at line 148 of file gui_v2.h.

◆ _sliderBarsPosition

const int Kyra::GUI_v2::_sliderBarsPosition
staticprotected
Initial value:
= {
0x92, 0x1F, 0x92, 0x30, 0x92, 0x41, 0x92, 0x52
}

Definition at line 180 of file gui_v2.h.

◆ _sliderButtons

Button Kyra::GUI_v2::_sliderButtons[3][4]
protected

Definition at line 153 of file gui_v2.h.

◆ _sliderHandlerFunctor

Button::Callback Kyra::GUI_v2::_sliderHandlerFunctor
protected

Definition at line 209 of file gui_v2.h.

◆ _slotToDelete

int Kyra::GUI_v2::_slotToDelete
protected

Definition at line 197 of file gui_v2.h.

◆ _specialProcessButton

Button* Kyra::GUI_v2::_specialProcessButton
protected

Definition at line 121 of file gui_v2.h.

◆ _vm

KyraEngine_v2* Kyra::GUI_v2::_vm
protected

Definition at line 116 of file gui_v2.h.


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