public override void Show(float Width, float Height, float X, float Y) { base.Show (Width, Height, X, Y); BetSizeLabel = new BeloteLabel ("BetSizeLabel", 100, Height - 100, "Bet size: From ", UIColor.White, 22, "Roboto"); BetSizeLabel.HorizontalAlignment = SKLabelHorizontalAlignmentMode.Left; BetFromUpDown = new BeloteUpDown ("BetFromUpDown", 330, Height - 130, 20, 250, 10, 20, OnBetFromChanged); BetToLabel = new BeloteLabel ("BetToLabel", 540, Height - 100, " To ", UIColor.White, 22, "Roboto"); BetToLabel.HorizontalAlignment = SKLabelHorizontalAlignmentMode.Left; BetToUpDown = new BeloteUpDown ("BetToUpDown", 590, Height - 130, 20, 250, 10, 250, OnBetToChanged); BetNoMatterCheck = new BeloteCheckBox ("BetNoMatterCheck", 100, 810, Height - 130, "No matter"); MinLevelLabel = new BeloteLabel ("MinLevelLabel", 100, Height - 170, "Minimal player level: ", UIColor.White, 22, "Roboto"); MinLevelLabel.HorizontalAlignment = SKLabelHorizontalAlignmentMode.Left; MinLevelUpDown = new BeloteUpDown ("MinLevelUpDown", 330, Height - 200, 0, 25, 1, 0); MinLevelNoMatterCheck = new BeloteCheckBox ("MinLevelNoMatterCheck", 100, 550, Height - 200, "No matter"); AIPossibleCheck = new BeloteCheckBox ("AIPossibleCheck", 150, 100, Height - 280, "AI Possible"); AIPossibleCheck.OnTouchStart = OnAICheck; AIInpossibleCheck = new BeloteCheckBox ("AIInpossibleCheck", 150, 350, Height - 280, "AI Inpossible"); AIInpossibleCheck.OnTouchStart = OnAICheck; AINoMatterCheck = new BeloteCheckBox ("AINoMatterCheck", 150, 600, Height - 280, "AI No Matter"); AINoMatterCheck.OnTouchStart = OnAICheck; VIPPossibleCheck = new BeloteCheckBox ("VIPPossibleCheck", 150, 100, Height - 360, "VIP Possible"); VIPPossibleCheck.OnTouchStart = OnVIPCheck; VIPInpossibleCheck = new BeloteCheckBox ("VIPInpossibleCheck", 150, 350, Height - 360, "VIP Inpossible"); VIPInpossibleCheck.OnTouchStart = OnVIPCheck; VIPNoMatterCheck = new BeloteCheckBox ("VIPNoMatterCheck", 150, 600, Height - 360, "VIP No Matter"); VIPNoMatterCheck.OnTouchStart = OnVIPCheck; ConfirmButton = new BeloteButton ("ConfirmButton", 300, 65, Width / 2 - 150, Height - 470, OnConfirmClick, null, SKTexture.FromImageNamed ("Textures/ActiveButton.png"), null, "Confirm options", 20); AddChildControl (BetSizeLabel); AddChildControl (BetFromUpDown); AddChildControl (BetToLabel); AddChildControl (BetToUpDown); AddChildControl (BetNoMatterCheck); AddChildControl (MinLevelLabel); AddChildControl (MinLevelUpDown); AddChildControl (MinLevelNoMatterCheck); AddChildControl (AIPossibleCheck); AddChildControl (AIInpossibleCheck); AddChildControl (AINoMatterCheck); AddChildControl (VIPPossibleCheck); AddChildControl (VIPInpossibleCheck); AddChildControl (VIPNoMatterCheck); AddChildControl (ConfirmButton); this.AnimateWindow (); }
// Показ всплывающей формы с заданными параметрами размера public override void Show(float Width, float Height, float X, float Y) { base.Show (Width, Height, X, - Y * 2); this.DrawBackground ("Textures/popupbg2.png", "PopupBackground"); SKTexture activeButtonTexture = SKTexture.FromImageNamed ("Textures/PopupCloseActive.png"); SKTexture unactiveButtonTexture = null; CloseButton = new BeloteButton ("PopupCloseButton", 70, 70, this.Width - 65, this.Height - 65, OnClosing, OnClosed, activeButtonTexture, unactiveButtonTexture); AddChildControl (CloseButton); }
public override void Show(float Width, float Height, float X, float Y) { base.Show (Width, Height, X, Y); SendPasswordButton = new BeloteButton ("SendPasswordButton", 400, 65, (Width / 2) - 200, (Height / 2) - 100, OnSendPasswordButtonClick, null, SKTexture.FromImageNamed("Textures/ActiveButton.png"), SKTexture.FromImageNamed("Textures/UnactiveButton.png"), "Отправить пароль на E-mail", 25); SendPasswordButton.Enabled = false; EmailRemindEdit = new BeloteEdit ("EmailRemindEdit", 400, 65, (Width / 2) - 200, (Height / 2), SKTexture.FromImageNamed("Textures/TextField.png"), "", false, OnEmailEndEditing); AddChildControl (SendPasswordButton); AddChildControl (EmailRemindEdit); EmailRemindEdit.TextField.BecomeFirstResponder (); this.AnimateWindow (); }
public void OnLeftClick(BaseBeloteControl Sender, string SpriteName) { SKAction _1to0 = SKAction.Sequence (SKAction.MoveTo (new CGPoint (this.Width / 2 - 175 - 200, this.Height / 2 - 139), 0.2), SKAction.ResizeTo (new CGSize (263, 277), 0.2)); SKAction _0to2 = SKAction.MoveTo (new CGPoint(this.Width / 2 + 175 - 63, this.Height / 2 - 139), 0.2); SKAction _2to1 = SKAction.Sequence (SKAction.MoveTo (new CGPoint (this.Width / 2 - 175, this.Height / 2 - 185), 0.2), SKAction.ResizeTo (new CGSize (350, 369), 0.2)); MenuButtons [1].OnTouchStart = null; BeloteButton [] tmp = new BeloteButton[3]; tmp [0] = MenuButtons [1]; tmp [1] = MenuButtons [2]; tmp [2] = MenuButtons [0]; MenuButtons = tmp; MenuButtons [2].Sprite.RunAction (_0to2); MenuButtons [0].Sprite.RunAction (_1to0, new Action (() => MenuButtons [0].Sprite.ZPosition -= 1)); MenuButtons [1].Sprite.RunAction (_2to1, new Action (() => MenuButtons [1].Sprite.ZPosition += 1)); MenuButtons [1].OnTouchStart = OnMenuButtonClick; UpdateMenuButtonLabel (); }
public override void Show(float Width, float Height, float X, float Y) { base.Show (Width, Height, X, Y); DrawBackground ("Textures/woodbg.png", "AuthBackground"); SKTexture textEditTexture = SKTexture.FromImageNamed ("Textures/TextField.png"); SKTexture activeButtonTexture = SKTexture.FromImageNamed ("Textures/ActiveButton.png"); SKTexture unactiveButtonTexture = SKTexture.FromImageNamed ("Textures/UnactiveButton.png"); VKButton = new BeloteButton ("VKButton", 225, 225, (Width / 2) - 325, 378, OnVKButtonClick, null, SKTexture.FromImageNamed("Textures/GuestScreen/VKButton.png"), null); FBButton = new BeloteButton ("FBButton", 225, 225, (Width / 2) + (325 - 225), 378, OnFBButtonClick, null, SKTexture.FromImageNamed("Textures/GuestScreen/FacebookButton.png"), null); EmailEdit = new BeloteEdit ("Email", 650, 65, (Width / 2) - 325, 300, textEditTexture, "", false, OnEmailEndEditing); PasswordEdit = new BeloteEdit ("Password", 650, 65, (Width / 2) - 325, 225, textEditTexture, "", true, OnPasswordEndEditing); EnterButton = new BeloteButton ("EnterButton", 320, 65, (Width / 2) - 325, 150, OnEnterButtonClick, null, activeButtonTexture, unactiveButtonTexture, "Войти", 20); EnterButton.Enabled = false; RemindPasswordButton = new BeloteButton ("RemindButton", 320, 65, (Width / 2) + 5, 150, OnRemindPasswordButtonClick, null, activeButtonTexture, unactiveButtonTexture, "Напомнить пароль", 20); EnterLabel = new BeloteLabel ("EnterLabel", (Width / 2), 630, "Войти через: " + ParentScene.View.Frame.Width.ToString() + " " + ParentScene.View.Frame.Height.ToString(), UIColor.White, 30, "Roboto"); AddChildControl (VKButton); AddChildControl (FBButton); AddChildControl (EmailEdit); AddChildControl (PasswordEdit); AddChildControl (EnterButton); AddChildControl (RemindPasswordButton); AddChildControl (EnterLabel); }
public override void Show(float Width, float Height, float X, float Y) { base.Show (Width + 10, Height + 10, X - 5, Y - 5); DrawBackground ("Textures/bluebg.png", "MainMenuBackground"); ToplineSprite = SKSpriteNode.FromTexture (SKTexture.FromImageNamed("Textures/MainMenuScreen/topbg.png")); ToplineSprite.Size = new CGSize(this.Width + 5, 75); ToplineSprite.Position = new CGPoint (this.X, this.Height - 75); ToplineSprite.AnchorPoint = new CGPoint (0, 0); ToplineSprite.ZPosition = this.BaseZPosition; ToplineSprite.Name = "Topline"; ProfileButton = new BeloteButton ("ProfileButton", 65, 65, this.X + 15, this.Height - 72, OnProfileClick, null, SKTexture.FromImageNamed ("Textures/MainMenuScreen/photoback.png"), null); ProfileLabel = new BeloteLabel ("ProfileLabel", 90, this.Height - 45, "User Name", UIColor.White, 20, "Roboto"); ProfileLabel.HorizontalAlignment = SKLabelHorizontalAlignmentMode.Left; MoneyButton = new BeloteButton ("MoneyButton", 105, 65, 300, this.Height - 70, null, null, SKTexture.FromImageNamed ("Textures/MainMenuScreen/money.png"), null); MoneyLabel = new BeloteLabel ("MoneyLabel", 415, this.Height - 45, "100500", UIColor.White, 20, "Roboto"); ChipsButton = new BeloteButton ("ChipsButton", 115, 65, 500, this.Height - 70, null, null, SKTexture.FromImageNamed ("Textures/MainMenuScreen/chips.png"), null); ChipsLabel = new BeloteLabel ("ChipsLabel", 625, this.Height - 45, "100500", UIColor.White, 20, "Roboto"); StoreButton = new BeloteButton ("StoreButton", 65, 65, this.Width - 150, this.Height - 72, OnStoreClick, null, SKTexture.FromImageNamed ("Textures/MainMenuScreen/store.png"), null); ExitButton = new BeloteButton ("ExitButton", 65, 65, this.Width - 75, this.Height - 72, OnExitClick, null, SKTexture.FromImageNamed ("Textures/MainMenuScreen/exit.png"), null); MenuButtons = new BeloteButton[3]; MenuButtons [0] = new BeloteButton ("TrainingButton", 263, 277, this.Width / 2 - 175 - 200, this.Height / 2 - 139, null, null, SKTexture.FromImageNamed ("Textures/MainMenuScreen/traininglevel.png"), null); MenuButtons [1] = new BeloteButton ("NewTableButton", 350, 369, this.Width / 2 - 175, this.Height / 2 - 185, OnMenuButtonClick, null, SKTexture.FromImageNamed ("Textures/MainMenuScreen/createtable.png"), null); MenuButtons [2] = new BeloteButton ("TablesListButton", 263, 277, this.Width / 2 + 175 - 63, this.Height / 2 - 139, null, null, SKTexture.FromImageNamed ("Textures/MainMenuScreen/tables.png"), null); MenuButtonLabel = new BeloteLabel ("MenuButtonsLabel", Width / 2, this.Height / 7 + 60, "", UIColor.White, 40, "Roboto"); RightButton = new BeloteButton ("Right", 131, 142, Width / 2 + 169, this.Height / 7, OnRightClick, null, SKTexture.FromImageNamed ("Textures/MainMenuScreen/right.png"), null); LeftButton = new BeloteButton ("Left", 131, 142, Width / 2 - 300, this.Height / 7, OnLeftClick, null, SKTexture.FromImageNamed ("Textures/MainMenuScreen/left.png"), null); DrawSprite (ToplineSprite); AddChildControl (ProfileButton); AddChildControl (ProfileLabel); AddChildControl (MoneyButton); AddChildControl (MoneyLabel); AddChildControl (ChipsButton); AddChildControl (ChipsLabel); AddChildControl (StoreButton); AddChildControl (ExitButton); AddChildControl (MenuButtons [0]); AddChildControl (MenuButtons [1]); AddChildControl (MenuButtons [2]); MenuButtons [0].Sprite.ZPosition += 4; MenuButtons [1].Sprite.ZPosition += 5; MenuButtons [2].Sprite.ZPosition += 4; AddChildControl (RightButton); AddChildControl (LeftButton); AddChildControl (MenuButtonLabel); UpdateMenuButtonLabel (); }