public static void ClientCmdGameEnd(string endgamepause) { audio.sfxStopAll(""); if (GuiCanvas.EditorIsActive() || GuiCanvas.GuiEditorIsActive()) { return; } // Copy the current scores from the player list into the // end game gui (bit of a hack for now). GuiTextListCtrl EndGameGuiList = "EndGameGuiList"; EndGameGuiList.clear(); GuiTextListCtrl PlayerListGuiList = "PlayerListGuiList"; for (int i = 0; i < PlayerListGuiList.rowCount(); i++) { string text = PlayerListGuiList.getRowText(i); string id = PlayerListGuiList.getRowId(i).AsString(); EndGameGuiList.addRow(id.AsInt(), text, -1); } EndGameGuiList.sortNumerical(1, false); ((GuiCanvas)"Canvas").setContent("EndGameGui"); if (endgamepause.AsInt() > 0) { omni.Util._schedule((endgamepause.AsInt() * 1000).AsString(), "0", "ShowLoading"); } }
public static void DbgRefreshWatches() { GuiTextListCtrl DebuggerWatchView = "DebuggerWatchView"; TCPDebugger TCPDebugger = "TCPDebugger"; for (int i = 0; i < DebuggerWatchView.rowCount(); i++) { int id = DebuggerWatchView.getRowId(i); string row = DebuggerWatchView.getRowTextById(id); string expr = omni.Util.getField(row, 0); TCPDebugger.send("EVAL " + id + " 0 " + expr + "\r\n"); } }
public virtual void zeroScores() { GuiTextListCtrl PlayerListGuiList = "PlayerListGuiList"; for (int i = 0; i < PlayerListGuiList.rowCount(); i++) { string text = PlayerListGuiList.getRowText(i); text = Util.setField(text, 1, "0"); text = Util.setField(text, 2, "0"); text = Util.setField(text, 3, "0"); PlayerListGuiList.setRowById(PlayerListGuiList.getRowId(i), text); } PlayerListGuiList.clearSelection(); }
public void handleBreak(string line) { GuiTextCtrl DebuggerStatus = "DebuggerStatus"; GuiTextListCtrl DebuggerWatchView = "DebuggerWatchView"; DebuggerCallStack DebuggerCallStack = "DebuggerCallStack"; DebuggerStatus.setValue("BREAK"); // Query all the watches. for (int i = 0; i < DebuggerWatchView.rowCount(); i++) { int id = DebuggerWatchView.getRowId(i); string row = DebuggerWatchView.getRowTextById(id); string expr = Util.getField(row, 0); this.send("EVAL " + id + " 0 " + expr + "\r\n"); } // Update the call stack window. DebuggerCallStack.clear(); string file = Util.getWord(line, 0); string lineNumber = Util.getWord(line, 1); string funcName = Util.getWord(line, 2); DbgOpenFile(file, lineNumber.AsInt(), true); int nextWord = 3; //int rowId = 0; int iD = 0; while (true) { DebuggerCallStack.setRowById(iD, file + "\t" + lineNumber + "\t" + funcName); iD++; file = Util.getWord(line, nextWord); lineNumber = Util.getWord(line, nextWord + 1); funcName = Util.getWord(line, nextWord + 2); nextWord += 3; if (file == "") { break; } } }