add exit button
This commit is contained in:
parent
f6da60fd6a
commit
bf1deeb9f9
1 changed files with 6 additions and 1 deletions
7
src/ui.c
7
src/ui.c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue