Пример #1
0
 public void UpdateText()
 {
     if (eventTextUIE.Changed())
     {
         if (eventTextUIE.Empty())
         {
             LocalizationRead.dicts["qst"].Remove(eventComponent.text_key);
             eventComponent.display = false;
         }
         else
         {
             LocalizationRead.updateScenarioText(eventComponent.text_key, eventTextUIE.GetText());
             if (eventComponent.buttons.Count == 0)
             {
                 eventComponent.buttons.Add(eventComponent.genQuery("button1"));
                 eventComponent.nextEvent.Add(new List <string>());
                 eventComponent.buttonColors.Add("white");
                 LocalizationRead.updateScenarioText(eventComponent.genKey("button1"),
                                                     CONTINUE.Translate());
             }
             if (!eventComponent.display)
             {
                 eventComponent.display = true;
                 Update();
                 return;
             }
         }
         if (!eventTextUIE.HeightAtTextPadding(1))
         {
             Update();
         }
     }
 }
Пример #2
0
    public void AddButton()
    {
        int count = eventComponent.nextEvent.Count + 1;

        eventComponent.nextEvent.Add(new List <string>());
        eventComponent.buttons.Add(eventComponent.genQuery("button" + count));
        eventComponent.buttonColors.Add("white");
        LocalizationRead.updateScenarioText(eventComponent.genKey("button" + count), "Button " + count);
        Update();
    }
Пример #3
0
 public void UpdateText()
 {
     if (!eventTextDBE.Text.Equals(""))
     {
         LocalizationRead.updateScenarioText(eventComponent.text_key, eventTextDBE.Text);
         eventComponent.display = true;
         if (eventComponent.buttons.Count == 0)
         {
             eventComponent.buttons.Add(eventComponent.genQuery("button1"));
             eventComponent.nextEvent.Add(new List <string>());
             eventComponent.buttonColors.Add("white");
             LocalizationRead.updateScenarioText(eventComponent.genKey("button1"), "Continue");
         }
     }
     else
     {
         LocalizationRead.scenarioDict.Remove(eventComponent.text_key);
         eventComponent.display = false;
     }
 }