mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 06:14:08 +08:00
Added fullscreen funtion
This commit is contained in:
@@ -24,6 +24,11 @@ SDL_AppResult InputManager::handleInputEvent(const SDL_Event* event) {
|
||||
m_currentInputState.mouseCurrentPosition = {static_cast<float>(event->motion.x),
|
||||
static_cast<float>(event->motion.y)};
|
||||
break;
|
||||
case SDL_EVENT_KEY_DOWN:
|
||||
if (event->key.key == SDLK_F11) {
|
||||
m_currentInputState.isFullscreen = !m_currentInputState.isFullscreen;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return SDL_APP_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -5,4 +5,5 @@ struct InputState
|
||||
std::pair<float, float> mouseCilckOn;
|
||||
bool leftMouseDown = false;
|
||||
std::pair<float, float> mouseCurrentPosition;
|
||||
bool isFullscreen = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user