private void TextureBoxEnter(TextBox box) { textBoxStack.RemoveAt(textBoxStack.Count - 1); SelectTextureBox tb = (SelectTextureBox)box; decal = tb.texture; }
private void TextBoxEnter(TextBox box) { textBoxStack.RemoveAt(textBoxStack.Count - 1); }
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)); } }
private void NodeBoxEnter(TextBox box) { textBoxStack.RemoveAt(textBoxStack.Count - 1); TextInputBox tb = (TextInputBox)box; nodeString = tb.InputText; }
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)); }
private void ColorBoxEnter(TextBox box) { textBoxStack.RemoveAt(textBoxStack.Count - 1); decalColor = ((SelectColorBox)box).color; }