1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-26 11:27:39 +00:00

cleaned up linepatterns

This commit is contained in:
Zeno Rogue
2019-12-14 13:33:25 +01:00
parent 91b22e2d62
commit 6ee57aa758
2 changed files with 356 additions and 374 deletions

View File

@@ -702,15 +702,13 @@ EX void viewdist_configure_dialog() {
});
int id = 0;
for(auto& lp: linepatterns::patterns) {
using namespace linepatterns;
if(among(lp.id, patTriTree, patTriRings, patTriOther)) {
dialog::addColorItem(XLAT(lp.lpname), lp.color, '1'+(id++));
dialog::add_action([&lp] () {
dialog::openColorDialog(lp.color, NULL);
dialog::dialogflags |= sm::MAYDARK | sm::SIDE | sm::EXPANSION;
});
}
using namespace linepatterns;
for(auto& lp: {&patTriTree, &patTriRings, &patTriOther}) {
dialog::addColorItem(XLAT(lp->lpname), lp->color, '1'+(id++));
dialog::add_action([&lp] () {
dialog::openColorDialog(lp->color, NULL);
dialog::dialogflags |= sm::MAYDARK | sm::SIDE | sm::EXPANSION;
});
}
if(!mod_allowed()) {