public void clientCmdCenterPrint(string message, string time, string size) { coGuiBitmapCtrl centerPrintDlg = "centerPrintDlg"; if (bGlobal["$centerPrintActive"]) { if (centerPrintDlg.call("removePrint") != "") { Util._cancel(centerPrintDlg["removePrint"]); } } else { centerPrintDlg["isVisible"] = "1"; iGlobal["$centerPrintActive"] = 1; } ((coGuiMLTextCtrl)"CenterPrintText").setText("<just:center>" + message); centerPrintDlg.extent.y = iGlobal["$CenterPrintSizes[" + size + "]"]; //centerPrintDlg["extent"] = Util.firstWord(centerPrintDlg["extent"]) + " " + sGlobal["$CenterPrintSizes[" + size + "]"]; if (time.AsInt() > 0) { centerPrintDlg["removePrint"] = Util._schedule((time.AsInt() * 1000).AsString(), "0", "clientCmdClearCenterPrint").AsString(); } }
public void ClientCmdSetDamageDirection(string direction) { coGuiControl DamageHUD = "DamageHUD"; if (!DamageHUD.isObject()) { return; } coGuiBitmapCtrl ctrl = DamageHUD.findObjectByInternalName("damage_" + direction, true); if (!ctrl.isObject()) { return; } Util._cancelAll(ctrl); ctrl.setVisible(true); ctrl.schedule("500", "setVisible", "false"); }
public void StartupGuiNext(coGuiBitmapCtrl thisobj) { // Set us to a blank screen while we load the next one ((coGuiCanvas)"Canvas").setContent("BlankGui"); // Set our bitmap and reset the done variable console.Call(thisobj, "setBitmap", new[] { console.GetVarString(thisobj + ".bitmap[" + console.GetVarString("$StartupIdx") + "]") }); console.SetVar(thisobj + ".done", false); // If we have a logo then set it string stl = thisobj.findObjectByInternalName("StartupLogo", false); if (console.isObject(stl)) { if (console.GetVarString(thisobj + ".logo[" + console.GetVarString("$StartupIdx") + "]") != "") { console.Call(stl, "setBitmap", new[] { console.GetVarString(thisobj + ".logo" + console.GetVarString("$StartupIdx")) }); if (console.GetVarString(thisobj + ".logoPos[" + console.GetVarString("$StartupIdx") + "]") != "") { string pos = console.GetVarString(thisobj + ".logoPos[" + console.GetVarString("$StartupIdx") + "]"); console.Call(stl, "setPosition", new[] { pos.Split(' ')[0], pos.Split(' ')[1] }); } if (console.GetVarString(thisobj + ".logoExtent[" + console.GetVarString("$StartupIdx") + "]") != "") { console.Call(stl, "setExtent", new[] { console.GetVarString(thisobj + ".logoExtent[" + console.GetVarString("$StartupIdx") + "]") }); } console.Call(stl, "setVisible", new[] { "True" }); } else { console.Call(stl, "setVisible", new[] { "false" }); } } string st2 = thisobj.findObjectByInternalName("StartupLogoSecondary", false); if (console.isObject(st2)) { if (console.GetVarString(thisobj + ".seclogo[" + console.GetVarString("$StartupIdx") + "]") != "") { console.Call(st2, "setBitmap", new[] { console.GetVarString(thisobj + ".seclogo[" + console.GetVarString("$StartupIdx") + "]") }); if (console.GetVarString(thisobj + ".seclogoPos[" + console.GetVarString("$StartupIdx") + "]") != "") { string pos = console.GetVarString(thisobj + ".seclogoPos[" + console.GetVarString("$StartupIdx") + "]"); console.Call(st2, "setPosition", new[] { pos.Split(' ')[0], pos.Split(' ')[1] }); } if (console.GetVarString(thisobj + ".seclogoExtent[" + console.GetVarString("$StartupIdx") + "]") != "") { console.Call(st2, "setExtent", new[] { console.GetVarString(thisobj + ".seclogoExtent[" + console.GetVarString("$StartupIdx") + "]") }); } console.Call(st2, "setVisible", new[] { "True" }); } else { console.Call(st2, "setVisible", new[] { "false" }); } } console.SetVar("$StartupIdx", console.GetVarInt("$StartupIdx") + 1); ((coGuiCanvas)"Canvas").setContent(thisobj); }