1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

dialog:: display crosshair when changing crosshair

This commit is contained in:
Zeno Rogue 2023-08-15 20:28:36 +02:00
parent 73e98644d3
commit 0e1d7c024e

View File

@ -1268,8 +1268,10 @@ EX void initConfig() {
// colors
param_f(crosshair_size, "size:crosshair");
addsaver(crosshair_color, "color:crosshair");
param_f(crosshair_size, "size:crosshair")
->set_extra(draw_crosshair);
param_color(crosshair_color, "color:crosshair", true, crosshair_color)
->set_extra(draw_crosshair);
param_b(mapeditor::drawplayer, "drawplayer");
param_color((color_t&) patterns::canvasback, "color:canvasback", false);
@ -2313,8 +2315,12 @@ EX void configureInterface() {
));
dialog::bound_low(0);
dialog::get_di().extra_options = [] {
draw_crosshair();
dialog::addColorItem(XLAT("crosshair color"), crosshair_color, 'X');
dialog::add_action([] { dialog::openColorDialog(crosshair_color); });
dialog::add_action([] {
dialog::openColorDialog(crosshair_color);
dialog::get_di().extra_options = draw_crosshair;
});
};
});