Skip to content

Commit

Permalink
Make better look for bitmask
Browse files Browse the repository at this point in the history
  • Loading branch information
volzhs committed Sep 5, 2018
1 parent f50dd68 commit 192beed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/editor_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ class EditorPropertyLayersGrid : public Control {
int h = bsize * 2 + 1;
int vofs = (rect.size.height - h) / 2;

Color color = get_color("highlight_color", "Editor");
for (int i = 0; i < 2; i++) {

Point2 ofs(4, vofs);
Expand All @@ -667,7 +668,8 @@ class EditorPropertyLayersGrid : public Control {
uint32_t idx = i * 10 + j;
bool on = value & (1 << idx);
Rect2 rect = Rect2(o, Size2(bsize, bsize));
draw_rect(rect, Color(0, 0, 0, on ? 0.8 : 0.3));
color.a = on ? 0.6 : 0.2;
draw_rect(rect, color);
flag_rects.push_back(rect);
}
}
Expand Down

0 comments on commit 192beed

Please sign in to comment.