From 0f0167c0211acd69c104ab6c7c1caa8fa85d7e4f Mon Sep 17 00:00:00 2001 From: quou Date: Mon, 30 Dec 2024 17:01:55 +1100 Subject: start UI framework --- app.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'app.cpp') diff --git a/app.cpp b/app.cpp index 54fab7e..95f730b 100644 --- a/app.cpp +++ b/app.cpp @@ -551,35 +551,35 @@ void App::end() { internal->end(this); } -Key_State App::ks(Key k) { +Key_State App::ks(Key k)const { return (Key_State)key_states[k]; } -Key_State App::ms(Mbtn k) { +Key_State App::ms(Mbtn k) const { return (Key_State)mbtn_states[k]; } -bool App::kp(Key k) { +bool App::kp(Key k)const { return key_states[k] & key_state_pressed; } -bool App::kjp(Key k) { +bool App::kjp(Key k) const { return key_states[k] & key_state_just_pressed; } -bool App::kjr(Key k) { +bool App::kjr(Key k) const { return key_states[k] & key_state_just_released; } -bool App::mp(Mbtn b) { +bool App::mp(Mbtn b) const { return mbtn_states[b] & key_state_pressed; } -bool App::mjp(Mbtn b) { +bool App::mjp(Mbtn b) const { return mbtn_states[b] & key_state_just_pressed; } -bool App::mjr(Mbtn b) { +bool App::mjr(Mbtn b) const { return mbtn_states[b] & key_state_just_released; } @@ -592,4 +592,4 @@ void App::get_vk_exts(const char** exts, int& count) { #else #error #endif -} \ No newline at end of file +} -- cgit v1.2.3-54-g00ecf