mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-02 16:29:54 +00:00
out-of-range color configurable
This commit is contained in:
parent
5c884dbfc1
commit
1f1b04bf93
@ -449,6 +449,8 @@ array<float, 2> enc(int i, int a) {
|
|||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
color_t color_out_of_range = 0xFF0080FF;
|
||||||
|
|
||||||
EX void cast() {
|
EX void cast() {
|
||||||
enable_raycaster();
|
enable_raycaster();
|
||||||
|
|
||||||
@ -520,7 +522,7 @@ EX void cast() {
|
|||||||
forCellIdEx(c1, i, c) {
|
forCellIdEx(c1, i, c) {
|
||||||
int u = (id/per_row*length) + (id%per_row * S7) + i;
|
int u = (id/per_row*length) + (id%per_row * S7) + i;
|
||||||
if(!ids.count(c1)) {
|
if(!ids.count(c1)) {
|
||||||
wallcolor[u] = glhr::acolor(0xFF);
|
wallcolor[u] = glhr::acolor(color_out_of_range);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto code = enc(ids[c1], 0);
|
auto code = enc(ids[c1], 0);
|
||||||
@ -629,6 +631,11 @@ EX void configure() {
|
|||||||
dialog::scaleLog();
|
dialog::scaleLog();
|
||||||
dialog::extra_options = [] {
|
dialog::extra_options = [] {
|
||||||
dialog::addBoolItem_action("generate", rays_generate, 'G');
|
dialog::addBoolItem_action("generate", rays_generate, 'G');
|
||||||
|
dialog::addColorItem(XLAT("out-of-range color"), color_out_of_range, 'X');
|
||||||
|
dialog::add_action([] {
|
||||||
|
dialog::openColorDialog(color_out_of_range);
|
||||||
|
dialog::dialogflags |= sm::SIDE;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user