Fixed GUI resize
This commit is contained in:
parent
3ee17cfd2b
commit
a181a4d51d
6 changed files with 20 additions and 11 deletions
|
|
@ -361,7 +361,18 @@ void MainProgram::input_key_callback(const InputManager::KeyCallbackArgs& key) {
|
|||
}
|
||||
case InputManager::KEY_FULLSCREEN: {
|
||||
if(key.down && !key.repeat)
|
||||
input.toggleFullscreen = true;
|
||||
toggle_full_screen();
|
||||
break;
|
||||
}
|
||||
case InputManager::KEY_SAVE: {
|
||||
if(key.down && !key.repeat)
|
||||
toolbar.save_func();
|
||||
break;
|
||||
}
|
||||
case InputManager::KEY_SAVE_AS: {
|
||||
if(key.down && !key.repeat)
|
||||
toolbar.save_as_func();
|
||||
break;
|
||||
}
|
||||
}
|
||||
g.input_key_callback(key);
|
||||
|
|
@ -451,6 +462,11 @@ void MainProgram::input_window_scale_callback(const InputManager::WindowScaleCal
|
|||
post_callback();
|
||||
}
|
||||
|
||||
void MainProgram::toggle_full_screen() {
|
||||
window.fullscreen = !window.fullscreen;
|
||||
SDL_SetWindowFullscreen(window.sdlWindow, window.fullscreen);
|
||||
}
|
||||
|
||||
void MainProgram::close_set_to_close_tabs() {
|
||||
if(!tabsToClose.empty()) {
|
||||
std::erase_if(worlds, [&](auto& w) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue