public void AddBuilding(BuildingInfo bi) { if (bi.type == 0) { dfButton button = (dfButton)Instantiate(prefabBuildingButton); dfButton helpButton = (dfButton)Instantiate(prefabHelpButton); button.Text = bi.ButtonText(); BuildingInfoContainer container = button.GetComponent <BuildingInfoContainer>(); container.bi = bi; buildingBackButton.ZOrder = 0; button.ZOrder = -1; buildButtonPanel.AddControl(button); button.AddControl(helpButton); HelpButton helpScript = helpButton.GetComponent <HelpButton>(); helpScript.bi = bi; helpButton.RelativePosition = new Vector3(button.Width - helpButton.Width - 8, button.Height - helpButton.Height - 2, 0); helpButton.BringToFront(); } }
public void OnPointerClick(PointerEventData eventData) { if (Number != 0) { HelpButton.Use(this); } }
private void Start() { helpButton = GetComponent <HelpButton>(); textMesh = transform.Find("Text").GetComponent <TextMeshProUGUI>(); Button = GetComponent <Button>(); Button.onClick.AddListener(delegate { OnClick(); }); gameObject.SetActive(false); }
protected override void OnKeyDown(KeyEventArgs e) { base.OnKeyDown(e); if (HelpButton != null && HelpButton.Enabled && e.KeyCode == Keys.F5) { HelpButton.PerformClick(); } }
private void AddHelpButton() { var theButton = new HelpButton(); theButton.SetIconSize(_desiredIconSize); LayoutRoot.Children.Add(theButton); theButton.RegisterOnMouseEnter(OnMouseEnter); theButton.RegisterOnMouseLeave(OnMouseLeave); }
public void DoHelp() { PlayButton.GetComponent <Image> ().raycastTarget = false; OptionButton.GetComponent <Image> ().raycastTarget = false; HelpButton.GetComponent <Image> ().raycastTarget = false; ExitButton.GetComponent <Image> ().raycastTarget = false; Instantiate(HelpPrefab, gameObject.transform.parent); }
public void creditsClicked() { BackCreditsButton.SetActive(true); CreditsText.SetActive(true); StartButton.SetActive(false); CreditsButton.SetActive(false); ExitButton.SetActive(false); HelpButton.SetActive(false); }
public void helpBackClicked() { HelpText.SetActive(false); HelpBackButton.SetActive(false); StartButton.SetActive(true); CreditsButton.SetActive(true); ExitButton.SetActive(true); HelpButton.SetActive(true); }
void RpcInitiateFight() { //Debug.Log("RpcInititating fight with: " + this.gameObject); gameManager.fightingMonsters.Add(this.gameObject); ClientSetActiveCardButtons(false); PlayerInGame.localPlayerInGame.progressButton.ActivateButton(); HelpButton.Activate(); LevelCounter.OnStartFight(); InfoPanel.Alert("Fight with " + cardValues.name + " starts!"); }
public void ConstructPlot() { // Set Grid size if defined if (GridWidth != 0 && GridHeight != 0) { ViewOxyPlotChartLayoutRoot.SetCurrentValue(WidthProperty, GridWidth); ViewOxyPlotChartLayoutRoot.SetCurrentValue(HeightProperty, GridHeight); } // Show Help button if enabled HelpButton.SetCurrentValue(VisibilityProperty, (ShowHelpButton ? System.Windows.Visibility.Visible : System.Windows.Visibility.Hidden)); if (OxyPlotView.Axes.Count == 0 && !constructAxes()) { return; } //System.Diagnostics.Debug.WriteLine($"{Name}: Axes updated."); AbsoluteMinimumX = 0; AbsoluteMaximumX = 0; AbsoluteMinimumY = 0; AbsoluteMaximumY = 0; /* Currently not implemented * double AbsoluteMinimumZ = 0; * double AbsoluteMaximumZ = 0; */ // Get the common style properties for each line series that will be added to the plot Style _series_style = null; _series_style = LineSeriesStyle; if (_series_style == null) { _series_style = TryFindResource("OxyPlotDefaultLineSeriesStyle") as Style; } OxyPlotView.Series.Clear(); if (LineSeries != null) { // Data bound to the LineSeries property, we have a single line series contructSingleLineSeries(_series_style); //System.Diagnostics.Debug.WriteLine($"{Name}: Line series updated."); } else if (ChartData != null) { // Data bound to the Chartdata property, we have potentially many line series. contructMultipleLineSeries(_series_style); //System.Diagnostics.Debug.WriteLine($"{Name}: ChartData updated."); } if (OxyPlotView.Series.Count > 0) { setAxesLimits(); } }
public void SetHelpText(string title, string message, int helpButtonResId) { HelpButton infoButton = FindViewById <HelpButton> (helpButtonResId); if (infoButton == null) { return; } infoButton.HelpClickListener += help => { ShowMessage(title, message); }; }
/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> public void Draw(GameTime gameTime) { //DrawSelectionBuffer(gameTime, tile); DrawScreenBuffer(gameTime, Tiles); DrawSelectionBuffer(gameTime, Tiles); Utils.FPS = 1 / (float)gameTime.ElapsedGameTime.TotalSeconds; //var ScreenBackBuffe= Utils.CreateWobble(ScreenBackBuffer, gameTime); Camera.SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.Default, RasterizerState.CullNone); Camera.SpriteBatch.Draw(ScreenOrSelection ? SelectionBackBuffer : ScreenBackBuffer, new Rectangle(0, 0, Graphics.GraphicsDevice.PresentationParameters.BackBufferWidth, Graphics.GraphicsDevice.PresentationParameters.BackBufferHeight), Color.White); if (Selector != null) { Selector.Draw(Camera.SpriteBatch); } if (Debug.DEBUG) { Camera.SpriteBatch.DrawString(UI.UIText.UIFrame.fonts[(int)UI.UIText.UIElement.Font.Arial], String.Format( Debug.Debugstring, Cam.Position.X, Cam.Position.Y, Cam.Position.Z, Cam.Height, Cam.Radius, Cam.Rotation, Cam.Target.X, Cam.Target.Y, Cam.Target.Z, Cam.Rotation, Tiles.Length, 0), //Utils.TextureTo2DArray(ScreenBackBuffe)[Mouse.GetState().X, Mouse.GetState().Y]), new Vector2(10, 50), Color.Black); } HelpButton.Draw(gameTime, Camera.SpriteBatch, 0); if (HelpButton.Toggled) { UI.UIText.UIFrame.Overlay.DrawImage(Camera.SpriteBatch, Graphics.GraphicsDevice, gameTime, Mouse.GetState(), false); //Utils.DrawTextCentered(Font, SmartGardenCamera.spriteBatch, new Vector2(Graphics.PreferredBackBufferWidth / 2f, Graphics.PreferredBackBufferHeight / 2f), Consts.HelpString, Color.Black); } Camera.SpriteBatch.End(); }
// Use this for initialization void Start() { Debug.Log("star1"); Button play = PlayButton.GetComponent <Button>(); Button help = HelpButton.GetComponent <Button>(); Button quit = QuitButton.GetComponent <Button>(); Debug.Log("star2"); play.onClick.AddListener(Letplay); help.onClick.AddListener(HELP); quit.onClick.AddListener(Leave); Debug.Log("star3"); }
private void OnTouchMoved(CCTouch arg1, CCEvent arg2) { if (!StartGameButton.IsPointInBounds(arg1) && StartGameButton.IsPressed) { StartGameButton.IsPressed = false; } if (!HelpButton.IsPointInBounds(arg1) && HelpButton.IsPressed) { HelpButton.IsPressed = false; } /*if (!OptionsButton.IsPointInBounds(arg1) && OptionsButton.IsPressed) * OptionsButton.IsPressed = false;*/ }
private void OnTouchUp(CCTouch arg1, CCEvent arg2) { if (StartGameButton.IsPointInBounds(arg1) && StartGameButton.IsPressed) { StartGameButton.OnTouchUp(); } if (HelpButton.IsPointInBounds(arg1) && HelpButton.IsPressed) { HelpButton.OnTouchUp(); } /*if (OptionsButton.IsPointInBounds(arg1) && OptionsButton.IsPressed) * OptionsButton.OnTouchUp();*/ }
void ReleaseDesignerOutlets() { if (HelpButton != null) { HelpButton.Dispose(); HelpButton = null; } if (MedicineListTableView != null) { MedicineListTableView.Dispose(); MedicineListTableView = null; } if (NoDataContainerView != null) { NoDataContainerView.Dispose(); NoDataContainerView = null; } if (RenewPrescriptionButton != null) { RenewPrescriptionButton.Dispose(); RenewPrescriptionButton = null; } if (SearchTableView != null) { SearchTableView.Dispose(); SearchTableView = null; } if (SearchTableViewBottomConstraint != null) { SearchTableViewBottomConstraint.Dispose(); SearchTableViewBottomConstraint = null; } if (SearchTextField != null) { SearchTextField.Dispose(); SearchTextField = null; } if (SearchView != null) { SearchView.Dispose(); SearchView = null; } }
void SetResources() { SetContentView(Resource.Layout.payment); Title = GetString(Resource.String.title_payment); cardEntryView = FindViewById <CardEntryView> (Resource.Id.cardEntryView); TextView hintTextView = FindViewById <TextView> (Resource.Id.hintTextView); cardEntryView.HintTextView = hintTextView; avsEntryView = FindViewById <AVSEntryView> (Resource.Id.avsEntryView); startDateEntryView = FindViewById <StartDateIssueNumberEntryView> (Resource.Id.startDateEntryView); cv2ExpiryHelpInfoButton = FindViewById <HelpButton> (Resource.Id.infoButtonID); cv2ExpiryHelpInfoButton.Visibility = ViewStates.Gone; SetHelpText(Resource.String.help_info, Resource.String.help_card_text); SetHelpText(Resource.String.help_postcode_title, Resource.String.help_postcode_text, Resource.Id.postCodeHelpButton); }
private bool TouchDown(CCTouch arg1, CCEvent arg2) { if (StartGameButton.IsPointInBounds(arg1)) { StartGameButton.IsPressed = true; } if (HelpButton.IsPointInBounds(arg1)) { HelpButton.IsPressed = true; } /*if (OptionsButton.IsPointInBounds(arg1)) * { * OptionsButton.IsPressed = true; * }*/ return(true); }
protected virtual void Dispose(bool disposing) { if (!_disposed) { OnDisposed(this); WindowEventHandler.Dispose(); _processExitHandler.Dispose(); _skinWindowButtonsHandler.Dispose(); _settingsUpdater.Dispose(); TopBorder.Dispose(); LeftBorder.Dispose(); RightBorder.Dispose(); BottomBorder.Dispose(); TopBorder = null; LeftBorder = null; RightBorder = null; BottomBorder = null; MinimizeButton = null; MaximizeButton = null; CloseButton = null; HelpButton = null; TitleControl = null; TitleBackgroundControl = null; IconControl = null; _skin = null; _parent = null; _processExitHandler = null; _settingsUpdater = null; _skinWindowButtonsHandler = null; _windowEventHandler = null; _controlsChangeHandler = null; _disposed = true; } }
public void Update(GameTime gameTime) { background.Update(gameTime); HelpButton.Update(gameTime); ExitButton.Update(gameTime); SettingsButton.Update(gameTime); if (GameScreenManager.Instance.ClientID != -1) { User usr = RetroEnvironment.GetGame().GetClientManager().GetClientByUserID(GameScreenManager.Instance.ClientID).GetUser(); if (usr != null) { txtDiamond.SetText(usr.GetDiamonds()); txtCredit.SetText(usr.GetCredits()); txtDucket.SetText(usr.GetDuckets()); } } }
void ReleaseDesignerOutlets() { if (CloudAccountButton != null) { CloudAccountButton.Dispose(); CloudAccountButton = null; } if (LocalAccountButton != null) { LocalAccountButton.Dispose(); LocalAccountButton = null; } if (HelpButton != null) { HelpButton.Dispose(); HelpButton = null; } }
void ReleaseDesignerOutlets() { if (UserNameLabel != null) { UserNameLabel.Dispose(); UserNameLabel = null; } if (userDetailsTableView != null) { userDetailsTableView.Dispose(); userDetailsTableView = null; } if (HelpButton != null) { HelpButton.Dispose(); HelpButton = null; } }
void ReleaseDesignerOutlets() { if (DataTableView != null) { DataTableView.Dispose(); DataTableView = null; } if (HelpButton != null) { HelpButton.Dispose(); HelpButton = null; } if (NoDataView != null) { NoDataView.Dispose(); NoDataView = null; } }
void SetResources() { SetTitle(Resource.String.title_register_card); cardEntryView = FindViewById <CardEntryView> (Resource.Id.cardEntryView); TextView hintTextView = FindViewById <TextView> (Resource.Id.hintTextView); cardEntryView.HintTextView = hintTextView; avsEntryView = FindViewById <AVSEntryView> (Resource.Id.avsEntryView); startDateEntryView = FindViewById <StartDateIssueNumberEntryView> (Resource.Id.startDateEntryView); cv2ExpiryHelpInfoButton = FindViewById <HelpButton> (Resource.Id.infoButtonID); addressLine1 = FindViewById <EditText> (Resource.Id.addressLine1); addressLine2 = FindViewById <EditText> (Resource.Id.addressLine2); addressLine3 = FindViewById <EditText> (Resource.Id.addressLine3); addressTown = FindViewById <EditText> (Resource.Id.addressTown); addressPostCode = FindViewById <EditText> (Resource.Id.addressPostCode); SetHelpText(Resource.String.help_info, Resource.String.help_card_text); SetHelpText(Resource.String.help_postcode_title, Resource.String.help_postcode_text, Resource.Id.postCodeHelpButton); }
// ReSharper restore UnusedAutoPropertyAccessor.Global // ReSharper restore UnusedMethodReturnValue.Global // ReSharper restore UnusedMember.Global // ReSharper restore MemberCanBeProtected.Global // ReSharper restore MemberCanBePrivate.Global #endregion Public #region Event handlers and overrides protected void Page_Load(object sender, EventArgs e) { PlaceHolder.Controls.Clear(); if (!string.IsNullOrWhiteSpace(Title)) { SubHeading.InnerHtml = Title; } if (string.IsNullOrWhiteSpace(Tooltip)) { if (!string.IsNullOrWhiteSpace(Title)) { HelpButton.Title += " for " + Title; } } else { HelpButton.Title = Tooltip; } if (ContentTemplate == null) { HelpButton.Style.Add(HtmlTextWriterStyle.Display, "none"); } else { _Container = new SubHeadingWithHelpContainer(); ContentTemplate.InstantiateIn(_Container); PlaceHolder.Controls.Add(_Container); if (string.IsNullOrWhiteSpace(Transition)) { Transition = "blind"; } var onClick = $"$('#{FindControl("SubHeadingOuter").ClientID} div.help').toggle('{Transition}',400);"; HelpButton.Attributes["onclick"] = onClick; if (!string.IsNullOrWhiteSpace(CssClass)) { HelpButton.AddCssClasses(CssClass); } } }
public SkinableWindowBorder(TopLevelWindow Window, WindowBorderSkin skin, bool IsExecluded) { _parent = Window; TopBorder = new SkinBorder(this); LeftBorder = new SkinBorder(this); RightBorder = new SkinBorder(this); BottomBorder = new SkinBorder(this); TitleBackgroundControl = new LayeredControl(TopBorder); TitleControl = new LayeredLabel(TopBorder); IconControl = new LayeredIcon(TopBorder); IconControl.Size = new Size(16, 16); MinimizeButton = new MinimizeButton(TopBorder); MaximizeButton = new MaximizeButton(TopBorder); CloseButton = new CloseButton(TopBorder); HelpButton = new HelpButton(TopBorder); if (Window.SizeBox) { TopBorder.LeftCornerCursor = Cursors.SizeNWSE; TopBorder.RightCornerCursor = Cursors.SizeNESW; TopBorder.TopCursor = Cursors.SizeNS; LeftBorder.NormalCursor = Cursors.SizeWE; RightBorder.NormalCursor = Cursors.SizeWE; BottomBorder.NormalCursor = Cursors.SizeNS; BottomBorder.LeftCornerCursor = Cursors.SizeNESW; BottomBorder.RightCornerCursor = Cursors.SizeNWSE; } _windowEventHandler = new WindowEventHandler(this, Parent); _settingsUpdater = new SettingsUpdater(IsExecluded, this); _processExitHandler = new ProcessExitHandler(this, Parent.Process); _skinWindowButtonsHandler = new SkinWindowButtonsHandler(this); _controlsChangeHandler = new SkinWindowControlsChangeHandler(this); Skin = skin; }
void buttonPress() { if (selection == 1) { StartButton.StartGame(); } else if (selection == 2) { HelpButton.Help(); } else if (selection == 3) { CreditButton.Credits(); } else if (selection == 4) { QuitButton.Quit(); } }
void ReleaseDesignerOutlets() { if (ButtonOutlet != null) { ButtonOutlet.Dispose(); ButtonOutlet = null; } if (DisclosureButton != null) { DisclosureButton.Dispose(); DisclosureButton = null; } if (FeedbackLabel != null) { FeedbackLabel.Dispose(); FeedbackLabel = null; } if (LorumIpsum != null) { LorumIpsum.Dispose(); LorumIpsum = null; } if (RoundedGradient != null) { RoundedGradient.Dispose(); RoundedGradient = null; } if (HelpButton != null) { HelpButton.Dispose(); HelpButton = null; } }
public void Draw(SpriteBatch spriteBatch, Vector2 position) { Vector2 offsets = offset + position; Vector2 offsetIcons = offsets + offsetIcon; background.Draw(spriteBatch, offsets, 0.8f); imgLine.Draw(spriteBatch, new Vector2(114, 6) + offsets, 0.81f); imgHCBackdrop.Draw(spriteBatch, new Vector2(61, 2) + offsets, 0.81f); DiamondIcon.Draw(spriteBatch, new Vector2(0, 0) + offsetIcons, 0.81f); CreditIcon.Draw(spriteBatch, new Vector2(0, 19) + offsetIcons, 0.81f); DucketIcon.Draw(spriteBatch, new Vector2(0, 38) + offsetIcons, 0.81f); HCIcon.Draw(spriteBatch, new Vector2(78, 13) + offsets, 0.81f); HelpButton.Draw(spriteBatch, new Vector2(120, 3) + offsets, 0.81f); ExitButton.Draw(spriteBatch, new Vector2(120, 24) + offsets, 0.81f); SettingsButton.Draw(spriteBatch, new Vector2(120, 45) + offsets, 0.81f); txtDiamond.Draw(spriteBatch, offsets + new Vector2(38 - txtDiamond.measureString().X, 6)); txtCredit.Draw(spriteBatch, offsets + new Vector2(38 - txtCredit.measureString().X, 24)); txtDucket.Draw(spriteBatch, offsets + new Vector2(38 - txtDucket.measureString().X, 44)); //100 = HC Text }
private static void Nothing(object sender, HelpButton e) { }
private void helpToolStripMenuItem_Click(object sender, EventArgs e) { HelpButton?.Invoke(this, null); }