add exit button

This commit is contained in:
rick 2023-05-01 01:50:38 +02:00
parent f6da60fd6a
commit bf1deeb9f9
Signed by: Rick
GPG key ID: 5CBE8779CD27BCBA

View file

@ -34,6 +34,8 @@ void free_ui(ui_infos *ptr)
int draw_ui(ui_infos *ptr) int draw_ui(ui_infos *ptr)
{ {
int ret = 0;
/* en plein écran */ /* en plein écran */
ImGuiViewport *vp = igGetMainViewport(); ImGuiViewport *vp = igGetMainViewport();
igSetNextWindowPos(vp->Pos, ImGuiCond_None, zero_vec2); igSetNextWindowPos(vp->Pos, ImGuiCond_None, zero_vec2);
@ -100,9 +102,12 @@ int draw_ui(ui_infos *ptr)
sleep(ptr->sleep_loop); sleep(ptr->sleep_loop);
} }
} }
if (igButton("Quit", zero_vec2))
ret = 1;
} }
igEnd(); igEnd();
return 0; return ret;
} }