瀏覽代碼

Updated example control widget.

Branimir Karadžić 8 年之前
父節點
當前提交
e9a0f266bb
共有 2 個文件被更改,包括 13 次插入1 次删除
  1. 1 1
      examples/common/entry/entry.cpp
  2. 12 0
      examples/common/example-glue.cpp

+ 1 - 1
examples/common/entry/entry.cpp

@@ -390,7 +390,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
 		if (0 == bx::strCmp(_argv[1], "restart")
 		if (0 == bx::strCmp(_argv[1], "restart")
 		&&  NULL != s_currentApp)
 		&&  NULL != s_currentApp)
 		{
 		{
-			if (1 == _argc)
+			if (2 == _argc)
 			{
 			{
 				bx::strCopy(s_restartArgs, BX_COUNTOF(s_restartArgs), s_currentApp->getName() );
 				bx::strCopy(s_restartArgs, BX_COUNTOF(s_restartArgs), s_currentApp->getName() );
 				return bx::kExitSuccess;
 				return bx::kExitSuccess;

+ 12 - 0
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]);
 			bx::snprintf(command, BX_COUNTOF(command), "app restart %s", items[current]);
 			cmdExec(command);
 			cmdExec(command);
 		}
 		}
+
+		if (ImGui::Button("Restart") )
+		{
+			cmdExec("app restart");
+		}
+
+		ImGui::SameLine();
+		if (ImGui::Button("Next") )
+		{
+			cmdExec("app restart next");
+		}
+
 	}
 	}
 
 
 #if 0
 #if 0