Closed matt77hias closed 6 years ago
#include "system\system_time.hpp"
const auto fname = L"screenshot-" + GetLocalSystemDateAndTimeAsString() + L".png";
We'll probably need this somewhere :)
idd.
ImGui_ImplWin32_WndProcHandler(window, message, wParam, lParam);
case WM_ACTIVATEAPP: {
// Sent when a window belonging to a different application
// than the active window is about to be activated.
// The message is sent to the application whose window is being
// activated and to the application whose window is being
// deactivated.
const auto deactive = static_cast< bool >(!wParam);
Engine::Get()->OnActiveChange(deactive);
break;
}
case WM_HOTKEY: {
// Posted when the user presses a hot key registered by the
// RegisterHotKey function.
switch(wParam) {
case static_cast< WPARAM >(HotKey::PrintScreen) :
case static_cast< WPARAM >(HotKey::AltPrintScreen): {
SwapChain::Get()->TakeScreenShot();
[[fallthrough]];
}
default: {
return DefWindowProc(window, message, wParam, lParam);
}
}
}
case WM_SYSKEYDOWN: {
// Sent to the window with the keyboard focus when the user presses
// the F10 key (which activates the menu bar) or holds down the ALT
// key and then presses another key.
switch (wParam) {
case VK_RETURN: {
Engine::Get()->OnModeSwitch();
break;
}
default: {
return DefWindowProc(window, message, wParam, lParam);
}
}
}
All globals should be eliminated.
Work plan: