From e9a0f266bb055197c64187b46f21ff95cbc0a8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 29 Jun 2017 22:47:16 -0700 Subject: [PATCH] Updated example control widget. --- examples/common/entry/entry.cpp | 2 +- examples/common/example-glue.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/examples/common/entry/entry.cpp b/examples/common/entry/entry.cpp index 53a095af1..9fbf99ee4 100644 --- a/examples/common/entry/entry.cpp +++ b/examples/common/entry/entry.cpp @@ -390,7 +390,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); if (0 == bx::strCmp(_argv[1], "restart") && NULL != s_currentApp) { - if (1 == _argc) + if (2 == _argc) { bx::strCopy(s_restartArgs, BX_COUNTOF(s_restartArgs), s_currentApp->getName() ); return bx::kExitSuccess; diff --git a/examples/common/example-glue.cpp b/examples/common/example-glue.cpp index 88b898b32..80a7ea55b 100644 --- a/examples/common/example-glue.cpp +++ b/examples/common/example-glue.cpp @@ -51,6 +51,18 @@ bool showExampleDialog(entry::AppI* _app) bx::snprintf(command, BX_COUNTOF(command), "app restart %s", items[current]); cmdExec(command); } + + if (ImGui::Button("Restart") ) + { + cmdExec("app restart"); + } + + ImGui::SameLine(); + if (ImGui::Button("Next") ) + { + cmdExec("app restart next"); + } + } #if 0