Pass canvas to Hline
This commit is contained in:
parent
13320c8011
commit
f9cb598b0f
|
@ -254,9 +254,9 @@ extern grs_font_ptr ui_small_font;
|
||||||
extern unsigned char CBLACK,CGREY,CWHITE,CBRIGHT,CRED;
|
extern unsigned char CBLACK,CGREY,CWHITE,CBRIGHT,CRED;
|
||||||
extern UI_GADGET * selected_gadget;
|
extern UI_GADGET * selected_gadget;
|
||||||
|
|
||||||
#define Hline(x1,x2,y,c) Hline(x1,y,x2,c)
|
#define Hline(C,x1,x2,y,c) Hline(C,x1,y,x2,c)
|
||||||
#define Vline(y1,y2,x,c) Vline(x,y1,y2,c)
|
#define Vline(y1,y2,x,c) Vline(x,y1,y2,c)
|
||||||
void Hline(short x1, short x2, short y, uint8_t color);
|
void Hline(grs_canvas &, fix x1, fix x2, fix y, uint8_t color);
|
||||||
void Vline(short y1, short y2, short x, uint8_t color);
|
void Vline(short y1, short y2, short x, uint8_t color);
|
||||||
extern void ui_string_centered( short x, short y, const char * s );
|
extern void ui_string_centered( short x, short y, const char * s );
|
||||||
extern void ui_draw_box_out( short x1, short y1, short x2, short y2 );
|
extern void ui_draw_box_out( short x1, short y1, short x2, short y2 );
|
||||||
|
|
|
@ -107,10 +107,10 @@ static void gr_draw_sunken_border( short x1, short y1, short x2, short y2 )
|
||||||
{
|
{
|
||||||
const uint8_t cgrey = CGREY;
|
const uint8_t cgrey = CGREY;
|
||||||
const uint8_t cbright = CBRIGHT;
|
const uint8_t cbright = CBRIGHT;
|
||||||
Hline(x1-1, x2+1, y1-1, cgrey);
|
Hline(*grd_curcanv, x1 - 1, x2 + 1, y1 - 1, cgrey);
|
||||||
Vline( y1-1, y2+1, x1-1, cgrey);
|
Vline( y1-1, y2+1, x1-1, cgrey);
|
||||||
|
|
||||||
Hline(x1-1, x2+1, y2+1, cbright);
|
Hline(*grd_curcanv, x1 - 1, x2 + 1, y2 + 1, cbright);
|
||||||
Vline( y1, y2+1, x2+1, cbright);
|
Vline( y1, y2+1, x2+1, cbright);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,9 +77,8 @@ static window_event_result messagebox_handler(UI_DIALOG *dlg,const d_event &even
|
||||||
ui_dialog_set_current_canvas(dlg);
|
ui_dialog_set_current_canvas(dlg);
|
||||||
ui_string_centered( m->width/2, m->text_y, m->text );
|
ui_string_centered( m->width/2, m->text_y, m->text );
|
||||||
|
|
||||||
Hline(1, m->width-2, m->line_y+1, CGREY);
|
Hline(*grd_curcanv, 1, m->width - 2, m->line_y + 1, CGREY);
|
||||||
|
Hline(*grd_curcanv, 2, m->width - 2, m->line_y + 2, CBRIGHT);
|
||||||
Hline(2, m->width-2, m->line_y+2, CBRIGHT);
|
|
||||||
|
|
||||||
grd_curscreen->sc_canvas.cv_font = temp_font;
|
grd_curscreen->sc_canvas.cv_font = temp_font;
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
||||||
|
|
||||||
namespace dcx {
|
namespace dcx {
|
||||||
|
|
||||||
void Hline(short x1, short x2, short y, const uint8_t color)
|
void Hline(grs_canvas &canvas, const fix x1, const fix x2, const fix y, const uint8_t color)
|
||||||
{
|
{
|
||||||
gr_uline(*grd_curcanv, i2f(x1), i2f(y), i2f(x2), i2f(y), color);
|
gr_uline(canvas, i2f(x1), i2f(y), i2f(x2), i2f(y), color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Vline(short y1, short y2, short x, const uint8_t color)
|
void Vline(short y1, short y2, short x, const uint8_t color)
|
||||||
|
@ -49,10 +49,10 @@ void ui_string_centered( short x, short y, const char * s )
|
||||||
|
|
||||||
void ui_draw_shad( short x1, short y1, short x2, short y2, short c1, short c2 )
|
void ui_draw_shad( short x1, short y1, short x2, short y2, short c1, short c2 )
|
||||||
{
|
{
|
||||||
Hline(x1+0, x2-1, y1+0, c1);
|
Hline(*grd_curcanv, x1 + 0, x2 - 1, y1 + 0, c1);
|
||||||
Vline(y1+1, y2+0, x1+0, c1);
|
Vline(y1+1, y2+0, x1+0, c1);
|
||||||
|
|
||||||
Hline(x1+1, x2, y2-0, c2);
|
Hline(*grd_curcanv, x1 + 1, x2, y2 - 0, c2);
|
||||||
Vline(y1+0, y2-1, x2-0, c2);
|
Vline(y1+0, y2-1, x2-0, c2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue