public ScriptEditor(string path)
 {
     this.path  = path;
     Title      = Path.GetFileName(path);
     textEditor = new ColorTextEdit();
     textEditor.SetMode(ColorTextEditMode.Lua);
     textEditor.SetText(File.ReadAllText(path));
 }
 public DesignerTab(string text, string path, MainWindow mainWindow)
 {
     this.mainWindow = mainWindow;
     Title           = Path.GetFileName(path);
     savePath        = path;
     xmlEditor       = new ColorTextEdit();
     xmlEditor.SetText(text);
     TextChanged();
 }
 public StylesheetEditor(string xmlFolder, UiContext context)
 {
     Title      = "Stylesheet";
     textEditor = new ColorTextEdit();
     uiContext  = context;
     path       = Path.Combine(xmlFolder, "stylesheet.xml");
     textEditor.SetText(File.ReadAllText(path));
     TextChanged();
 }
Esempio n. 4
0
 public DesignerTab(string text, string path, MainWindow mainWindow)
 {
     this.mainWindow = mainWindow;
     Title           = Path.GetFileName(path);
     savePath        = path;
     xmlEditor       = new ColorTextEdit();
     xmlEditor.SetText(text);
     context             = new UiContext(mainWindow.UiData);
     context.Renderer2D  = mainWindow.Renderer2D;
     context.RenderState = mainWindow.RenderState;
     context.GameApi     = mainWindow.TestApi;
     TextChanged();
 }
Esempio n. 5
0
 public DesignerTab(string text, string path, MainWindow mainWindow)
 {
     this.mainWindow = mainWindow;
     Title           = Path.GetFileName(path);
     savePath        = path;
     xmlEditor       = new ColorTextEdit();
     xmlEditor.SetText(text);
     context = new UiContext(mainWindow.Project.UiData);
     context.CommandBuffer = mainWindow.CommandBuffer;
     context.RenderContext = mainWindow.RenderContext;
     context.GameApi       = mainWindow.TestApi;
     TextChanged();
 }