mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-03-23 02:04:35 -05:00
29 lines
670 B
C++
29 lines
670 B
C++
#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; }
|