public static int Main(string[] args) {
Program kit = new Program("tiler", "0.0.1", Modules.UI, args);
public static int Main(string[] args) {
Program kit = new Program("tiler", "0.0.1", Modules.UI, args);
MainLayout.PackStart(AppBar, false, false, 0);
AppBar.Show();
MainLayout.PackStart(AppBar, false, false, 0);
AppBar.Show();
FileSelection selection = new FileSelection("Select ImageFile");
selection.OkButton.Clicked += new EventHandler(OnSelectImageOk);
selection.CancelButton.Clicked += new EventHandler(OnSelectImageCancel);
FileSelection selection = new FileSelection("Select ImageFile");
selection.OkButton.Clicked += new EventHandler(OnSelectImageOk);
selection.CancelButton.Clicked += new EventHandler(OnSelectImageCancel);
}
private void OnSelectImageCancel(object o, EventArgs args) {
FileSelection selection = ((FileSelection.FSButton) o).FileSelection;
selection.Destroy();
}
}
private void OnSelectImageCancel(object o, EventArgs args) {
FileSelection selection = ((FileSelection.FSButton) o).FileSelection;
selection.Destroy();
}
private void OnSelectImageOk(object o, EventArgs args) {
FileSelection selection = ((FileSelection.FSButton) o).FileSelection;
string file = selection.Filename;
selection.Destroy();
ChangeImage(new FileInfo(file).Name);
private void OnSelectImageOk(object o, EventArgs args) {
FileSelection selection = ((FileSelection.FSButton) o).FileSelection;
string file = selection.Filename;
selection.Destroy();
ChangeImage(new FileInfo(file).Name);
int startid = tileset.Tiles.Count;
for(int y = 0; y < TilesY; ++y) {
for(int x = 0; x < TilesX; ++x) {
int i = y*TilesX+x;
int startid = tileset.Tiles.Count;
for(int y = 0; y < TilesY; ++y) {
for(int x = 0; x < TilesX; ++x) {
int i = y*TilesX+x;
TilesY = pixbuf.Height / 32;
SelectionArray = new bool[TilesX * TilesY];
Tiles = new Tile[TilesX * TilesY];
TilesY = pixbuf.Height / 32;
SelectionArray = new bool[TilesX * TilesY];
Tiles = new Tile[TilesX * TilesY];
= new Gdk.Rectangle(0, 0, pixbuf.Width, pixbuf.Height);*/
DrawingArea.WidthRequest = pixbuf.Width;
DrawingArea.HeightRequest = pixbuf.Height;
= new Gdk.Rectangle(0, 0, pixbuf.Width, pixbuf.Height);*/
DrawingArea.WidthRequest = pixbuf.Width;
DrawingArea.HeightRequest = pixbuf.Height;
gc.RgbFgColor = new Color(0xff, 0, 0);
foreach(Tile tile in Selection) {
gc.RgbFgColor = new Color(0xff, 0, 0);
foreach(Tile tile in Selection) {
= ((ImageRegion) tile.Images[0]).Region;
drawable.DrawRectangle(gc, false, rect.X, rect.Y, rect.Width,
rect.Height);
= ((ImageRegion) tile.Images[0]).Region;
drawable.DrawRectangle(gc, false, rect.X, rect.Y, rect.Width,
rect.Height);
for(int i = 0; i < SelectionArray.Length; ++i)
SelectionArray[i] = false;
select((int) e.Event.X, (int) e.Event.Y);
for(int i = 0; i < SelectionArray.Length; ++i)
SelectionArray[i] = false;
select((int) e.Event.X, (int) e.Event.Y);
} else {
IDEntry.Text += "," + tile.ID.ToString();
IDEntry.Editable = false;
} else {
IDEntry.Text += "," + tile.ID.ToString();
IDEntry.Editable = false;