Exemplo n.º 1
0
 private void Awake()
 {
     archer                = GameObject.FindObjectOfType <Archer>();
     entry_text            = GameObject.FindObjectOfType <EntryText>();
     story_controller      = GetComponentInChildren <StoryController>();
     typo_event_controller = GetComponentInChildren <TypoEventController>();
 }
Exemplo n.º 2
0
 public bool Equals(PopupEntry other)
 {
     return(EntryText.Equals(other.EntryText) &&
            EntryPlaceholder.Equals(other.EntryPlaceholder) &&
            EntryTextColour.Equals(other.EntryTextColour) &&
            PlaceholderTextColour.Equals(other.PlaceholderTextColour) &&
            BackgroundColour.Equals(other.BackgroundColour));
 }
Exemplo n.º 3
0
        void EntryFocus()
        {
            EntryText.Text = "";

            EntryText.Text = game.lastLetterForPlace;

            EntryText.Focus();

            EntryText.CursorPosition = 1;
        }
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            //TODO: Save all Entry Items.
            EntryText.SelectAll();
            Entry.Title     = TitleText.Text;
            Entry.Text      = EntryText.Selection.Text;
            Entry.EntryDate = DateTime.Parse(DateText.Text);
            Entry.Location  = (Location)LocationBox.SelectedItem;
            Entry.User      = UserContext.User;
            Entry.NewEntry();

            SnackbarThree.MessageQueue.Enqueue($"{Entry.Title} Has been saved");
        }
Exemplo n.º 5
0
        protected virtual void OnTextKeyPressed(object sender, KeyEventArgs e)
        {
            if (DataType.IsPrimitive || DataType == typeof(decimal))
            {
                if (!char.IsControl((char)e.NativeKeyCode) && !char.IsDigit((char)e.NativeKeyCode) && e.Key != Key.Minus)
                {
                    e.Handled = true;
                }

                // only allow one decimal point
                bool dpoint = EntryText.IndexOf('.') != -1 || EntryText.IndexOf(',') != -1;
                if (!dpoint && (e.Key == Key.Comma || e.Key == Key.Period))
                {
                    e.Handled = false;
                }
            }
        }
Exemplo n.º 6
0
 private void EntryText_Completed(object sender, EventArgs e)
 {
     EntryText.Focus();
     //var x = MessageListView.ItemsSource;
     //MessageListView.ScrollTo(vm.Messages.Last(), ScrollToPosition.Start, false);
 }