예제 #1
0
 private void TextureBoxEnter(TextBox box)
 {
     textBoxStack.RemoveAt(textBoxStack.Count - 1);
     SelectTextureBox tb = (SelectTextureBox)box;
     decal = tb.texture;
 }
예제 #2
0
 private void TextBoxEnter(TextBox box)
 {
     textBoxStack.RemoveAt(textBoxStack.Count - 1);
 }
예제 #3
0
        private void SaveBoxEnter(TextBox box)
        {
            // Set the name of the level.
            name = ((TextInputBox)box).InputText;

            textBoxStack.RemoveAt(textBoxStack.Count - 1);
            if (((TextInputBox)box).InputText == "")
            {
                textBoxStack.Add(new TextBox(null, "ERROR: Cannot save to blank filename.", TextBoxEnter));
                return;
            }
            if (this.Save("Content/Levels/" + ((TextInputBox)box).InputText + ".lvl") == 1)
            {
                textBoxStack.Add(new TextBox(null, "WARNING: Generic world objects saved.", TextBoxEnter));
            }
        }
예제 #4
0
 private void NodeBoxEnter(TextBox box)
 {
     textBoxStack.RemoveAt(textBoxStack.Count - 1);
     TextInputBox tb = (TextInputBox)box;
     nodeString = tb.InputText;
 }
예제 #5
0
 private void LoadBoxEnter(TextBox box)
 {
     textBoxStack.RemoveAt(textBoxStack.Count - 1);
     int flag = this.Load("Content/Levels/" + ((TextInputBox)box).InputText + ".lvl");
     if (flag == 2)
         textBoxStack.Add(new TextBox(null, "ERROR: Could not load file.", TextBoxEnter));
     else if (flag == 3)
         textBoxStack.Add(new TextBox(null, "WARNING: Needed to load in additional PNG files.", TextBoxEnter));
     else if (flag == 4)
         textBoxStack.Add(new TextBox(null, "WARNING: Missing textures on decals.", TextBoxEnter));
     else if (flag == -1)
         textBoxStack.Add(new TextBox(null, "ERROR: The file is corrupt.", TextBoxEnter));
 }
예제 #6
0
 private void ColorBoxEnter(TextBox box)
 {
     textBoxStack.RemoveAt(textBoxStack.Count - 1);
     decalColor = ((SelectColorBox)box).color;
 }