ScummVM API documentation
Macs2::View1 Class Reference
Inheritance diagram for Macs2::View1:
Macs2::UIElement

Classes

struct  BorderStyle
 
struct  OverlayTextEntry
 

Public Types

enum  UiPanelState : uint16 {
  kUiPanelNone = 0, kUiPanelActionBar = 1, kUiPanelInventory = 2, kUiPanelContainerInventory = 3,
  kUiPanelSaveLoad = 4
}
 
enum  PendingPanelRequest : uint16 {
  kPanelRequestNone = 0, kPanelRequestInventory = 1, kPanelRequestContainerInventory = 2, kPanelRequestSaveLoad = 3,
  kPanelRequestSaveLoadActive = 4
}
 
enum  InventoryButtonIndex {
  Look = 0, Hand = 1, Up = 2, Down = 3,
  Drop = 4, Close = 5
}
 
enum  MainMenuButtonIndex {
  Talk = 0, Look = 1, Use = 2, Walk = 3,
  Inventory = 4, InventoryUse = 5, Map = 6, SaveLoad = 7,
  Close = 8
}
 

Public Member Functions

bool hasScummVerbUI () const
 
bool shouldShowScummVerbUI () const
 
void ensureScummVerbUI ()
 
bool isHelpButtonDisabled () const
 
void restoreUiPaletteEntries ()
 
void clearClickedButtonIndex ()
 
AnimFramegetInventoryIcon (GameObject *gameObject)
 
void flushPendingCharacterDeletes ()
 
void transferPickupTarget (GameObject *targetObject)
 
void finishPanelCloseAfterRelease (UiPanelState closedFromState)
 
void drawPathfindingPoints (Graphics::ManagedSurface &s)
 
void drawDebugOutput (Graphics::ManagedSurface &s)
 
void drawPath (Graphics::ManagedSurface &s)
 
void setInventorySource (GameObject *newInventorySource)
 
void refreshProtagonistInventoryAfterLoad (uint16 actorIndex)
 
void openInventory (GameObject *newInventorySource)
 
void closeInventory ()
 
bool isInventorySourceProtagonist () const
 
void transferInventoryItem (GameObject *item, GameObject *targetContainer)
 
CharactergetCharacterByIndex (uint16 index) const
 
void rebuildCharacterLookupTable () const
 
int getCharacterArrayIndex (const Character *c) const
 
void updateCursor (const byte *palette=nullptr)
 
bool msgFocus (const FocusMessage &msg) override
 
bool msgKeypress (const KeypressMessage &msg) override
 
bool msgAction (const ActionMessage &msg) override
 
bool msgMouseDown (const MouseDownMessage &msg) override
 
bool msgMouseUp (const MouseUpMessage &msg) override
 
bool msgMouseMove (const MouseMoveMessage &msg) override
 
void draw () override
 
bool tick () override
 
void drawInventory (Graphics::ManagedSurface &s)
 
GameObjectgetClickedInventoryItem (const Common::Point &p)
 
void openMainMenu (Common::Point clickedPosition)
 
void enterMapMode ()
 
void layoutActionBarButtons ()
 
void drawMainMenu (Graphics::ManagedSurface &s)
 
void drawSceneUpdate ()
 
void handleTextBoxInput ()
 
void dismissDialoguePanel ()
 
bool handleDialogueChoiceClick (int clickY, int clickX)
 
void startFading (uint16 speed=4)
 
void fadePaletteToBlack (uint16 speed, const byte *sourcePalette)
 
void startFadeToBlack (uint16 speed=4)
 
void startFadingWithSpeed (uint16 speed)
 
void instantSceneCut ()
 
void presentFrame ()
 
void showSpeechAct (uint16 characterIndex, const Common::Array< Common::String > &strings, const Common::Point &position, bool onRightSide=false)
 
void drawNinePatchBorder (const Common::Point &pos, const Common::Point &size, const BorderStyle &style, bool fillCenter, bool fillSides, Graphics::ManagedSurface &s)
 
void drawBorder (const Common::Point &pos, const Common::Point &size, Graphics::ManagedSurface &s)
 
void drawBorderSide (const Common::Point &pos, const Common::Point &size, Graphics::ManagedSurface &s)
 
Macs2::AnimFramegetUISprite (uint32 offset)
 
void drawHorizontalBorderHighlight (const Common::Point &pos, int16 width, uint32 spriteAddress, Graphics::ManagedSurface &s)
 
void drawVerticalBorderHighlight (const Common::Point &pos, int16 height, uint32 spriteAddress, Graphics::ManagedSurface &s)
 
void drawImageResources (Graphics::ManagedSurface &s)
 
void showDialogueChoice (uint16 speakerObjectID, const Common::Array< Common::StringArray > &choices, const Common::Point &position, bool onRightSide=false)
 
void triggerDialogueChoice (uint8 index)
 
void addOverlayTextEntry (const OverlayTextEntry &entry)
 
void clearOverlayTextEntries ()
 
void drawOverlayTextEntries ()
 
uint16 getHitObjectID (const Common::Point &pos) const
 
- Public Member Functions inherited from Macs2::UIElement
 UIElement (const Common::String &name, UIElement *uiParent)
 
 UIElement (const Common::String &name)
 
void redraw ()
 
Graphics::ManagedSurface getSurface () const
 
virtual UIElementfindView (const Common::String &name)
 

Public Attributes

ScalingValues _scalingValues
 
ViewMode _currentMode = ViewMode::VM_GAME
 
byte _pal [256 *3] = {0}
 
bool _paletteDirty = true
 
bool _isShowingTextBox = false
 
bool _isShowingDialoguePanel = false
 
Common::StringArray _drawnStringBox
 
bool _continueScriptAfterUI = false
 
uint16 _dialogueChoiceCount = 0
 
Common::Array< uint16 > _dialogueChoiceLineCounts
 
SpeechActData currentSpeechActData
 
Graphics::ManagedSurface _backgroundSurface
 
bool _started = false
 
bool _autoclickActive = false
 
Common::Array< Character * > _characters
 
Common::Array< Character * > _pendingCharacterDeletes
 
GameObject_inventorySource = nullptr
 
Common::Array< GameObject * > _inventoryItems
 
GameObject_activeInventoryItem = nullptr
 
Common::Point _stringBoxPosition
 
UiPanelState _uiPanelState = kUiPanelNone
 
bool _isDialogueChoiceInputActive = false
 
PendingPanelRequest _pendingPanelRequest = kPanelRequestNone
 
bool _uiBackgroundRestorePending = false
 
Script::MouseMode _savedCursorMode = Script::MouseMode::Walk
 
uint16 _hoverAreaId = 0
 
uint16 _hoverHotspotId = 0
 
Common::Array< OverlayTextEntry_overlayTextEntries
 

Static Public Attributes

static constexpr uint32 kGameFrameRate = 20
 
static const BorderStyle kBorderRaised
 
static const BorderStyle kBorderPressed
 

Additional Inherited Members

- Protected Member Functions inherited from Macs2::UIElement
virtual bool msgUnfocus (const UnfocusMessage &e)
 
- Protected Attributes inherited from Macs2::UIElement
Common::Array< UIElement * > _children
 
Common::Rect _innerBounds
 
Bounds _bounds
 
bool _needsRedraw = true
 
Common::String _name
 

Member Function Documentation

◆ draw()

void Macs2::View1::draw ( )
overridevirtual

Draws the element

Reimplemented from Macs2::UIElement.

◆ tick()

bool Macs2::View1::tick ( )
overridevirtual

Called for game frame ticks

Reimplemented from Macs2::UIElement.


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