mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-26 21:37:02 +00:00
linepatterns:: width configurable
This commit is contained in:
parent
dbba704d1c
commit
be51445b77
@ -148,6 +148,7 @@ void initConfig() {
|
||||
addsaver(vid.usingGL, "usingGL", true);
|
||||
addsaver(vid.antialias, "antialias", AA_NOGL | AA_FONT | AA_LINES | AA_LINEWIDTH | AA_VERSION);
|
||||
addsaver(vid.linewidth, "linewidth", 1);
|
||||
addsaver(linepatterns::width, "pattern-linewidth", 1);
|
||||
addsaver(vid.scale, "scale", 1);
|
||||
addsaver(vid.xposition, "xposition", 0);
|
||||
addsaver(vid.yposition, "yposition", 0);
|
||||
|
1
hyper.h
1
hyper.h
@ -2245,6 +2245,7 @@ namespace linepatterns {
|
||||
};
|
||||
|
||||
extern vector<linepattern> patterns;
|
||||
extern ld width;
|
||||
};
|
||||
|
||||
transmatrix ddspin(cell *c, int d, ld bonus = 0);
|
||||
|
11
pattern2.cpp
11
pattern2.cpp
@ -2185,7 +2185,11 @@ namespace linepatterns {
|
||||
}
|
||||
}
|
||||
|
||||
ld width = 1;
|
||||
|
||||
void drawAll() {
|
||||
|
||||
vid.linewidth *= width;
|
||||
|
||||
if(any()) for(map<cell*, transmatrix>::iterator it = gmatrix.begin(); it != gmatrix.end(); it++) {
|
||||
cell *c = it->first;
|
||||
@ -2237,6 +2241,8 @@ namespace linepatterns {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vid.linewidth /= width;
|
||||
}
|
||||
|
||||
int numpat = 0;
|
||||
@ -2260,6 +2266,11 @@ namespace linepatterns {
|
||||
|
||||
dialog::addBreak(50);
|
||||
dialog::addBack();
|
||||
|
||||
dialog::addSelItem("line width", fts(width), 'W');
|
||||
dialog::add_action([] () {
|
||||
dialog::editNumber(width, 0, 10, 1, 1, XLAT("line width"), "");
|
||||
});
|
||||
|
||||
dialog::addBreak(50);
|
||||
dialog::addInfo("change the alpha parameter to show the lines");
|
||||
|
Loading…
x
Reference in New Issue
Block a user