#include <userinterface.h>
Public Member Functions | |
UserInterface (StarkEngine *vm, Gfx::Driver *gfx) | |
void | init () |
void | onGameLoop () |
void | render () |
void | handleMouseMove (const Common::Point &pos) |
void | handleMouseUp () |
void | handleClick () |
void | handleRightClick () |
void | handleDoubleClick () |
void | handleEscape () |
void | notifyShouldExit () |
void | inventoryOpen (bool open) |
bool | shouldExit () |
void | requestFMVPlayback (const Common::Path &name) |
void | onFMVStopped () |
bool | skipFMV () |
void | changeScreen (Screen::Name screenName) |
void | backPrevScreen () |
void | doQueuedScreenChange () |
void | requestQuitToMainMenu () |
void | restoreScreenHistory () |
bool | isInGameScreen () const |
bool | isInSaveLoadMenuScreen () const |
bool | isInDiaryIndexScreen () const |
bool | isInventoryOpen () const |
bool | isInteractive () const |
void | setInteractive (bool interactive) |
void | notifyInventoryItemEnabled (uint16 itemIndex) |
void | notifyDiaryEntryEnabled () |
int16 | getSelectedInventoryItem () const |
void | selectInventoryItem (int16 itemIndex) |
void | clearLocationDependentState () |
void | optionsOpen () |
void | markInteractionDenied () |
bool | wasInteractionDenied () const |
void | onScreenChanged () |
void | saveGameScreenThumbnail () |
void | freeGameScreenThumbnail () |
const Graphics::Surface * | getGameWindowThumbnail () const |
template<class T > | |
void | confirm (const Common::String &message, T *instance, void(T::*confirmCallBack)()) |
template<class T > | |
void | confirm (GameMessage::TextKey key, T *instance, void(T::*confirmCallBack)()) |
void | confirm (const Common::String &message, Common::Functor0< void > *confirmCallBack) |
void | confirm (GameMessage::TextKey key, Common::Functor0< void > *confirmCallBack) |
void | toggleScreen (Screen::Name screenName) |
bool | hasToggleSubtitleRequest () |
void | performToggleSubtitle () |
void | handleActions (Common::CustomEventType customType) |
void | handleKeyPress (const Common::KeyState &keyState) |
Facade object for interacting with the user interface from the rest of the engine
void Stark::UserInterface::onGameLoop | ( | ) |
Called once per game loop.
void Stark::UserInterface::requestFMVPlayback | ( | const Common::Path & | name | ) |
Start playing a FMV
void Stark::UserInterface::onFMVStopped | ( | ) |
FMV playback has just ended
bool Stark::UserInterface::skipFMV | ( | ) |
Abort the currently playing FMV, if any
void Stark::UserInterface::changeScreen | ( | Screen::Name | screenName | ) |
Set the currently displayed screen
void Stark::UserInterface::backPrevScreen | ( | ) |
Back to the previous displayed screen
void Stark::UserInterface::doQueuedScreenChange | ( | ) |
Apply the scheduled screen change if any
|
inline |
Back to the main menu screen and rest resources
void Stark::UserInterface::restoreScreenHistory | ( | ) |
Restore the screen travelling history to the initial state
bool Stark::UserInterface::isInGameScreen | ( | ) | const |
Is the game screen currently displayed?
bool Stark::UserInterface::isInSaveLoadMenuScreen | ( | ) | const |
Is the save & load menu screen currently displayed?
bool Stark::UserInterface::isInDiaryIndexScreen | ( | ) | const |
Is the diary index screen currently displayed?
bool Stark::UserInterface::isInventoryOpen | ( | ) | const |
Is the inventory panel being displayed?
bool Stark::UserInterface::isInteractive | ( | ) | const |
Can the player interact with the game world?
void Stark::UserInterface::setInteractive | ( | bool | interactive | ) |
Allow or forbid interaction with the game world
void Stark::UserInterface::notifyInventoryItemEnabled | ( | uint16 | itemIndex | ) |
A new item has been added to the player's inventory
void Stark::UserInterface::notifyDiaryEntryEnabled | ( | ) |
A new entry has been added to the player's diary
int16 Stark::UserInterface::getSelectedInventoryItem | ( | ) | const |
Access the selected inventory item
void Stark::UserInterface::clearLocationDependentState | ( | ) |
Clears all the pointers to data that may be location dependent
void Stark::UserInterface::optionsOpen | ( | ) |
Open the in game options menu
void Stark::UserInterface::markInteractionDenied | ( | ) |
Signal a denied interaction that occurred during a non interactive period
bool Stark::UserInterface::wasInteractionDenied | ( | ) | const |
Was a player interaction with the world denied during this non interactive period?
void Stark::UserInterface::onScreenChanged | ( | ) |
The screen resolution just changed, rebuild resolution dependent data
void Stark::UserInterface::saveGameScreenThumbnail | ( | ) |
Grab a screenshot of the game screen and store it in the class context as a thumbnail
void Stark::UserInterface::freeGameScreenThumbnail | ( | ) |
Clear the currently stored game screen thumbnail, if any
const Graphics::Surface* Stark::UserInterface::getGameWindowThumbnail | ( | ) | const |
Get the currently stored game screen thumbnail, returns nullptr if there is not thumbnail stored
void Stark::UserInterface::confirm | ( | const Common::String & | message, |
T * | instance, | ||
void(T::*)() | confirmCallBack | ||
) |
Display a confirmation dialog
Close the dialog when the cancel button is pressed, call a callback when the confirm button is pressed.
void Stark::UserInterface::toggleScreen | ( | Screen::Name | screenName | ) |
Directly open or close a screen
|
inline |
Toggle subtitles on and off
void Stark::UserInterface::handleActions | ( | Common::CustomEventType | customType | ) |
Perform an action after a keypress