drawing buttons(not yet functional) in map edit

This commit is contained in:
dani 2023-08-05 14:42:24 +00:00
parent aeab78e365
commit c3677a3ff4
2 changed files with 11 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -38,6 +38,9 @@ pub(crate) fn run_mapedit() {
gsa.reset_bgs(); gsa.reset_bgs();
gsa.reset_sprites(); gsa.reset_sprites();
for i in 0..3 {
gsa.bgs[i].scroll = IVec2 { x: -16, y: 0 };
}
gsa.sprites[SPR_CURSOR].tile = TILE_CURSOR; gsa.sprites[SPR_CURSOR].tile = TILE_CURSOR;
let mut gsa2 = Gsa { let mut gsa2 = Gsa {
@ -59,6 +62,13 @@ pub(crate) fn run_mapedit() {
} }
gsa2.bgs[0].active = false; gsa2.bgs[0].active = false;
gsa2.bgs[1].active = false; gsa2.bgs[1].active = false;
gsa2.bgs[2].active = true;
for y in 0..BACKGROUND_MAX_SIZE {
gsa2.bgs[2].tiles[0][y] = 0x7408;
}
gsa2.bgs[2].tiles[0][0] = 0x7409;
gsa2.bgs[2].tiles[0][2] = 0x740a;
let event_loop = EventLoop::new(); let event_loop = EventLoop::new();
let size = LogicalSize::new(1280, 720); let size = LogicalSize::new(1280, 720);
@ -156,7 +166,7 @@ pub(crate) fn run_mapedit() {
// tile select mode // tile select mode
gsa2.bgs[0].scroll -= delta; gsa2.bgs[0].scroll -= delta;
gsa2.bgs[1].scroll -= delta; gsa2.bgs[1].scroll -= delta;
gsa2.bgs[2].scroll -= delta; //gsa2.bgs[2].scroll -= delta;
} }
} }
*mouse_pos = new_pos; *mouse_pos = new_pos;