ScummVM API documentation
Stark::DialogBox Class Reference

#include <dialogbox.h>

Inheritance diagram for Stark::DialogBox:
Stark::Window

Public Member Functions

 DialogBox (StarkEngine *vm, Gfx::Driver *gfx, Cursor *cursor)
 
void open (const Common::String &message, ConfirmCallback *confirmCallback, const Common::String &confirmLabel, const Common::String &cancelLabel)
 
void close ()
 
void onScreenChanged ()
 
void onKeyPress (const Common::KeyState &keyState)
 
- Public Member Functions inherited from Stark::Window
 Window (Gfx::Driver *gfx, Cursor *cursor)
 
void handleMouseMove ()
 
void handleClick ()
 
void handleRightClick ()
 
void handleDoubleClick ()
 
void handleGameLoop ()
 
void render ()
 
bool isMouseInside () const
 
bool isVisible () const
 
Graphics::SurfacegetScreenshot () const
 

Protected Member Functions

void onRender () override
 
void onClick (const Common::Point &pos) override
 
- Protected Member Functions inherited from Stark::Window
virtual void onMouseMove (const Common::Point &pos)
 
virtual void onRightClick (const Common::Point &pos)
 
virtual void onDoubleClick (const Common::Point &pos)
 
virtual void onGameLoop ()
 
Common::Point getRelativeMousePosition () const
 

Additional Inherited Members

- Protected Attributes inherited from Stark::Window
Gfx::Driver_gfx
 
Cursor_cursor
 
Common::Rect _position
 
bool _visible
 

Detailed Description

A confirmation dialog with two buttons

The cancel button closes the dialog without action. The confirm button executes a callback.

Member Function Documentation

◆ open()

void Stark::DialogBox::open ( const Common::String message,
ConfirmCallback confirmCallback,
const Common::String confirmLabel,
const Common::String cancelLabel 
)

Make the dialog visible with the specified message

◆ close()

void Stark::DialogBox::close ( )

Hide the dialog performing no action

◆ onScreenChanged()

void Stark::DialogBox::onScreenChanged ( )

Called when the screen resolution changes

◆ onKeyPress()

void Stark::DialogBox::onKeyPress ( const Common::KeyState keyState)

Called when a keyboard key is pressed and the dialog is active


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