Change AppState to BaseState. Update headers.

This commit is contained in:
J-D-K
2025-07-18 06:22:55 -04:00
parent f7163f8dd7
commit 6af4bed9fa
46 changed files with 519 additions and 367 deletions

View File

@@ -0,0 +1,28 @@
#include "appstates/BaseState.hpp"
#include <switch.h>
BaseState::BaseState(bool isClosable)
: m_isClosable(isClosable)
{
if (!m_isClosable) { appletBeginBlockingHomeButton(0); }
}
BaseState::~BaseState()
{
if (!m_isClosable) { appletEndBlockingHomeButton(); }
}
void BaseState::deactivate() { m_isActive = false; }
void BaseState::reactivate() { m_isActive = true; }
bool BaseState::is_active() const { return m_isActive; }
void BaseState::give_focus() { m_hasFocus = true; }
void BaseState::take_focus() { m_hasFocus = false; }
bool BaseState::has_focus() const { return m_hasFocus; }
bool BaseState::is_closable() const { return m_isClosable; }