metaforce/Runtime/MP1/CQuitGameScreen.hpp

44 lines
1.1 KiB
C++
Raw Permalink Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-12-30 06:37:01 +00:00
#include <optional>
#include "Runtime/CToken.hpp"
#include "Runtime/RetroTypes.hpp"
#include "Runtime/Graphics/Shaders/CColoredQuadFilter.hpp"
2021-06-07 01:40:16 +00:00
#include "Runtime/GuiSys/CGuiFrame.hpp"
2016-12-30 06:37:01 +00:00
2021-04-10 08:42:06 +00:00
namespace metaforce {
2018-02-04 06:46:47 +00:00
struct CFinalInput;
2016-12-30 06:37:01 +00:00
class CGuiTableGroup;
class CGuiTextPane;
2019-01-23 07:52:19 +00:00
class CGuiWidget;
2016-12-30 06:37:01 +00:00
2018-12-08 05:30:43 +00:00
namespace MP1 {
2016-12-30 06:37:01 +00:00
2018-12-08 05:30:43 +00:00
enum class EQuitType { QuitGame, ContinueFromLastSave, SaveProgress, QuitNESMetroid, ContinuePlaying };
2016-12-30 06:37:01 +00:00
2018-12-08 05:30:43 +00:00
enum class EQuitAction { None, Yes, No };
class CQuitGameScreen {
EQuitType x0_type;
TLockedToken<CGuiFrame> x4_frame;
CGuiFrame* x10_loadedFrame = nullptr;
CGuiTableGroup* x14_tablegroup_quitgame = nullptr;
EQuitAction x18_action = EQuitAction::None;
std::optional<CColoredQuadFilter> m_blackScreen;
2018-12-08 05:30:43 +00:00
void SetColors();
2016-12-30 06:37:01 +00:00
public:
2018-12-08 05:30:43 +00:00
void FinishedLoading();
2019-01-23 07:52:19 +00:00
void OnWidgetMouseUp(CGuiWidget* widget, bool cancel);
2018-12-08 05:30:43 +00:00
void DoSelectionChange(CGuiTableGroup* caller, int oldSel);
void DoAdvance(CGuiTableGroup* caller);
EQuitAction Update(float dt);
void Draw();
void ProcessUserInput(const CFinalInput& input);
explicit CQuitGameScreen(EQuitType type);
2016-12-30 06:37:01 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace MP1
2021-04-10 08:42:06 +00:00
} // namespace metaforce