mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-29 19:40:35 +00:00
darken the menu side of the screen
This commit is contained in:
parent
6e1743ac86
commit
bbc495b2fb
45
dialogs.cpp
45
dialogs.cpp
@ -502,6 +502,51 @@ EX namespace dialog {
|
||||
|
||||
tothei = (vid.yres - tothei) / 2;
|
||||
|
||||
if(current_display->sidescreen && darken < menu_darkening) {
|
||||
color_t col = (backcolor << 8) | (255 - (255 >> (menu_darkening - darken)));
|
||||
|
||||
if(svg::in || !(auraNOGL || vid.usingGL)) {
|
||||
flat_model_enabler fme;
|
||||
initquickqueue();
|
||||
ld pix = 1 / (2 * cgi.hcrossf / cgi.crossf);
|
||||
curvepoint(hyperpoint(vid.xres-dwidth, -10, 1, 1));
|
||||
curvepoint(hyperpoint(vid.xres + 10, -10, 1, 1));
|
||||
curvepoint(hyperpoint(vid.xres + 10, vid.yres + 10, 1, 1));
|
||||
curvepoint(hyperpoint(vid.xres-dwidth, vid.yres + 10, 1, 1));
|
||||
curvepoint(hyperpoint(vid.xres-dwidth, -10, 1, 1));
|
||||
shiftmatrix V = shiftless(atscreenpos(0, 0, pix));
|
||||
queuecurve(V, 0, col, PPR::LINE);
|
||||
quickqueue();
|
||||
}
|
||||
|
||||
#if CAP_GL
|
||||
else {
|
||||
auto full = part(col, 0);
|
||||
static vector<glhr::colored_vertex> auravertices;
|
||||
auravertices.clear();
|
||||
for(int x=0; x<16; x++) {
|
||||
for(int c=0; c<6; c++) {
|
||||
int bx = (c == 1 || c == 3 || c == 5) ? x+1 : x;
|
||||
int by = (c == 2 || c == 4 || c == 5) ? vid.yres : 0;
|
||||
int cx = bx == 0 ? 0 : bx == 16 ?vid.xres :
|
||||
vid.xres - dwidth + vid.xres / 100 * tan((bx-8)/8. * 90 * degree);
|
||||
part(col, 0) = lerp(0, full, bx / 16.);
|
||||
if(c == 0) println(hlog, "bx = ", bx, " -> cx = ", cx, " darken = ", part(col, 0));
|
||||
auravertices.emplace_back(hyperpoint(cx - current_display->xcenter, by - current_display->ycenter, 0, 1), col);
|
||||
}
|
||||
}
|
||||
glflush();
|
||||
current_display->next_shader_flags = GF_VARCOLOR;
|
||||
dynamicval<eModel> m(pmodel, mdPixel);
|
||||
current_display->set_all(0, 0);
|
||||
glhr::id_modelview();
|
||||
glhr::prepare(auravertices);
|
||||
glhr::set_depthtest(false);
|
||||
glDrawArrays(GL_TRIANGLES, 0, isize(auravertices));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
for(int i=0; i<N; i++) {
|
||||
item& I = items[i];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user