mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Add hiding and showing to interactive window test
This commit is contained in:
parent
094aa6d3c7
commit
f8ef3ca719
@ -121,7 +121,7 @@ int main(int argc, char** argv)
|
|||||||
nk_glfw3_new_frame();
|
nk_glfw3_new_frame();
|
||||||
if (nk_begin(nk, "main", area, 0))
|
if (nk_begin(nk, "main", area, 0))
|
||||||
{
|
{
|
||||||
nk_layout_row_dynamic(nk, 30, 4);
|
nk_layout_row_dynamic(nk, 30, 5);
|
||||||
|
|
||||||
if (nk_button_label(nk, "Toggle Fullscreen"))
|
if (nk_button_label(nk, "Toggle Fullscreen"))
|
||||||
{
|
{
|
||||||
@ -149,6 +149,16 @@ int main(int argc, char** argv)
|
|||||||
glfwIconifyWindow(window);
|
glfwIconifyWindow(window);
|
||||||
if (nk_button_label(nk, "Restore"))
|
if (nk_button_label(nk, "Restore"))
|
||||||
glfwRestoreWindow(window);
|
glfwRestoreWindow(window);
|
||||||
|
if (nk_button_label(nk, "Hide (briefly)"))
|
||||||
|
{
|
||||||
|
glfwHideWindow(window);
|
||||||
|
|
||||||
|
const double time = glfwGetTime() + 3.0;
|
||||||
|
while (glfwGetTime() < time)
|
||||||
|
glfwWaitEventsTimeout(1.0);
|
||||||
|
|
||||||
|
glfwShowWindow(window);
|
||||||
|
}
|
||||||
|
|
||||||
nk_layout_row_dynamic(nk, 30, 1);
|
nk_layout_row_dynamic(nk, 30, 1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user