void Awake() { if (gc == null) { gc = this; } else { // if this one's a duplicate, destroy Destroy(this.gameObject); return; } DontDestroyOnLoad(this); titleText = editorTitleText; dialogueUI = GetComponentInChildren <DialogueUI>(); signUI = GetComponentInChildren <SignUI>(); pc = GetComponentInChildren <PlayerController>(); rm = GetComponent <RespawnManager>(); playerFollower = gc.GetComponentInChildren <PlayerFollower>(); save = gc.GetComponent <Save>(); blackoutUI = GetComponentInChildren <BlackFadeUI>(); pauseUI = gc.transform.Find("PixelCanvas").transform.Find("PauseUI").GetComponent <Animator>(); abilityUIAnimator = gc.transform.Find("PixelCanvas").transform.Find("AbilityGetUI").GetComponent <Animator>(); inventory = gc.GetComponentInChildren <InventoryController>(); parallaxOption = gc.GetComponentInChildren <ParallaxOption>(); }
private async void CreateButton_Click(object sender, RoutedEventArgs e) { using (var client = new MyCouchClient("http://*****:*****@localhost:5984", "tv-series")) { //POST (create) with server generated id & Rev await client.Documents.PostAsync("{\"title\": \"" + TitleText.Text + "\", \"creator\":\"" + CreatorTxt.Text + "\",\"stars\":\"" + StarsTxt.Text + "\",\"seasons\":\"" + SeasonsTxt.Text + "\",\"mpa_rating\":\"" + MPARatingTxt.Text + "\",\"imbd_rating\":\"" + IMBDRatingTxt.Text + "/10\"}"); MessageBox.Show("Document Successfully Created", "TV-Series", MessageBoxButton.OK, MessageBoxImage.Information); // Clears all text boxes when a document is created. TitleText.Clear(); CreatorTxt.Clear(); StarsTxt.Clear(); SeasonsTxt.Clear(); MPARatingTxt.Clear(); IMBDRatingTxt.Clear(); // Refreshes the number of tv-serie documents when one is created. var personQuery = new QueryViewRequest("series", "CountNoTvSeries").Configure(query2 => query2 .Reduce(false)); ViewQueryResponse result2 = await client.Views.QueryAsync(personQuery); NoTvSeriesTxt.Text = result2.RowCount.ToString(); } }
private void save_Click(object sender, RoutedEventArgs e) { bool canSave = true; if (String.IsNullOrEmpty(TitleText.Text)) { MessageBox.Show("You must enter a title."); canSave = false; } if (canSave & String.IsNullOrEmpty(LinkText.Text)) { MessageBox.Show("You must enter a Url."); canSave = false; } if (canSave & (!LinkText.Text.ToUpper().StartsWith("HTTP://") && !LinkText.Text.ToUpper().StartsWith("HTTPS://"))) { MessageBox.Show("Url must begin with http:// or https://."); canSave = false; } if (canSave) { TitleText.GetBindingExpression(TextBox.TextProperty).UpdateSource(); LinkText.GetBindingExpression(TextBox.TextProperty).UpdateSource(); viewModel.Save(() => { NavigationService.GoBack(); PhoneApplicationService.Current.State["RefreshNeeded"] = true; }); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (this.NavigationContext.QueryString.ContainsKey("reid")) { string title = this.NavigationContext.QueryString["title"]; if (title.Length > 3 && title.Substring(0, 3) == "Re:") { TitleText.Text = title; } else { TitleText.Text = "Re: " + title; } TypeTitle.Text = "回复"; Board.Text = board = this.NavigationContext.QueryString["board"]; reid = int.Parse(this.NavigationContext.QueryString["reid"]); ContentText.Focus(); } else { TypeTitle.Text = "发帖"; Board.Text = board = this.NavigationContext.QueryString["board"]; TitleText.Focus(); } }
void Awake() { if (gc == null) { gc = this; } else { // if this one's a duplicate, destroy Destroy(this.gameObject); return; } DontDestroyOnLoad(this); titleText = editorTitleText; dialogueUI = GetComponentInChildren <DialogueUI>(); signUI = GetComponentInChildren <SignUI>(); pc = GetComponentInChildren <PlayerController>(); rm = GetComponent <RespawnManager>(); playerFollower = gc.GetComponentInChildren <PlayerFollower>(); save = gc.GetComponent <SaveWrapper>().save; blackoutUI = GetComponentInChildren <BlackFadeUI>(); pauseUI = GetComponentInChildren <PauseUI>(); abilityUIAnimator = GameObject.Find("AbilityGetUI").GetComponent <Animator>(); inventory = gc.GetComponentInChildren <InventoryController>(); parallaxOption = gc.GetComponentInChildren <ParallaxOption>(); bossHealthUI = GameObject.Find("BossHealthUI").GetComponent <BarUI>(); bossHealthUI.gameObject.SetActive(false); playerMenu = GameObject.Find("PlayerMenu"); binarySaver = gc.GetComponent <BinarySaver>(); saveWrapper = gc.GetComponent <SaveWrapper>(); audioListener = gc.GetComponentInChildren <AudioListener>(); bossFightIntro = gc.GetComponentInChildren <BossFightIntro>(includeInactive: true); }
void MenuSetting() { cc.transform.parent = cc.cam_menu1_pos.transform; ResultUI.GetComponent <Animator>().SetBool("On", false); Enhanced.SetActive(false); //cc.transform.parent = titleCamerapos.transform; Destroy(InstanceStage); InstanceObsCon.GetComponent <ObstacleControllSync> ().DestroyAll(); Destroy(InstanceObsCon); foreach (GameObject data in players.Values) { Destroy(data); } DataClear(); //MenuStage.SetActive(true); //CameraController.Instance.transform.parent = null; //MenuStage.GetComponent<Animator>().SetBool("On", false); //TitleCamera.SetActive (true); //TitleText.SetActive (true); TitleText.GetComponent <TitleEffect>().setActive_script(false); //sphereController.SetActive (true); //cubesController.SetActive (true); //cubesController.GetComponent<cubesController> ().CubeSetting (); //Menu.SetActive (true); }
private void InitViews() { BackgroundContent?.SetBackgroundColor(ColorConstants.BackroundContent); if (TitleText != null) { TitleText.Text = RFeedback.GiveUsFedbackText; TitleText.SetTextColor(ColorConstants.WhiteColor); TitleText.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size24); } if (ConfirmButton != null) { ConfirmButton.SetTextColor(ColorConstants.WhiteColor); ConfirmButton.Text = RFeedback.SubmitFeedbackText.ToUpperInvariant(); ConfirmButton.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size14); ConfirmButton.SetBackgroundColor(ColorConstants.SelectorHome); ConfirmButton.Click -= Confirm_Click; ConfirmButton.Click += Confirm_Click; ConfirmButton.SetSelectedColor(ColorConstants.WhiteColor); ConfirmButton.Visibility = FeedbackManager.Instance.LastService ? ViewState.Visible : ViewState.Invisible; } HeaderBackroundRoundText?.SetBackgroundColor(ColorConstants.BackroundCell, type: RadiusType.Aspect); BackroundServiceImage?.SetImageFromResource(FeedbackManager.Instance.GetCurrentItem()?.ImagePathCategory); if (SericeText == null) { return; } SericeText.Text = FeedbackManager.Instance.GetCurrentItem()?.NameCategory; SericeText.SetTextColor(ColorConstants.WhiteColor); SericeText.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size18); }
public void ShowTitleText(string text) { TitleText titleText = Prefabs.Instantiate <TitleText>(); if (titleTextContainer == null) { titleTextContainer = this.FindChildObject("TitleTextContainer"); } titleText.Initialize(text, titleTextContainer); }
private void Start() { GameManager.Instance.GameState = GameManager.State.Menu; _fence = MainMenuFence.Instance; _titleText = TitleText.Instance; _panel = BlinkPanel.Instance; StartCoroutine(Entry()); }
//implement methods public override void InputFormFields() { WaitForEditorToDisplay(); WaitForFrameToDisplay(); WaitForBodyToDisplay(); WaitForPanelToDisplay(); UrlText.SendKeys(Data.Url); TitleText.SendKeys(Data.Title); }
public override void TouchesBegan(NSSet touches, UIEvent evt) { var touch = (UITouch)evt.AllTouches.AnyObject; if (!(touch.View is UITextField)) { TitleText.EndEditing(true); } base.TouchesBegan(touches, evt); }
public PopUpNews(Stream stream) : base(stream) { using (BinaryDataReader reader = new BinaryDataReader(stream, true)) { // Read the title key reader.Seek(0x50, SeekOrigin.Begin); TitleKey = reader.ReadString(StringDataFormat.ZeroTerminated, Encoding.ASCII); // Read the content key reader.Seek(0x90, SeekOrigin.Begin); ContentKey = reader.ReadString(StringDataFormat.ZeroTerminated, Encoding.ASCII); // Split the title key by underscores string[] splitKey = TitleKey.Split("_"); // Check if this is a pop-up for an event if (splitKey[2] == "event") { // Combine the event ID and the pop-up ID Id = splitKey[3] + "_" + splitKey[4]; // Set the event flag IsPopUpForEvent = true; } else { // The ID is simply the last entry Id = splitKey.Last(); // Set the event flag IsPopUpForEvent = false; } // Seek to the data reader.Seek(0xF0, SeekOrigin.Begin); // Read the MSBTs Dictionary <Language, Dictionary <string, string> > msbts = this.ReadMsbts(reader); // Loop over every MSBT combination foreach (KeyValuePair <Language, Dictionary <string, string> > pair in msbts) { // Add the title and content to their respective Dictionaries TitleText.Add(pair.Key, pair.Value[TitleKey]); ContentText.Add(pair.Key, pair.Value[ContentKey]); } // Read the image Image = this.ReadDataEntry(reader); // Read the URL Url = this.ReadDataEntryAsString(reader); } }
private void SaveButton_Click(object sender, EventArgs e) { NoteTable.Rows.Add(TitleText.Text, MessageText.Text); StringWriter writer = new StringWriter(); NoteTable.WriteXml(writer); Properties.Settings.Default.Notes = writer.ToString(); Properties.Settings.Default.Save(); TitleText.Clear(); MessageText.Clear(); }
public override void UpdateData() { base.UpdateData(); if (TitleText == null) { return; } TitleText.Text = "Read qr-code in order to call a waiter to your table"; TitleText.SetFont(FontsConstant.RobotoBold, FontsConstant.Size18); }
void GameSettings() { GameInstance = (GameObject)Instantiate(GameInstancePrefab); TitleText.SetActive(false); //TitleCamera.SetActive (false); sphereController.SetActive(false); cubesController.GetComponent <CubesController> ().GameStart(); InstanceStage = (GameObject)Instantiate(StagePrefab, Vector3.zero, Quaternion.identity); InstanceStage.transform.parent = GameInstance.transform; Enhanced.SetActive(true); Menu.SetActive(false); }
void GameTutor() //教學頁狀態UI設定 { IsTutoring = true; GameTitle.SetActive(false); TitleText.SetActive(false); TutorialText.SetActive(true); ReButtonSmall.SetActive(true); //遊戲中熱鍵 ReTextSmall.SetActive(true); ExitButtonSmall.SetActive(true); ExitTextSmall.SetActive(true); }
public override IEnumerator Routine() { string[] text = Presentation.GetCleanDialog("PAGE2_TITLE").Split(new char[] { '|' }); Vector2 pos = new Vector2(128f, 128f); int num; for (int i = 0; i < text.Length; i = num + 1) { TitleText item = new TitleText(pos, text[i]); title.Add(item); yield return(item.Stamp()); pos.X += item.Width + ActiveFont.Measure(' ').X * 1.5f; item = null; num = i; } text = null; pos = default; yield return(PressButton()); list = FancyText.Parse(Presentation.GetDialog("PAGE2_LIST"), Width, 32, 1f, new Color?(Color.Black * 0.7f), null); float delay = 0f; while (listIndex < list.Nodes.Count) { if (list.Nodes[listIndex] is FancyText.NewLine) { yield return(PressButton()); } else { delay += 0.008f; if (delay >= 0.016f) { delay -= 0.016f; yield return(0.016f); } } listIndex++; } yield return(PressButton()); Audio.Play("event:/new_content/game/10_farewell/ppt_impossible"); while (impossibleEase < 1f) { impossibleEase = Calc.Approach(impossibleEase, 1f, Engine.DeltaTime); yield return(null); } yield break; }
internal static void OnUnload(object sender, EventArgs eventArgs) { if (SaveTimer != null) { OnSaveTimerElapsed(null, null); SaveTimer.Dispose(); SaveTimer = null; } TextureLoader.Dispose(); TitleText.Dispose(); }
public MainWindow() { InitializeComponent(); db = new AppContext(); DoubleAnimation textAnimation = new DoubleAnimation(); textAnimation.From = 0; textAnimation.To = 30; textAnimation.Duration = TimeSpan.FromSeconds(3); TitleText.BeginAnimation(TextBlock.FontSizeProperty, textAnimation); }
void Awake() { gc = this; titleText = editorTitleText; DontDestroyOnLoad(this); dialogueUI = GetComponentInChildren <DialogueUI>(); signUI = GetComponentInChildren <SignUI>(); pc = GetComponentInChildren <PlayerController>(); rm = GetComponent <RespawnManager>(); playerFollower = gc.GetComponentInChildren <PlayerFollower>(); save = gc.GetComponent <Save>(); blackoutUI = GetComponentInChildren <BlackFadeUI>(); }
public void UpdateSize(float scale) { if (IsDisposed) { DPIManager.Unregister(this); return; } SuspendLayout(); int border = DPIManager.Adjust(4, scale); int dborder = border * 2; picture.Location = new Point(border, border); picture.Size = new Size(DPIManager.Adjust(44, scale), DPIManager.Adjust(44, scale)); Height = DPIManager.Adjust(52, scale); Size labelSize = TextRenderer.MeasureText(TitleText, title.Font); Size plabelSize = TextRenderer.MeasureText(PlayerText, players.Font); float reservedSpaceLabel = this.Width - picture.Width; if (labelSize.Width > reservedSpaceLabel) { // make text smaller int charSize = TextRenderer.MeasureText("g", title.Font).Width; int toRemove = (int)((reservedSpaceLabel - labelSize.Width) / (float)charSize); toRemove = Math.Max(toRemove + 3, 7); title.Text = TitleText.Remove(TitleText.Length - toRemove, toRemove) + "..."; } else { title.Text = TitleText; } players.Text = PlayerText; title.Size = labelSize; players.Size = plabelSize; float height = this.Height / 2.0f; float lheight = labelSize.Height / 2.0f; title.Location = new Point(picture.Width + picture.Left + border, (int)(height - labelSize.Height) /*(int)(height - lheight)*/); players.Location = new Point(picture.Width + picture.Left + border + playerIcon.Width + 10, (int)height); playerIcon.Location = new Point(picture.Width + picture.Left + border + 10, (int)height); playerIcon.Size = new Size(DPIManager.Adjust(players.Size.Height, scale), DPIManager.Adjust(players.Size.Height, scale)); ResumeLayout(); }
private void ClearButton_Click(object sender, RoutedEventArgs e) { // Clears all boxes in case of mistake etc.. SearchIDTxt.Clear(); SearchIDTxt.IsEnabled = true; ReadTxt.Clear(); TitleText.Clear(); CreatorTxt.Clear(); StarsTxt.Clear(); SeasonsTxt.Clear(); MPARatingTxt.Clear(); IMBDRatingTxt.Clear(); MessageBox.Show("All Fields Have Been Reset", "TV-Series", MessageBoxButton.OK, MessageBoxImage.Exclamation); }
public void LoggedIn() { LoginButtonText.GetComponent <TextMeshProUGUI>().fontSize = 23.28f; LoginButtonText.GetComponent <TextMeshProUGUI>().text = "Connect"; loggedIn = true; Destroy(LoginButton); LoginButton.SetActive(false); LoginButtonCover.SetActive(false); UserLoginText.SetActive(false); PasswordText.SetActive(false); TitleText.SetActive(false); HeadingPanel.SetActive(false); HeadingText.SetActive(false); FadeoutPanel.SetActive(true); RegisterButton.SetActive(false); }
void GameSettings() { GameInstance = (GameObject)Instantiate(GameInstancePrefab); //TitleText.SetActive (false); //TitleText.GetComponent<TitleEffect>().active = true; TitleText.GetComponent <TitleEffect>().setActive_script(true); //TitleCamera.SetActive (false); //sphereController.SetActive (false); //cubesController.GetComponent<cubesController> ().GameStart (); //MenuStage.SetActive(false); //MenuStage.GetComponent<Animator>().SetBool("On", true); //shutter.SetActive(false); InstanceStage = (GameObject)Instantiate(StagePrefab, Vector3.zero, Quaternion.identity); InstanceStage.transform.parent = GameInstance.transform; Enhanced.SetActive(true); //Menu.SetActive(false); }
// Use this for initialization void Start() { // タイトル文字のオブジェクト(Title)取得. TitleObj = GameObject.Find("TitleText"); // タイトル文字についているスクリプト(Title)取得. Title = TitleObj.GetComponent <TitleText>(); // 初期位置は隠しておく. transform.localPosition = new Vector3(500, -133, 0); // アニメーション開始位置. initPos = new Vector3(0, -3.28f, 0); // 背景画像のオブジェクト(BackGround)取得. AnimCutObj = GameObject.Find("BackGround"); // 背景画像についているスクリプト(AnimCut)取得. animCut = AnimCutObj.GetComponent <AnimCut>(); isClickOnCard = false; }
void MenuSetting() { Enhanced.SetActive(false); cc.transform.parent = titleCamerapos.transform; Destroy(InstanceStage); InstanceObsCon.GetComponent <ObstacleControllSync> ().DestroyAll(); Destroy(InstanceObsCon); foreach (GameObject data in players.Values) { Destroy(data); } DataClear(); //TitleCamera.SetActive (true); TitleText.SetActive(true); sphereController.SetActive(true); cubesController.SetActive(true); cubesController.GetComponent <CubesController> ().CubeSetting(); Menu.SetActive(true); }
public void UpdateSize(float scale) { if (IsDisposed) { DPIManager.Unregister(this); return; } SuspendLayout(); int border = DPIManager.Adjust(8, scale); int dborder = border * 2; checkbox.Location = new Point(12, 11); checkbox.Size = new Size(30, 30); Height = DPIManager.Adjust(52, scale); Size labelSize = TextRenderer.MeasureText(TitleText, title.Font); float reservedSpaceLabel = this.Width - checkbox.Width; if (labelSize.Width > reservedSpaceLabel) { // make text smaller int charSize = TextRenderer.MeasureText("g", title.Font).Width; int toRemove = (int)((reservedSpaceLabel - labelSize.Width) / (float)charSize); toRemove = Math.Max(toRemove + 3, 7); title.Text = TitleText.Remove(TitleText.Length - toRemove, toRemove) + "..."; } else { title.Text = TitleText; } title.Size = labelSize; float height = this.Height / 2.0f; float lheight = labelSize.Height / 2.0f; title.Location = new Point(checkbox.Width + checkbox.Left + border, (int)(height - lheight)); ResumeLayout(); }
void Build() => Content = RelativeLayout( ReferringSitesWithRefresh .Constrain().X(0).Y(titleRowHeight) .Width(p => p.Width).Height(p => p.Height - titleRowHeight), iOS ? TitleShadow .Constrain().X(0).Y(0) .Width(p => p.Width).Height(titleRowHeight) : null, iOS ? TitleText .Constrain().X(10).Y(0) : null, iOS ? CloseButton .Constrain().X(p => p.Width - p.WidthOf(closeButton) - 10).Y(0) .Width(p => p.WidthOf(closeButton)) : null, storeRatingRequest .Constrain().X(0).Y(p => p.Height - p.HeightOf(storeRatingRequest)) .Width(p => p.Width) );
public override void UpdateData() { MainWindowView?.SetBackgroundColor(ColorConstants.WhiteColor, 8); CellModel2 = new FeedbackListCategoryCell(this); BackgroundView?.SetBackgroundColor(ColorConstants.TransparentColor); if (SubmitText != null) { SubmitText.SetTextColor(ColorConstants.WhiteColor); SubmitText.Text = "Submit Feedback".ToUpperInvariant(); SubmitText.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size14); SubmitText.SetBackgroundColor(ColorConstants.SelectorHome); SubmitText.Click -= Submit_Click; SubmitText.Click += Submit_Click; SubmitText.SetSelectedColor(ColorConstants.WhiteColor); } if (TitleText != null) { TitleText.Text = RFeedback.GiveUsFedbackText; TitleText.SetTextColor(ColorConstants.FeedbackTitle); TitleText.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size24); } if (CloseImage != null) { CloseImage?.SetImageFromResource(DrawableConstants.FeedbackCloseIcon); CloseImage.Click -= BackgroundView_Click; CloseImage.Click += BackgroundView_Click; } //ListViewCategory?.UpdateDataSource(FeedbackManager.Instance.GetCategoryItem()); //ListViewCategory?.Orientation(OrientationListView.Horizontal); ListViewEmoji?.UpdateDataSource(FeedbackManager.Instance.GetItem()); ListViewEmoji?.Orientation(OrientationListView.Horizontal); }
// Use this for initialization void Start() { // タイトル文字のオブジェクト(Title)取得. TitleObj = GameObject.Find("TitleText"); // タイトル文字についているスクリプト(Title)取得. Title = TitleObj.GetComponent <TitleText>(); // 初期位置は隠しておく. image.localPosition = new Vector3(1000, -125, 0); // アニメーション開始位置. initPos = new Vector3(109, -125, 0); // 移動量設定. move = 0.5f; // 背景画像のオブジェクト(BackGround)取得. AnimCutObj = GameObject.Find("BackGround"); // 背景画像についているスクリプト(AnimCut)取得. animCut = AnimCutObj.GetComponent <AnimCut>(); // 山札画像のオブジェクト(Card)取得. CardObj = GameObject.Find("Card"); // 山札画像についているスクリプト(CardAnim)取得. cardAnim = CardObj.GetComponent <CardAnim>(); }