Skip to content

xvorost/ImGui-Custom-HotKeys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImGui Custom HotKeys / KeyBinds

Better function for ImGui HotKeys (ImGui Keybinds)
Recommended version of ImGui: 1.83 WIP

Usage

First, add the files to your project, then add the code from the example to your main file with the ImGui loop

Please star and fork this repo!

Example

#include "InputUtil.h" // including custom hotkey files
#include "Hotkey.h" // including custom hotkey files

bool activate = 0; // variable for action (for example activation)
KeyBindToggle activate_bind = KeyBindToggle(KeyBind::KeyCode::INSERT); // key variable, selected default hotkey (insert)

// in main gui while to check hotkeys
if (GetKeyState(activate_bind.toInt()) & 0x8000) { if (activate == 0) activate = 1; else activate = 0; Beep(1000, 150); Sleep(200); }

// in main gui     ("label", variable_keybind, margin)
ImGuiCustom::hotkey("Keybind:", activate_bind, 100.0f);

Me

in Discord: xvorost#5394
My BTC address: bc1qa2gj7vqpaaeajx47y5guwdr9usv6kh253j4v34

About

Better function for ImGui HotKeys

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages