#include <SignContractScreen.hpp>
|
| void | load () |
| | Loads graphics data into memory & pushes to VRAM.
|
| void | unload () |
| | Unloads graphics data from memory.
|
| int | update () |
| | Frame update function for the SignContractScreen. Handles cursor blinking and button presses.
|
| void | renderSprites () override |
| | Renders the background and status text to the screen.
|
| int | onTouch (touchPosition *touch) override |
| | Handles touch input. Will check if any of the keyboard keys were pressed and execute any necessary actions.
|
| virtual void | triggerAction (UIAction action) |
| | Trigger an action to be handled.
|
| virtual void | renderText () |
| | Draws the screen's text. Called after the background is shown.
|
| void | removeSprites () |
| | Clears the displayed sprites from the screen.
|
| virtual | ~UIScreen ()=default |
| | UIScreen (bool iIsMain) |
|
| | SignContractScreen () |
| | ~SignContractScreen () |
| void | loadSaveDataName () |
| | Loads the name from the save data file into a local variable.
|
| void | loadBackgrounds () |
| | Loads background assets into RAM.
|
| void | switchBackground () |
| | Switches the rendered background between the default and shift/capslock backgrounds.
|
| void | renderBackground (int bgIndex=0) |
| | Pushes background data into VRAM so that it is rendered on screen.
|
| void | unloadBackgrounds () |
| | Clears the current background from VRAM and unloads the background data from RAM.
|
| void | writeCharacter (char c) |
| | Writes a character to the name buffer at the current index and increments the index.
|
| void | updateStatus (std::string status) |
| | Clears any old status text and writes a new status to the status text box.
|
| void | renderName () |
| | Clears any old name text and writes the current name buffer to the name input area.
|
| void | renderCursor () |
| | Renders a small cursor at the current slot where the next character will be written in the name buffer.
|
| void | clearCursor () |
| | Clears the previously rendered cursor from the screen.
|
| int | confirmAction () |
| | Handles the logic for when the user presses the confirm button.
|
| void | backSpaceAction () |
| | Handles logic for when user presses the backspace button.
|
| void | moveCursorLeft () |
| | Moves the cursor to the left in the name input area.
|
| void | moveCursorRight () |
| | Moves the cursor to the right in the name input area.
|
| void | sendCursorToEndOfLastName () |
| | Helper function to set the cursor index to the end of the last name, if any characters have been written to the last name buffer. If no characters have been written, the cursor will be set to the start of the last name buffer.
|
|
| int | bgId = -1 |
| bool | isMain = false |
| OamState * | oam = nullptr |
| bool | isLoaded = false |
| 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.
|
Definition at line 17 of file SignContractScreen.hpp.
◆ SignContractScreen()
| SignContractScreen::SignContractScreen |
( |
| ) |
|
|
inlineprivate |
◆ ~SignContractScreen()
| SignContractScreen::~SignContractScreen |
( |
| ) |
|
|
inlineprivate |
◆ backSpaceAction()
| void SignContractScreen::backSpaceAction |
( |
| ) |
|
|
private |
◆ clearCursor()
| void SignContractScreen::clearCursor |
( |
| ) |
|
|
private |
◆ confirmAction()
| int SignContractScreen::confirmAction |
( |
| ) |
|
|
private |
Handles the logic for when the user presses the confirm button.
- Returns
- int Return code to indicate if the game should proceed to the next view
Definition at line 342 of file SignContractScreen.cpp.
◆ create()
| void SignContractScreen::create |
( |
| ) |
|
|
static |
◆ destroy()
| void SignContractScreen::destroy |
( |
| ) |
|
|
static |
◆ getInstance()
◆ load()
| void SignContractScreen::load |
( |
| ) |
|
|
virtual |
◆ loadBackgrounds()
| void SignContractScreen::loadBackgrounds |
( |
| ) |
|
|
private |
Loads background assets into RAM.
- Note
- This does not push the backgrounds into VRAM. The background assets will remain in memory until they are unloaded.
Definition at line 100 of file SignContractScreen.cpp.
◆ loadSaveDataName()
| void SignContractScreen::loadSaveDataName |
( |
| ) |
|
|
private |
◆ moveCursorLeft()
| void SignContractScreen::moveCursorLeft |
( |
| ) |
|
|
private |
◆ moveCursorRight()
| void SignContractScreen::moveCursorRight |
( |
| ) |
|
|
private |
◆ onTouch()
| int SignContractScreen::onTouch |
( |
touchPosition * | touch | ) |
|
|
overridevirtual |
Handles touch input. Will check if any of the keyboard keys were pressed and execute any necessary actions.
- Parameters
-
| touch | Touch input variable |
- Returns
- int Return code to indicate if the game should proceed to the next view
Reimplemented from UIScreen.
Definition at line 196 of file SignContractScreen.cpp.
◆ renderBackground()
| void SignContractScreen::renderBackground |
( |
int | bgIndex = 0 | ) |
|
|
private |
Pushes background data into VRAM so that it is rendered on screen.
- Parameters
-
| bgIndex | The id of the background to render. 0 = default, 1 = shift/capslock |
Definition at line 120 of file SignContractScreen.cpp.
◆ renderCursor()
| void SignContractScreen::renderCursor |
( |
| ) |
|
|
private |
Renders a small cursor at the current slot where the next character will be written in the name buffer.
- Note
- Will write "End" at the end behind the name input area if the index exceeds the array bounds of the name
Definition at line 310 of file SignContractScreen.cpp.
◆ renderName()
| void SignContractScreen::renderName |
( |
| ) |
|
|
private |
Clears any old name text and writes the current name buffer to the name input area.
Definition at line 285 of file SignContractScreen.cpp.
◆ renderSprites()
| void SignContractScreen::renderSprites |
( |
| ) |
|
|
overridevirtual |
◆ sendCursorToEndOfLastName()
| void SignContractScreen::sendCursorToEndOfLastName |
( |
| ) |
|
|
private |
Helper function to set the cursor index to the end of the last name, if any characters have been written to the last name buffer. If no characters have been written, the cursor will be set to the start of the last name buffer.
Definition at line 417 of file SignContractScreen.cpp.
◆ switchBackground()
| void SignContractScreen::switchBackground |
( |
| ) |
|
|
private |
Switches the rendered background between the default and shift/capslock backgrounds.
Definition at line 132 of file SignContractScreen.cpp.
◆ unload()
| void SignContractScreen::unload |
( |
| ) |
|
|
virtual |
◆ unloadBackgrounds()
| void SignContractScreen::unloadBackgrounds |
( |
| ) |
|
|
private |
Clears the current background from VRAM and unloads the background data from RAM.
Definition at line 146 of file SignContractScreen.cpp.
◆ update()
| int SignContractScreen::update |
( |
| ) |
|
Frame update function for the SignContractScreen. Handles cursor blinking and button presses.
- Returns
- int Returns code to indicate if the game should proceed to the next view. 0 = no action, 1 = proceed to next view
Definition at line 159 of file SignContractScreen.cpp.
◆ updateStatus()
| void SignContractScreen::updateStatus |
( |
std::string | status | ) |
|
|
private |
Clears any old status text and writes a new status to the status text box.
- Parameters
-
| status | String of the status to write |
Definition at line 279 of file SignContractScreen.cpp.
◆ writeCharacter()
| void SignContractScreen::writeCharacter |
( |
char | c | ) |
|
|
private |
Writes a character to the name buffer at the current index and increments the index.
- Parameters
-
| c | The character to write to the name buffer |
- Note
- Will stop writing characters if the index is at the end of the name buffer (20 characters)
Definition at line 251 of file SignContractScreen.cpp.
◆ bgPath
| const std::string SignContractScreen::bgPath = "graphics/SignContractView/backgrounds/" |
|
private |
◆ bgTextBufferSub
| uint16_t* SignContractScreen::bgTextBufferSub = nullptr |
|
private |
◆ bgUI
◆ cursorRendered
| bool SignContractScreen::cursorRendered = false |
|
private |
◆ firstName
| char SignContractScreen::firstName[10] = " " |
|
private |
◆ FONT_NAME
| std::string SignContractScreen::FONT_NAME = "cosmetica" |
|
private |
◆ FONT_SIZE
| int SignContractScreen::FONT_SIZE = 10 |
|
private |
◆ graphics
◆ index
| int SignContractScreen::index = 0 |
|
private |
◆ instance
◆ isCapsLock
| bool SignContractScreen::isCapsLock = false |
|
private |
◆ isLastName
| bool SignContractScreen::isLastName = true |
|
private |
◆ isShift
| bool SignContractScreen::isShift = false |
|
private |
◆ keyboard
◆ lastName
| char SignContractScreen::lastName[10] = " " |
|
private |
◆ lineSpacing
| int SignContractScreen::lineSpacing = 0 |
|
private |
◆ signContractUI
| ae::Entity* SignContractScreen::signContractUI = nullptr |
|
private |
◆ text
The documentation for this class was generated from the following files: