private void FillUIHandler(string evt, string collectionPath) { EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 1, Height = EODHeight.Tall, Length = EODLength.Full, Tips = EODTextTips.None, Timer = EODTimer.None, Expandable = false }); // get the collection using the directory var content = Content.Content.Get(); TrunkOutfits = content.AvatarCollections.Get(collectionPath); // get the skin color of the user var avatar = (VMAvatar)LotController.ActiveEntity; UserAppearanceType = avatar.Avatar.Appearance; // added 23.10.18 for skeleton body for Halloween Event var substr = collectionPath.Substring(0, 8); if (substr == "costumes") { IsCostumeTrunk = true; } // setup the collection view CostumeOptions.DataProvider = CollectionToDataProvider(TrunkOutfits); }
protected virtual void ShowEOD(string evt, string txt) { var options = GetEODOptions(); UpdateUIState(); EODController.ShowEODMode(options); }
protected virtual void ShowEOD(string evt, string txt) { SetRackType((RackType)short.Parse(txt)); var options = GetEODOptions(); UpdateUIState(); EODController.ShowEODMode(options); }
public void P_Show(string evt, string text) { int mode; int.TryParse(text, out mode); if (mode < 1 || mode > 2) { mode = 1; } var split = text.Split('\n'); EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 0, Expandable = false, Height = EODHeight.Normal, Length = EODLength.None, Timer = EODTimer.None, Tips = EODTextTips.None }); var style = TextStyle.DefaultLabel.Clone(); style.Shadow = true; Add(SeeDialog = new UILabel() { Position = new Microsoft.Xna.Framework.Vector2(0, 32), Size = new Microsoft.Xna.Framework.Vector2(472, 112), Alignment = TextAlignment.Center | TextAlignment.Middle, CaptionStyle = style, Caption = GameFacade.Strings.GetString("f120", "36") }); if (UIBulletinDialog.Present) { GameThread.NextUpdate(x => OnClose()); } else { Dialog = new UIBulletinDialog(LotController?.vm?.TSOState?.NhoodID ?? 0); Dialog.OnModeChange += (dmode) => { Send("bulletin_mode", dmode.ToString()); }; Dialog.CloseButton.OnButtonClick += (btn) => OnClose(); if (mode == 2) { Dialog.SelectedPost(null); } else { Send("bulletin_mode", "0"); } UIScreen.GlobalShowDialog(Dialog, false); //Send("bulletin_mode", ((mode == 1) ? 0 : 2).ToString()); } }
private void SetMode() { EODController.ShowEODMode(new EODLiveModeOpt { Buttons = Options.Buttons, Expandable = Options.Expandable, Height = Options.Height, Length = Options.Length, Timer = Options.Timer, Tips = Options.Tips }); }
public void P_Show(string evt, string txt) { EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 0, Expandable = false, Height = EODHeight.Tall, Length = EODLength.Full, Timer = EODTimer.None, Tips = EODTextTips.None }); }
private void GotoWaitForPlayerPhase() { SetTip(GameFacade.Strings["UIText", "253", "19"]); // hide game-related elements ButtonBack.Visible = false; foreach (var btn in NoteButtonArray) { btn.Visible = false; } foreach (var btn in MiscButtonArray) { btn.Visible = false; } foreach (var player in Players) { if (player != null) { try { Remove(player); } catch (Exception) { } } } EarningString.Visible = false; try { Remove(Lobby); } catch (Exception) { } Add(Lobby); foreach (var player in WaitPlayers) { player.Visible = true; } Player1Wait.Visible = true; Player2Wait.Visible = true; Player3Wait.Visible = true; Player4Wait.Visible = true; EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 0, Expandable = false, Height = EODHeight.Tall, Length = EODLength.Full, Timer = EODTimer.Normal, Tips = EODTextTips.Short }); }
private void ShowLogicPlayerHandler(string evt, byte[] data) { Script = RenderScript("twopersonjobobjectmazelogic.uis"); UIWaitBackground = Script.Create <UIImage>("UIWaitBackground"); Add(UIWaitBackground); UIPlayBackground = Script.Create <UIImage>("UIPlayBackground"); Add(UIPlayBackground); // get some offsets var red = Script.Create <UIImage>("RedIcon"); NWCellOriginOffset = red.Position + UIPlayBackground.Position; var wall = Script.Create <UIImage>("HWall"); NWWallOriginOffset = wall.Position + UIPlayBackground.Position; var green = Script.Create <UIImage>("GreenIcon"); CellOffsetX = green.Position.X; CellOffsetY = green.Position.Y; SetTime(0); VWall = Script.Create <UIImage>("VWall"); HWall = Script.Create <UIImage>("HWall"); var gd = UIWaitBackground.Texture.GraphicsDevice; // try to get textures for Slot Machine #4 Slot stops try { AbstractTextureRef MazeXTrackTextureRef = new FileTextureRef("Content/Textures/EOD/mazextrack.bmp"); MazeXTrackTexture = MazeXTrackTextureRef.Get(gd); } catch (Exception e) { var blue = Script.Create <UIImage>("BlueIcon"); MazeXTrackTexture = blue.Texture; } // show EOD EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 0, Height = EODHeight.Tall, Length = EODLength.Full, Tips = EODTextTips.None, Timer = EODTimer.Normal, Expandable = false, Expanded = false }); }
private void GotoBandGame() { // show game-related elements ButtonBack.Visible = true; foreach (var btn in NoteButtonArray) { btn.Visible = true; } foreach (var btn in MiscButtonArray) { btn.Visible = true; } foreach (var player in Players) { if (player != null) { try { Remove(player); } catch (Exception) { } } Add(player); } EarningString.Visible = true; UpdateEarningString(); try { Remove(Lobby); } catch (Exception) { } foreach (var player in WaitPlayers) { player.Visible = false; } Player1Wait.Visible = false; Player2Wait.Visible = false; Player3Wait.Visible = false; Player4Wait.Visible = false; EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 2, Expandable = false, Height = EODHeight.Tall, Length = EODLength.Full, Timer = EODTimer.Normal, Tips = EODTextTips.Short }); }
public void P_Init(string evt, string text) { var split = text.Split('\n'); Mode = (VMEODPermissionDoorMode)(int.Parse(split[0])); MaxFee = int.Parse(split[1]); PermissionState = int.Parse(split[2]); CurDoorFee = int.Parse(split[3]); Flags = int.Parse(split[4]); if (Mode == VMEODPermissionDoorMode.CodeInput) { //don't open, just show a dialog. UIAlert alert = null; alert = UIScreen.GlobalShowAlert(new UIAlertOptions() { Title = GameFacade.Strings.GetString("192", "11"), Message = GameFacade.Strings.GetString("192", "1"), Buttons = UIAlertButton.Ok((btn) => { Send("try_code", alert.ResponseText.Trim()); UIScreen.RemoveDialog(alert); }), TextEntry = true, MaxChars = 9, }, true); } else { EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 0, Expandable = false, Height = EODHeight.Normal, Length = EODLength.Short, Timer = EODTimer.None, Tips = EODTextTips.None }); } UpdateState(); UpdateFlags(); if (Mode == VMEODPermissionDoorMode.Edit) { Send("set_state", PermissionState.ToString()); Send("set_flags", Flags.ToString()); Send("set_fee", CurDoorFee.ToString()); } }
internal virtual void ShowUIHandler(string evt, byte[] eodType) { EODLiveModeOptions = new EODLiveModeOpt { Height = EODHeight.Tall, Length = EODLength.Full, Tips = EODTextTips.Short, Timer = EODTimer.Normal }; if (eodType[0] == 1) // VMEODGameshowBuzzerPluginType.Host { IsHost = true; EODLiveModeOptions.Height = EODHeight.ExtraTall; } EODController.ShowEODMode(EODLiveModeOptions); }
public void B_Show(string evt, byte[] data) { Data = new VMEODSignsData(data); EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 0, Expandable = false, Height = EODHeight.Tall, Length = (OwnerMode)?EODLength.Medium:EODLength.Full, Timer = EODTimer.None, Tips = EODTextTips.None }); SetMode(Mode); OwnerWriteTextBox.CurrentText = Data.Text; WriteTextBox.CurrentText = Data.Text; ReadTextBox.CurrentText = Data.Text; UpdatePermissions(); }
public void P_Show(string evt, string txt) { int.TryParse(txt, out TeamNumber); if (TeamNumber < 0 || TeamNumber > 3) { TeamNumber = 0; } TeamMedallion.Texture = (new Texture2D[] { DancerRedImage, DancerBlueImage, DancerGreenImage, DancerYellowImage })[TeamNumber]; EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 0, Expandable = false, Height = EODHeight.Tall, Length = EODLength.Full, Timer = EODTimer.None, Tips = EODTextTips.None }); }
private void FrontTab_OnShowNewsItem(VMEODFNewspaperNews news) { var start = new DateTime(news.StartDate); var end = new DateTime(news.EndDate); string dateString; if ((end - start).TotalDays < 1) { dateString = "(" + start.ToShortDateString() + ")"; } else { dateString = "(" + start.ToShortDateString() + " - " + end.ToShortDateString() + ")"; } TopText.BBCodeEnabled = true; TopText.CurrentText = GameFacade.Emojis.EmojiToBB(news.Name + " " + dateString + "\r\n" + news.Description); //force the eod expanded. var opt = GetEODOptions(); opt.Expanded = true; EODController.ShowEODMode(opt); OnExpand(); }
private void ShowCharismaPlayerHandler(string evt, byte[] data) { Script = RenderScript("twopersonjobobjectmazecharisma.uis"); // background images UIPlayBackground = Script.Create <UIImage>("UIPlayBackground"); AddAt(0, UIPlayBackground); // all walls NorthWall = Script.Create <UIImage>("HWall"); NorthWall.Position = UIPlayBackground.Position; NorthWall.X += 13; NorthWall.Y += 11; Add(NorthWall); SouthWall = Script.Create <UIImage>("HWall"); SouthWall.Position = UIPlayBackground.Position; SouthWall.X += 13; SouthWall.Y += 61; Add(SouthWall); WestWall = Script.Create <UIImage>("VWall"); WestWall.Position = UIPlayBackground.Position; WestWall.X += 9; WestWall.Y += 14; Add(WestWall); EastWall = Script.Create <UIImage>("VWall"); EastWall.Position = UIPlayBackground.Position; EastWall.X += 59; EastWall.Y += 14; Add(EastWall); // create boxes // uigraphics / eods / twopersonjobobjectmaze / EOD_2PJobObj_Blue.bmp, Green.bmp, Red.bmp, Yellow.bmp var boxOffset = new Vector2(16, 18); ColoredBoxes = new UIImage[] { new UIImage(GetTexture(0x000007FD00000001)), new UIImage(GetTexture(0x000007FE00000001)), new UIImage(GetTexture(0x0000080100000001)), new UIImage(GetTexture(0x0000080400000001)), new UIImage(GetTexture(0x0000080300000001)) }; for (int index = 0; index < ColoredBoxes.Length; index++) { var box = ColoredBoxes[index]; box.UseTooltip(); box.ScaleX = box.ScaleY = 5.0f; box.Position = UIPlayBackground.Position + boxOffset; box.Visible = false; box.Tooltip = GameFacade.Strings.GetString("f112", (index + BLUE_STRING_INDEX) + ""); Add(box); } // the tooltip for the exit icon should be "Blue" ColoredBoxes[4].Tooltip = GameFacade.Strings.GetString("f112", "" + BLUE_STRING_INDEX); if (Waiting != null) { Remove(Waiting); } if (HWall != null) { Remove(HWall); } if (VWall != null) { Remove(VWall); } // labels: since they're useless in FreeSO's maze—as payouts are not happening—I've decided to make them help colorblind players if (PayoutCaption != null) { PayoutCaption.Alignment = TextAlignment.Left; PayoutCaption.Caption = SquareColorCaption; } if (PayoutField != null) { PayoutField.Alignment = TextAlignment.Left; // "Waiting for Logic Player" ShowWaitingMessageHandler(evt, data); // disables buttons, sets time to 0 } // add listeners to buttons, sscale them var offsetFat = North.Size.X * 0.5f; var offsetSkinny = North.Size.Y * 0.5f; North.OnButtonClick += (btn) => { Send("TSOMaze_Button_Click", new byte[] { (byte)AbstractMazeCellCardinalDirections.North }); }; North.ScaleX = North.ScaleY = 1.5f; North.X = North.X - offsetFat + 12; North.Y = North.Y - offsetSkinny + 2; West.OnButtonClick += (btn) => { Send("TSOMaze_Button_Click", new byte[] { (byte)AbstractMazeCellCardinalDirections.West }); }; West.ScaleX = West.ScaleY = 1.5f; West.X -= offsetSkinny; West.Y = West.Y - offsetFat + 9; East.OnButtonClick += (btn) => { Send("TSOMaze_Button_Click", new byte[] { (byte)AbstractMazeCellCardinalDirections.East }); }; East.ScaleX = East.ScaleY = 1.5f; East.X += 2; East.Y = East.Y - offsetFat + 9; South.OnButtonClick += (btn) => { Send("TSOMaze_Button_Click", new byte[] { (byte)AbstractMazeCellCardinalDirections.South }); }; South.ScaleX = South.ScaleY = 1.5f; South.X = South.X - offsetFat + 12; South.Y = South.Y - offsetSkinny + 6; UIPlayBackground.Y += 2; // show EOD EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 0, Height = EODHeight.Tall, Length = EODLength.Full, Tips = EODTextTips.None, Timer = EODTimer.Normal, Expandable = false, Expanded = false }); }
protected virtual void P_Show(string evt, string txt) { var options = GetEODOptions(); EODController.ShowEODMode(options); }
protected virtual void Show(string evt, string txt) { EODController.ShowEODMode(GetEODOptions()); }
private void TimerInitHandler(string evt, Byte[] args) { if ((args == null) || (args.Length < 3)) { return; } // is in stopwatch mode if (args[1] == 1) { IsInStopwatchMode = true; StopwatchButton.ForceState = 1; StopwatchButton.Disabled = true; CountdownButton.ForceState = 0; CountdownButton.Disabled = false; } else { IsInStopwatchMode = false; StopwatchButton.ForceState = 0; StopwatchButton.Disabled = false; CountdownButton.ForceState = 1; CountdownButton.Disabled = true; } // is running if (args[0] == 1) { IsRunning = true; PlayButton.Disabled = true; DisableMinutesTextEdit(); DisableSecondsTextEdit(); CountdownButton.Disabled = true; StopwatchButton.Disabled = true; HideTextFields(); } else { IsRunning = false; PauseButton.Disabled = true; EnableMinutesTextEdit(); EnableSecondsTextEdit(); ShowTextFields(); } // minutes CurrentMinutes = (args[2] < 100) ? args[2] : (byte)0; MinTextEntry.CurrentText = (CurrentMinutes > 9) ? CurrentMinutes + "" : "0" + CurrentMinutes; MinTextEntry.Alignment = TextAlignment.Center; // seconds CurrentSeconds = (args[3] < 60) ? args[3] : (byte)0; SecTextEntry.CurrentText = (CurrentSeconds > 9) ? CurrentSeconds + "" : "0" + CurrentSeconds; SecTextEntry.Alignment = TextAlignment.Center; EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 0, Height = EODHeight.Normal, Length = EODLength.Full, Tips = EODTextTips.None, Timer = EODTimer.None, }); }
private void InitHandler(string evt, string data) { var split = data.Split('%'); short avatarID; // place player Avatar into Players if (Int16.TryParse(split[0], out avatarID)) { var avatar = (VMAvatar)EODController.Lot.vm.GetObjectById(avatarID); if (split[1].Equals("blue")) { Players[0] = new UIVMPersonButton((VMAvatar)avatar, EODController.Lot.vm, false); Players[0].Position = BluePlayerPos.Position; PlayerIsBlue = true; Add(Players[0]); } else { Players[1] = new UIVMPersonButton((VMAvatar)avatar, EODController.Lot.vm, false); Players[1].Position = RedPlayerPos.Position; Add(Players[1]); } } // draw progressbar RemainingBluePieces = 5; RemainingRedPieces = 5; DrawProgressBar(RemainingBluePieces, RemainingRedPieces); // add the buttons as children to this, creating a new one if need be ArtilleryButton = Script.Create <UIButton>("ArtilleryButton"); if (Children.Contains(ArtilleryButton)) { Remove(ArtilleryButton); } Add(ArtilleryButton); CavalryButton = Script.Create <UIButton>("CavalryButton"); if (Children.Contains(CavalryButton)) { Remove(CavalryButton); } Add(CavalryButton); CommandButton = Script.Create <UIButton>("CommandButton"); if (Children.Contains(CommandButton)) { Remove(CommandButton); } Add(CommandButton); InfantryButton = Script.Create <UIButton>("InfantryButton"); if (Children.Contains(InfantryButton)) { Remove(InfantryButton); } Add(InfantryButton); IntelButton = Script.Create <UIButton>("IntelButton"); if (Children.Contains(IntelButton)) { Remove(IntelButton); } Add(IntelButton); // add defeated images beneath each button DefeatArtilleryPos = Script.Create <UIImage>("DefeatArtilleryPos"); AddBefore(DefeatArtilleryPos, ArtilleryButton); DefeatArtilleryPos.Visible = false; DefeatCavalryPos = Script.Create <UIImage>("DefeatCavalryPos"); AddBefore(DefeatCavalryPos, CavalryButton); DefeatCavalryPos.Visible = false; DefeatCommandPos = Script.Create <UIImage>("DefeatCommandPos"); AddBefore(DefeatCommandPos, CommandButton); DefeatCommandPos.Visible = false; DefeatInfantryPos = Script.Create <UIImage>("DefeatInfantryPos"); AddBefore(DefeatInfantryPos, InfantryButton); DefeatInfantryPos.Visible = false; DefeatIntelPos = Script.Create <UIImage>("DefeatIntelPos"); AddBefore(DefeatIntelPos, IntelButton); DefeatIntelPos.Visible = false; EODController.ShowEODMode(new EODLiveModeOpt { Buttons = 0, Height = EODHeight.Tall, Length = EODLength.Full, Tips = EODTextTips.None, Timer = EODTimer.None, }); }