diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-22 18:39:24 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-22 18:39:24 (GMT) |
| commit | 84522d2594848ffeb539bc9af7eee5e6e775bb39 (patch) | |
| tree | 3419a59ee32c6f8a62f0810475e40139511f5565 /src | |
| parent | 9cf65de1c369e91ba9de1a9cbceab7ba9131c89d (diff) | |
| download | powder-84522d2594848ffeb539bc9af7eee5e6e775bb39.zip powder-84522d2594848ffeb539bc9af7eee5e6e775bb39.tar.gz | |
Fix Options meny in scale:2 and make tooltip more readable
Diffstat (limited to 'src')
| -rw-r--r-- | src/interface.c | 2 | ||||
| -rw-r--r-- | src/main.c | 28 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/interface.c b/src/interface.c index 75e22ec..a41f2c2 100644 --- a/src/interface.c +++ b/src/interface.c @@ -2422,6 +2422,8 @@ int quickoptions_tooltip_y = 0; void quickoptions_menu(pixel *vid_buf, int b, int bq, int x, int y) { int i = 0; + x /= sdl_scale; + y /= sdl_scale; if(quickoptions_tooltip_fade && quickoptions_tooltip) { drawtext_outline(vid_buf, (XRES - 5) - textwidth(quickoptions_tooltip), quickoptions_tooltip_y, quickoptions_tooltip, 255, 255, 255, quickoptions_tooltip_fade*20, 0, 0, 0, quickoptions_tooltip_fade*15); @@ -1585,7 +1585,7 @@ int main(int argc, char *argv[]) #endif int wavelength_gfx = 0; int x, y, line_x, line_y, b = 0, sl=1, sr=0, su=0, c, lb = 0, lx = 0, ly = 0, lm = 0;//, tx, ty; - int da = 0, dae = 0, db = 0, it = 2047, mx, my, bsx = 2, bsy = 2; + int da = 0, dae = 0, db = 0, it = 2047, mx, my, bsx = 2, bsy = 2, quickoptions_tooltip_fade_invert; float nfvx, nfvy; int load_mode=0, load_w=0, load_h=0, load_x=0, load_y=0, load_size=0; void *load_data=NULL; @@ -3479,29 +3479,29 @@ int main(int argc, char *argv[]) if (vs) strappend(uitext, " [FRAME CAPTURE]"); #endif - + quickoptions_tooltip_fade_invert = 255 - (quickoptions_tooltip_fade*20); if (sdl_zoom_trig||zoom_en) { if (zoom_x<XRES/2) { - fillrect(vid_buf, XRES-20-textwidth(heattext), 266, textwidth(heattext)+8, 15, 0, 0, 0, 140); - drawtext(vid_buf, XRES-16-textwidth(heattext), 270, heattext, 255, 255, 255, 200); + fillrect(vid_buf, XRES-20-textwidth(heattext), 266, textwidth(heattext)+8, 15, 0, 0, 0, quickoptions_tooltip_fade_invert*0.5); + drawtext(vid_buf, XRES-16-textwidth(heattext), 270, heattext, 255, 255, 255, quickoptions_tooltip_fade_invert*0.75); if (DEBUG_MODE) { - fillrect(vid_buf, XRES-20-textwidth(coordtext), 280, textwidth(coordtext)+8, 13, 0, 0, 0, 140); - drawtext(vid_buf, XRES-16-textwidth(coordtext), 282, coordtext, 255, 255, 255, 200); + fillrect(vid_buf, XRES-20-textwidth(coordtext), 280, textwidth(coordtext)+8, 13, 0, 0, 0, quickoptions_tooltip_fade_invert*0.5); + drawtext(vid_buf, XRES-16-textwidth(coordtext), 282, coordtext, 255, 255, 255, quickoptions_tooltip_fade_invert*0.75); } if (wavelength_gfx) draw_wavelengths(vid_buf,XRES-20-textwidth(heattext),265,2,wavelength_gfx); } else { - fillrect(vid_buf, 12, 266, textwidth(heattext)+8, 15, 0, 0, 0, 140); - drawtext(vid_buf, 16, 270, heattext, 255, 255, 255, 200); + fillrect(vid_buf, 12, 266, textwidth(heattext)+8, 15, 0, 0, 0, quickoptions_tooltip_fade_invert*0.5); + drawtext(vid_buf, 16, 270, heattext, 255, 255, 255, quickoptions_tooltip_fade_invert*0.75); if (DEBUG_MODE) { - fillrect(vid_buf, 12, 280, textwidth(coordtext)+8, 13, 0, 0, 0, 140); - drawtext(vid_buf, 16, 282, coordtext, 255, 255, 255, 200); + fillrect(vid_buf, 12, 280, textwidth(coordtext)+8, 13, 0, 0, 0, quickoptions_tooltip_fade_invert*0.5); + drawtext(vid_buf, 16, 282, coordtext, 255, 255, 255, quickoptions_tooltip_fade_invert*0.75); } if (wavelength_gfx) draw_wavelengths(vid_buf,12,265,2,wavelength_gfx); @@ -3509,12 +3509,12 @@ int main(int argc, char *argv[]) } else { - fillrect(vid_buf, XRES-20-textwidth(heattext), 12, textwidth(heattext)+8, 15, 0, 0, 0, 140); - drawtext(vid_buf, XRES-16-textwidth(heattext), 16, heattext, 255, 255, 255, 200); + fillrect(vid_buf, XRES-20-textwidth(heattext), 12, textwidth(heattext)+8, 15, 0, 0, 0, quickoptions_tooltip_fade_invert*0.5); + drawtext(vid_buf, XRES-16-textwidth(heattext), 16, heattext, 255, 255, 255, quickoptions_tooltip_fade_invert*0.75); if (DEBUG_MODE) { - fillrect(vid_buf, XRES-20-textwidth(coordtext), 26, textwidth(coordtext)+8, 11, 0, 0, 0, 140); - drawtext(vid_buf, XRES-16-textwidth(coordtext), 27, coordtext, 255, 255, 255, 200); + fillrect(vid_buf, XRES-20-textwidth(coordtext), 26, textwidth(coordtext)+8, 11, 0, 0, 0, quickoptions_tooltip_fade_invert*0.5); + drawtext(vid_buf, XRES-16-textwidth(coordtext), 27, coordtext, 255, 255, 255, quickoptions_tooltip_fade_invert*0.75); } if (wavelength_gfx) draw_wavelengths(vid_buf,XRES-20-textwidth(heattext),11,2,wavelength_gfx); |
