Skip to content

Commit

Permalink
Set button "erase tiles" to erase layer 2 tiles too
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrigo A. do Amaral committed Dec 13, 2015
1 parent 095c9ab commit c9c128f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion BizHawk/smw-bizhawk.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3314,7 +3314,7 @@ function Options_form.create_window()
xform, yform = 4, yform + 25

-- HELP
Options_form.erase_tiles = forms.button(Options_form.form, "Erase tiles", function() Layer1_tiles = {} end, xform, yform)
Options_form.erase_tiles = forms.button(Options_form.form, "Erase tiles", function() Layer1_tiles = {}; Layer2_tiles = {} end, xform, yform)
xform = xform + 105
Options_form.write_help_handle = forms.button(Options_form.form, "Help", Options_form.write_help, xform, yform)
end
Expand Down
4 changes: 2 additions & 2 deletions Snes9x/smw-snes9x.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ function Options_menu.display()
gui.text(x_pos + delta_x + 3, y_pos, "Draw tiles with left click?")
y_pos = y_pos + delta_y

create_button(x_pos, y_pos, "Erase Tiles", function() Layer1_tiles = {} end)
create_button(x_pos, y_pos, "Erase Tiles", function() Layer1_tiles = {}; Layer2_tiles = {} end)
y_pos = y_pos + delta_y

-- Manage opacity / filter
Expand Down Expand Up @@ -3095,7 +3095,7 @@ local function snes9x_buttons()
;

create_button(Buffer_width + Border_right, Buffer_height + Border_bottom, "Erase Tiles",
function() Layer1_tiles = {} end, {always_on_client = true, ref_y = 1.0})
function() Layer1_tiles = {}; Layer2_tiles = {} end, {always_on_client = true, ref_y = 1.0})
;
else
if Cheat.allow_cheats then -- show cheat status anyway
Expand Down
5 changes: 3 additions & 2 deletions lsnes/smw-lsnes-rr2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2026,7 +2026,8 @@ function Options_menu.display()
draw_message("Cheats " .. (Cheat.allow_cheats and "allowed." or "blocked."))
end, {always_on_client = true, ref_y = 1.0})

create_button(Buffer_width + Border_right, Buffer_height, "Erase Tiles", function() Layer1_tiles = {} end, {always_on_client = true, ref_y = 1.0})
create_button(Buffer_width + Border_right, Buffer_height, "Erase Tiles", function() Layer1_tiles = {}; Layer2_tiles = {}
end, {always_on_client = true, ref_y = 1.0})

-- Tabs
create_button(x_pos, y_pos, "Show/hide", function() Options_menu.current_tab = "Show/hide options" end,
Expand Down Expand Up @@ -4158,7 +4159,7 @@ local function lsnes_yield()
end, {always_on_client = true, ref_y = 1.0})

create_button(Buffer_width + Border_right, Buffer_height + Border_bottom, "Erase Tiles",
function() Layer1_tiles = {} end, {always_on_client = true, ref_y = 1.0})
function() Layer1_tiles = {}; Layer2_tiles = {} end, {always_on_client = true, ref_y = 1.0})
;

-- Quick save movie/state buttons
Expand Down

0 comments on commit c9c128f

Please sign in to comment.