1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

color table dialog now allows adding more / removing colors

This commit is contained in:
Zeno Rogue 2022-10-06 13:46:15 +02:00
parent 313666a240
commit fe937cf20a

View File

@ -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::addBack();
dialog::display(); dialog::display();
} }