🐛 static Input handling
export inline to have a single instance of it
This commit is contained in:
parent
8da6ddc689
commit
571c1eb35e
3 changed files with 14 additions and 13 deletions
16
main.cppm
16
main.cppm
|
|
@ -1,16 +1,18 @@
|
|||
import VUI;
|
||||
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
|
||||
struct Me final : VUI::RefCounted {
|
||||
|
||||
};
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
int main() {
|
||||
VUI::WindowManager::Create(1280, 720, "VUI");
|
||||
while (VUI::WindowManager::HasOpenWindows()) {
|
||||
VUI::WindowManager::Update();
|
||||
if (VUI::Input::IsKeyPressed(VUI::KeyCodes::F3)) {
|
||||
VUI::WindowManager::Create(1280, 720, "Second Window");
|
||||
}
|
||||
if (VUI::Input::IsKeyPressed(VUI::KeyCodes::F4)) {
|
||||
VUI::WindowManager::CloseByTitle("Second Window");
|
||||
}
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(30));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue