mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 09:50:34 +00:00
linewidth multipliers for grid and ring
This commit is contained in:
parent
5149dbeefd
commit
7baf97521c
16
config.cpp
16
config.cpp
@ -287,9 +287,11 @@ void initConfig() {
|
||||
addsaver(forecolor, "color:foreground");
|
||||
addsaver(bordcolor, "color:borders");
|
||||
addsaver(ringcolor, "color:ring");
|
||||
addsaver(vid.multiplier_ring, "mult:ring", 1);
|
||||
addsaver(modelcolor, "color:model");
|
||||
addsaver(periodcolor, "color:period");
|
||||
addsaver(stdgridcolor, "color:stdgrid");
|
||||
addsaver(vid.multiplier_grid, "mult:grid", 1);
|
||||
addsaver(dialog::dialogcolor, "color:dialog");
|
||||
for(auto& p: colortables)
|
||||
savecolortable(p.second, s0+"canvas"+p.first);
|
||||
@ -1673,11 +1675,17 @@ void show_color_dialog() {
|
||||
dialog::addColorItem(XLAT("projection boundary"), ringcolor, 'r');
|
||||
dialog::add_action([] () { dialog::openColorDialog(ringcolor); dialog::dialogflags |= sm::SIDE; });
|
||||
|
||||
dialog::addSelItem(XLAT("boundary width multiplier"), fts(vid.multiplier_ring), 'R');
|
||||
dialog::add_action([] () { dialog::editNumber(vid.multiplier_ring, 0, 10, 1, 1, XLAT("boundary width multiplier"), ""); });
|
||||
|
||||
dialog::addColorItem(XLAT("projection background"), modelcolor, 'c');
|
||||
dialog::add_action([] () { dialog::openColorDialog(modelcolor); dialog::dialogflags |= sm::SIDE; });
|
||||
|
||||
dialog::addColorItem(XLAT("standard grid color"), stdgridcolor, 'g');
|
||||
dialog::add_action([] () { vid.grid = true; dialog::openColorDialog(stdgridcolor); dialog::dialogflags |= sm::SIDE; });
|
||||
|
||||
dialog::addSelItem(XLAT("grid width multiplier"), fts(vid.multiplier_grid), 'G');
|
||||
dialog::add_action([] () { dialog::editNumber(vid.multiplier_grid, 0, 10, 1, 1, XLAT("grid width multiplier"), ""); });
|
||||
|
||||
dialog::addSelItem(XLAT("brightness behind the sphere"), fts(backbrightness), 'i');
|
||||
dialog::add_action([] () { dialog::editNumber(backbrightness, 0, 1, .01, 0.25, XLAT("brightness behind the sphere"),
|
||||
@ -1953,9 +1961,15 @@ int read_color_args() {
|
||||
else if(argis("-ring")) {
|
||||
PHASEFROM(2); shift(); ringcolor = arghex();
|
||||
}
|
||||
else if(argis("-ringw")) {
|
||||
PHASEFROM(2); shift_arg_formula(vid.multiplier_ring);
|
||||
}
|
||||
else if(argis("-stdgrid")) {
|
||||
PHASEFROM(2); shift(); stdgridcolor = arghex();
|
||||
}
|
||||
else if(argis("-gridw")) {
|
||||
PHASEFROM(2); shift_arg_formula(vid.multiplier_grid);
|
||||
}
|
||||
else if(argis("-period")) {
|
||||
PHASEFROM(2); shift(); periodcolor = arghex();
|
||||
}
|
||||
@ -2201,6 +2215,8 @@ unordered_map<string, ld&> params = {
|
||||
#if CAP_SHOT
|
||||
{"gamma", shot::gamma},
|
||||
{"fade", shot::fade},
|
||||
{"mgrid", vid.multiplier_grid},
|
||||
{"mring", vid.multiplier_ring},
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -4516,6 +4516,7 @@ void radar_grid(cell *c, const transmatrix& V) {
|
||||
void draw_grid_at(cell *c, const transmatrix& V) {
|
||||
dynamicval<ld> lw(vid.linewidth, vid.linewidth);
|
||||
|
||||
vid.linewidth *= vid.multiplier_grid;
|
||||
vid.linewidth *= cgi.scalefactor;
|
||||
|
||||
// sphere: 0.3948
|
||||
|
2
hyper.h
2
hyper.h
@ -264,6 +264,8 @@ struct videopar {
|
||||
#define AA_MULTI 64
|
||||
#define AA_MULTI16 128 // not configurable
|
||||
ld linewidth;
|
||||
|
||||
ld multiplier_grid, multiplier_ring;
|
||||
|
||||
int joyvalue, joyvalue2, joypanthreshold;
|
||||
ld joypanspeed;
|
||||
|
@ -1471,6 +1471,7 @@ color_t modelcolor = 0;
|
||||
#if CAP_QUEUE
|
||||
void draw_model_elements() {
|
||||
|
||||
dynamicval<ld> lw(vid.linewidth, vid.linewidth * vid.multiplier_ring);
|
||||
switch(pmodel) {
|
||||
|
||||
case mdRotatedHyperboles: {
|
||||
@ -1595,6 +1596,8 @@ void draw_boundary(int w) {
|
||||
|
||||
if(w == 1) return;
|
||||
|
||||
dynamicval<ld> lw(vid.linewidth, vid.linewidth * vid.multiplier_ring);
|
||||
|
||||
color_t lc = ringcolor;
|
||||
color_t fc = modelcolor;
|
||||
PPR p = PPR::OUTCIRCLE;
|
||||
|
Loading…
Reference in New Issue
Block a user