#define LAYER_SELECTED_OFFSET 15.0f
static const Color LAYER_CELL_BACKGROUND_COLORS[LAYER_PICKER_N] = {
- {1.0f, 0.0f, 0.0f, 1.0f},
- {0.0f, 1.0f, 0.0f, 1.0f},
- {0.0f, 0.0f, 1.0f, 1.0f},
- {1.0f, 1.0f, 1.0f, 1.0f},
- {1.0f, 0.2f, 0.6f, 1.0f},
- {0.6f, 0.6f, 1.0f, 1.0f},
- {0.2f, 1.0f, 0.6f, 1.0f},
- {0.2f, 0.6f, 1.0f, 1.0f},
- {0.2f, 1.0f, 0.6f, 1.0f},
+ {1.0f, 0.0f, 0.0f, 1.0f}, // LAYER_PICKER_BACKGROUND
+ {0.0f, 1.0f, 0.0f, 1.0f}, // LAYER_PICKER_PLAYER
+ {0.6f, 0.6f, 1.0f, 1.0f}, // LAYER_PICKER_BACK_PLATFORMS
+ {0.0f, 0.0f, 1.0f, 1.0f}, // LAYER_PICKER_PLATFORMS
+ {1.0f, 1.0f, 1.0f, 1.0f}, // LAYER_PICKER_GOALS
+ {1.0f, 0.2f, 0.6f, 1.0f}, // LAYER_PICKER_LAVA
+ {0.2f, 1.0f, 0.6f, 1.0f}, // LAYER_PICKER_BOXES
+ {0.2f, 0.6f, 1.0f, 1.0f}, // LAYER_PICKER_LABELS
+ {0.2f, 1.0f, 0.6f, 1.0f}, // LAYER_PICKER_REGIONS
};
static const char *LAYER_CELL_TITLES[LAYER_PICKER_N] = {
"Background", // LAYER_PICKER_BACKGROUND
"Player", // LAYER_PICKER_PLAYER
- "Platforms", // LAYER_PICKER_PLATFORMS,
+ "Back Platforms", // LAYER_PICKER_BACK_PLATFORMS
+ "Platforms", // LAYER_PICKER_PLATFORMS
"Goals", // LAYER_PICKER_GOALS
"Lava", // LAYER_PICKER_LAVA
- "Back Platforms", // LAYER_PICKER_BACK_PLATFORMS,
- "Boxes", // LAYER_PICKER_BOXES = 0,
+ "Boxes", // LAYER_PICKER_BOXES
"Labels", // LAYER_PICKER_LABELS
"Regions", // LAYER_PICKER_REGIONS
};
const Rect viewport = camera_view_port_screen(camera);
for (size_t i = 0; i < LAYER_PICKER_N; ++i) {
- const Vec size = {
+ const Vec2f size = {
.x = viewport.w * LAYER_CELL_WR_RATIO,
.y = viewport.w * LAYER_CELL_WR_RATIO * LAYER_CELL_HW_RATIO
};
- Vec position = {
+ Vec2f position = {
.x = 0.0f,
.y = viewport.h * 0.5f - size.y * LAYER_PICKER_N * 0.5f
};
const Rect viewport = camera_view_port_screen(camera);
- const Vec size = {
+ const Vec2f size = {
.x = viewport.w * LAYER_CELL_WR_RATIO,
.y = viewport.w * LAYER_CELL_WR_RATIO * LAYER_CELL_HW_RATIO
};
- const Vec position = {
+ const Vec2f position = {
.x = 0.0f,
.y = viewport.h * 0.5f - size.y * LAYER_PICKER_N * 0.5f
};