mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 01:00:25 +00:00
color table dialog now allows adding more / removing colors
This commit is contained in:
parent
313666a240
commit
fe937cf20a
14
config.cpp
14
config.cpp
@ -2646,6 +2646,20 @@ EX void edit_color_table(colortable& ct, const reaction_t& r IS(reaction_t()), b
|
||||
});
|
||||
}
|
||||
|
||||
dialog::addItem("add a color", 'A');
|
||||
dialog::add_action([&ct, r] {
|
||||
ct.push_back(rand() & 0x1FFFFFF);
|
||||
r();
|
||||
});
|
||||
|
||||
if(isize(ct) > 2) {
|
||||
dialog::addItem("delete a color", 'D');
|
||||
dialog::add_action([&ct, r] {
|
||||
ct.pop_back();
|
||||
r();
|
||||
});
|
||||
}
|
||||
|
||||
dialog::addBack();
|
||||
dialog::display();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user