// MAIN public Settings(Akcja a) { akszyn = a; sfd.FileOk += new CancelEventHandler(sfd_FileOk); collider = new Boolean[Akcja.indexTiles + 1]; wall = new Boolean[Akcja.indexTiles + 1]; }
// main public m8 public Akcja(Scene s, string st, Image img) { usedScene = s; TILESET_PATH = img; TILESET_STRING = st; SetupEdges(); MAIN_TILEMAP = new Tilemap(st, 64 * 32, 32); SetupTiles(); Instance = this; //TODO: edytować nazwy klas i ogarnąć kod \//\//\/\/\ w klasie Settings set = new Settings(this); //forcuje odswierzenie podgladu updatePreview = true; updatePos = true; // dodaje okno wyboru fragmentów CWindow tilesChooser = new CWindow(Akcja.TILESET_PATH.Width + 6, Akcja.TILESET_PATH.Height + 6, 5, 10, Color.Gray, "Tiles"); tilesChooser.AddGraphicsToWindow(3, 3, Akcja.TILESET_PATH); // funcja dodająca grafike tilesChooser.AddButtonsForTiles(); // TODO: Połączyć tą i funkcje wyzej, tak jak jest to w CWindow-options. usedScene.Add(tilesChooser); // okienko z informacjami fragmentu/podgląd tilePreview = new CWindow(100, 140, Akcja.TILESET_PATH.Width + 6 + 6, 10, Color.Gray, "Info"); usedScene.Add(tilePreview); // ... SetupPreviewInfo(); // okno opcji, zapis/wczytaj/pomoc/quit/clear CWindow options = new CWindow(184, 54, 5, Akcja.TILESET_PATH.Height + 6 + 1 + 45, Color.Red, "Options"); options.AddButtonsForOptions(); options.AddTextToWindow(4, 40, new RichText("Made by Daawson", 10));//witam usedScene.Add(options); }
public static void quitClick() { Akcja.QuitEditor(); }
void sfd_FileOk(Object sender, CancelEventArgs e) { string name = sfd.FileName; File.WriteAllText(name, Akcja.SaveFile()); }