mirror of
https://github.com/risingPhil/PokeMe64.git
synced 2026-09-08 08:45:16 -05:00
Feature/add about screen (#1)
Adds the "About" scene, which displays the version info and credits. The user can scroll up/down through this screen.
This commit is contained in:
@@ -8,10 +8,24 @@
|
||||
|
||||
typedef struct TextRenderSettings
|
||||
{
|
||||
/**
|
||||
* @brief The libdragon font id (used as handle) as known by libdragon. FontManager manages the various fonts
|
||||
*/
|
||||
uint8_t fontId;
|
||||
/**
|
||||
* @brief The style id used to render the text. (this is a handle/id to a previously registered rdpq_fontstyle_t struct for the fontId specified earlier)
|
||||
*/
|
||||
uint8_t fontStyleId;
|
||||
int16_t charSpacing; ///< Extra spacing between chars (in addition to glyph width and kerning)
|
||||
int16_t lineSpacing; ///< Extra spacing between lines (in addition to font height)
|
||||
/**
|
||||
* @brief The horizontal alignment of the text
|
||||
*/
|
||||
rdpq_align_t halign;
|
||||
/**
|
||||
* @brief The vertical alignment of the text
|
||||
*/
|
||||
rdpq_valign_t valign;
|
||||
} TextRenderSettings;
|
||||
|
||||
typedef struct SpriteRenderSettings SpriteRenderSettings;
|
||||
|
||||
@@ -17,6 +17,7 @@ void activateFrameLog(void* context, const void* param);
|
||||
void advanceDialog(void* context, const void* param);
|
||||
|
||||
void goToTestScene(void* context, const void* param);
|
||||
void goToAboutScene(void* context, const void* param);
|
||||
|
||||
void goToGen1DistributionPokemonMenu(void* context, const void* param);
|
||||
void goToGen2DistributionPokemonMenu(void* context, const void* param);
|
||||
|
||||
52
include/scenes/AboutScene.h
Normal file
52
include/scenes/AboutScene.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#ifndef _ABOUTSCENE_H
|
||||
#define _ABOUTSCENE_H
|
||||
|
||||
#include "scenes/AbstractUIScene.h"
|
||||
#include "widget/ScrollWidget.h"
|
||||
#include "widget/ImageWidget.h"
|
||||
#include "widget/TextWidget.h"
|
||||
|
||||
/**
|
||||
* @brief This scene shows the version number and credits of the PokeMe64 project.
|
||||
*/
|
||||
class AboutScene : public AbstractUIScene
|
||||
{
|
||||
public:
|
||||
AboutScene(SceneDependencies& deps, void* context);
|
||||
virtual ~AboutScene();
|
||||
|
||||
void init() override;
|
||||
void destroy() override;
|
||||
|
||||
bool handleUserInput(joypad_port_t port, const joypad_inputs_t& inputs) override;
|
||||
void render(RDPQGraphics& gfx, const Rectangle& sceneBounds) override;
|
||||
protected:
|
||||
private:
|
||||
uint8_t fontIdArial_;
|
||||
uint8_t fontArialStyleWhiteId_;
|
||||
sprite_t* logoLibDragon_;
|
||||
sprite_t* logoBulbagarden_;
|
||||
sprite_t* logoRetroGameMechanicsExplained_;
|
||||
sprite_t* logoDataCrystal_;
|
||||
sprite_t* logoPKHEX_;
|
||||
sprite_t* logoGBDevIO_;
|
||||
sprite_t* logoNESDevWiki_;
|
||||
ScrollWidget scrollWidget_;
|
||||
TextWidget headerText_;
|
||||
ImageWidget imgDragonWidget_;
|
||||
ImageWidget imgBulbagardenWidget_;
|
||||
ImageWidget imgRetroGameMechanicsExplained_;
|
||||
ImageWidget imgDataCrystal_;
|
||||
TextWidget dataCrystalText_;
|
||||
ImageWidget imgPKHEX_;
|
||||
TextWidget PKHEXText_;
|
||||
TextWidget pretPokeCrystalText_;
|
||||
ImageWidget imgGBDevIO_;
|
||||
TextWidget gbDevIOText_;
|
||||
ImageWidget imgNESDevWiki_;
|
||||
TextWidget otherCreditsText_;
|
||||
WidgetFocusChainSegment scrollFocusSegment_;
|
||||
bool bButtonPressed_;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -18,7 +18,8 @@ enum class SceneType
|
||||
MENU,
|
||||
DISTRIBUTION_POKEMON_LIST,
|
||||
STATS,
|
||||
TEST
|
||||
TEST,
|
||||
ABOUT
|
||||
};
|
||||
|
||||
typedef struct SceneDependencies
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
typedef struct ImageWidgetStyle
|
||||
{
|
||||
Dimensions size;
|
||||
struct {
|
||||
/**
|
||||
* (optional) background sprite
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
typedef struct TextWidgetStyle
|
||||
{
|
||||
Dimensions size;
|
||||
TextRenderSettings renderSettingsFocused;
|
||||
TextRenderSettings renderSettingsNotFocused;
|
||||
uint16_t backgroundColor_; // RGBA16
|
||||
} TextWidgetStyle;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user