fix reversed color and mask

This commit is contained in:
Kistaro Windrider 2023-09-22 23:12:36 -07:00
parent 9299b49184
commit 28b7816fb1
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -109,14 +109,14 @@ function draw_ui()
print("clr", 18, 117, 7)
-- draw "color" bits
for i=0,3 do
draw_ui_checkbox(32 + 9*i, plane_mask & 1<<i ~= 0,i)
draw_ui_checkbox(32 + 9*i, plane_mask & 1<<(i+4) ~= 0,i)
end
print("mask", 73, 118, 1)
print("mask", 72, 117, 7)
-- draw "mask" bits
for i=0,3 do
draw_ui_checkbox(90 + 9*i, plane_mask & 1<<(i+4) ~= 0, i)
draw_ui_checkbox(90 + 9*i, plane_mask & 1<<i ~= 0, i)
end
end
@ -146,7 +146,7 @@ function handle_ui_click(x, y)
local box = x \ 9
--check range
if (box < 0 or box > 3) return
toggle_mask_bit(box)
toggle_mask_bit(box+4)
return
end
@ -155,7 +155,7 @@ function handle_ui_click(x, y)
local box = x \ 9
--check range
if (box < 0 or box > 3) return
toggle_mask_bit(box + 4)
toggle_mask_bit(box)
return
end