persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
UIScreen Class Referenceabstract

#include <UIScreen.hpp>

Inheritance diagram for UIScreen:

Public Member Functions

virtual void load ()=0
 Loads graphics data into memory & pushes to VRAM.
virtual void unload ()=0
 Unloads graphics data from memory.
virtual void triggerAction (UIAction action)
 Trigger an action to be handled.
virtual void renderSprites ()
 Applys sprite colour palette & draws sprites to screen.
virtual void renderText ()
 Draws the screen's text. Called after the background is shown.
void removeSprites ()
 Clears the displayed sprites from the screen.
virtual int onTouch (touchPosition *touch)
 Hook to allow touch response.
virtual ~UIScreen ()=default
 UIScreen (bool iIsMain)

Public Attributes

int bgId = -1
bool isMain = false
OamState * oam = nullptr
bool isLoaded = false

Protected Member Functions

void moveSprite (int spriteId, int x, int y)
 Moves the specified sprite to the specified position on the screen.
void showSprite (int spriteId)
 Shows the specified sprite on the screen.
void hideSprite (int spriteId)
 Hides the specified sprite on the screen.

Detailed Description

Definition at line 6 of file UIScreen.hpp.

Constructor & Destructor Documentation

◆ ~UIScreen()

virtual UIScreen::~UIScreen ( )
virtualdefault

◆ UIScreen()

UIScreen::UIScreen ( bool iIsMain)
inline

Definition at line 55 of file UIScreen.hpp.

Here is the caller graph for this function:

Member Function Documentation

◆ hideSprite()

void UIScreen::hideSprite ( int spriteId)
protected

Hides the specified sprite on the screen.

Parameters
spriteIdthe sprite to hide

Definition at line 43 of file UIScreen.cpp.

◆ load()

virtual void UIScreen::load ( )
pure virtual

Loads graphics data into memory & pushes to VRAM.

Implemented in DialogueScreen, MenuHUDScreen, PauseMenuScreen, and SignContractScreen.

Here is the caller graph for this function:

◆ moveSprite()

void UIScreen::moveSprite ( int spriteId,
int x,
int y )
protected

Moves the specified sprite to the specified position on the screen.

Parameters
spriteIdthe sprite to move
xthe x position on the screen
ythe y position on the screen

Definition at line 25 of file UIScreen.cpp.

Here is the caller graph for this function:

◆ onTouch()

int UIScreen::onTouch ( touchPosition * touch)
virtual

Hook to allow touch response.

Parameters
touchtouch input
Returns
int a value that acts as an id, used by calling code to understand which area has been touched

Reimplemented in MenuHUDScreen, PauseMenuScreen, and SignContractScreen.

Definition at line 20 of file UIScreen.cpp.

◆ removeSprites()

void UIScreen::removeSprites ( )

Clears the displayed sprites from the screen.

Definition at line 11 of file UIScreen.cpp.

Here is the caller graph for this function:

◆ renderSprites()

void UIScreen::renderSprites ( )
virtual

Applys sprite colour palette & draws sprites to screen.

Reimplemented in DialogueScreen, MenuHUDScreen, PauseMenuScreen, and SignContractScreen.

Definition at line 7 of file UIScreen.cpp.

Here is the caller graph for this function:

◆ renderText()

virtual void UIScreen::renderText ( )
inlinevirtual

Draws the screen's text. Called after the background is shown.

Reimplemented in MenuHUDScreen, and PauseMenuScreen.

Definition at line 38 of file UIScreen.hpp.

Here is the caller graph for this function:

◆ showSprite()

void UIScreen::showSprite ( int spriteId)
protected

Shows the specified sprite on the screen.

Parameters
spriteIdthe sprite to show

Definition at line 34 of file UIScreen.cpp.

◆ triggerAction()

void UIScreen::triggerAction ( UIAction action)
virtual

Trigger an action to be handled.

Reimplemented in DialogueScreen.

Definition at line 3 of file UIScreen.cpp.

◆ unload()

virtual void UIScreen::unload ( )
pure virtual

Unloads graphics data from memory.

Implemented in DialogueScreen, MenuHUDScreen, PauseMenuScreen, and SignContractScreen.

Here is the caller graph for this function:

Member Data Documentation

◆ bgId

int UIScreen::bgId = -1

Definition at line 10 of file UIScreen.hpp.

◆ isLoaded

bool UIScreen::isLoaded = false

Definition at line 13 of file UIScreen.hpp.

◆ isMain

bool UIScreen::isMain = false

Definition at line 11 of file UIScreen.hpp.

◆ oam

OamState* UIScreen::oam = nullptr

Definition at line 12 of file UIScreen.hpp.


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