1 #include "nta/Screen.h"
2 #include "nta/InputManager.h"
3 #include "nta/WindowManager.h"
4 #include "nta/ScreenManager.h"
5 #include "nta/ResourceManager.h"
6 #include "nta/Logger.h"
13 const InputManager& Screen::getInput()
const {
25 int Screen::getXIndex()
const {
28 int Screen::getIndex()
const {
31 int Screen::getNextIndex()
const {
std::string getName() const
gets name of screen
Window * m_window
the Window this Screen appears on
void setManager(ScreenManager *manager, SetManagerKey key)
Sets the manager of this screen.
void setWindow(crstring title, SetWindowKey key)
sets the window to associate with this screen
Key unlocking the setManager() "private" function of class Screen.
Info passed to Screen::onFocus.
void setIndices(int index, int escIndex, int xIndex, SetIndicesKey key)
sets various screen indices
virtual void offFocus()
called when the screen is no longer active
ScreenState m_state
the state of this screen
Screen(crstring name="UNAMED_SCREEN")
basic constructor and destructor
std::string m_name
the name of the Screen
ScreenManager * m_manager
the ScreenManager that owns this screen
virtual void onFocus(const ScreenSwitchInfo &info)
called when the screen becomes active
const InputManager & getInput() const
returns the InputManager
void * m_switchData
data to pass to the new screen (via onFocus) when m_state == SWITCH
int m_nextIndex
the index of the screen to go to when m_state == SWITCH
int m_index
the index of this screen in its container
ScreenState getState() const
returns state of screen
Key unlocking the setWindow() "private" function of class Screen.
int m_escIndex
the index of the screen to go to when the Esc key is pressed
Key unlocking the setIndices() "private" function of class Screen.
void * getSwitchData() const
gets the switch data (shoudl this require a key?)
static Window * getWindow(crstring windowTitle, int width=640, int height=480, int flags=0)
Gets a Window with specified title, width, height, and flags.
int m_xIndex
the index of the screen to go to when the window's X button is pressed
int getEscIndex() const
gets various screen indices