private void editText(object sender, RoutedEventArgs e)
        {
            Button         senderButton = sender as Button;
            Plotpoint      senderPoint  = gameFile.getPoint(pointsPanel.Children.IndexOf(senderButton.Parent as UIElement));
            TextEditWindow textWindow   = new TextEditWindow(senderPoint.setText);

            textWindow.setText(senderPoint.getText());
            textWindow.Show();
        }
        public void updateWindow(Plotpoint plotPoint)
        {
            currentPoint      = plotPoint;
            textPanel.Content = currentPoint.getText();

            foreach (Button button in choicesPanel.Children)
            {
                button.Visibility = Visibility.Collapsed;
                button.IsEnabled  = false;
            }

            for (int i = 0; i < currentPoint.countChoices(); i++)
            {
                (choicesPanel.Children[i] as Button).Visibility = Visibility.Visible;
                (choicesPanel.Children[i] as Button).IsEnabled  = true;
            }
        }
Ejemplo n.º 3
0
 public int addPlotpoint(Plotpoint plotpoint)
 {
     plotpoints.Add(plotpoint);
     return(plotpoints.Count);
 }