summaryrefslogtreecommitdiff
path: root/client/ui.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-06-02 12:12:47 +0200
committerlonkaars <loek@pipeframe.xyz>2022-06-02 12:12:47 +0200
commitb12d6b2ecee0be03122a4bdba8ebbc91112fae3f (patch)
tree1bcc95eb0c26ffd1fbf23fab79f9ea80f26425b8 /client/ui.c
parent139651d45a72d57c5147e2854647d95cb87c9e4e (diff)
dirc working
Diffstat (limited to 'client/ui.c')
-rw-r--r--client/ui.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/ui.c b/client/ui.c
index ca96efb..e6e73f0 100644
--- a/client/ui.c
+++ b/client/ui.c
@@ -11,9 +11,10 @@
#include "ui.h"
WINDOW *g_w2_ui_win;
-unsigned int g_w2_ui_width = 0;
-unsigned int g_w2_ui_height = 0;
-void (*g_w2_ui_current_tab)() = &w2_ui_dirc;
+unsigned int g_w2_ui_width = 0;
+unsigned int g_w2_ui_height = 0;
+void (*g_w2_ui_current_tab)(bool first) = &w2_ui_dirc;
+void (*g_w2_ui_last_tab)(bool first) = NULL;
void w2_ui_main() {
g_w2_ui_width = getmaxx(g_w2_ui_win);
@@ -25,7 +26,8 @@ void w2_ui_main() {
void w2_ui_paint() {
w2_ui_paint_statusbar();
if (w2_timer_end(W2_TIMER_UPDATE) >= (1000 / W2_UI_UPDATE_FPS)) {
- (*g_w2_ui_current_tab)();
+ (*g_w2_ui_current_tab)(g_w2_ui_last_tab != g_w2_ui_current_tab);
+ g_w2_ui_last_tab = g_w2_ui_current_tab;
w2_timer_start(W2_TIMER_UPDATE);
}
refresh();