1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 18:23:08 +02:00

Removed dedicated horizontal line routine

Just draw a 1-pixel-high box instead.
This commit is contained in:
Maarten ter Huurne 2014-07-17 17:58:48 +02:00
parent 0810a26589
commit 86ee9955d6
3 changed files with 2 additions and 7 deletions

View File

@ -172,10 +172,6 @@ int Surface::rectangle(SDL_Rect re, RGBAColor c) {
return rectangle(re.x, re.y, re.w, re.h, c.r, c.g, c.b, c.a); return rectangle(re.x, re.y, re.w, re.h, c.r, c.g, c.b, c.a);
} }
int Surface::hline(Sint16 x, Sint16 y, Uint16 w, Uint8 r, Uint8 g, Uint8 b, Uint8 a) {
return hlineRGBA(raw, x, x + w - 1, y, r, g, b, a);
}
void Surface::clearClipRect() { void Surface::clearClipRect() {
SDL_SetClipRect(raw,NULL); SDL_SetClipRect(raw,NULL);
} }

View File

@ -79,7 +79,6 @@ public:
int rectangle(Sint16, Sint16, Uint16, Uint16, Uint8 r, Uint8 g, Uint8 b, Uint8 a); int rectangle(Sint16, Sint16, Uint16, Uint16, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
int rectangle(Sint16, Sint16, Uint16, Uint16, RGBAColor); int rectangle(Sint16, Sint16, Uint16, Uint16, RGBAColor);
int rectangle(SDL_Rect, RGBAColor); int rectangle(SDL_Rect, RGBAColor);
int hline(Sint16 x, Sint16 y, Uint16 h, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
private: private:
Surface(SDL_Surface *raw, bool freeWhenDone); Surface(SDL_Surface *raw, bool freeWhenDone);

View File

@ -87,8 +87,8 @@ void TextDialog::drawText(vector<string> *text, unsigned int y,
int rowY = y + (i - firstRow) * fontHeight; int rowY = y + (i - firstRow) * fontHeight;
if (line == "----") { // horizontal ruler if (line == "----") { // horizontal ruler
rowY += fontHeight / 2; rowY += fontHeight / 2;
gmenu2x->s->hline(5, rowY, gmenu2x->resX - 16, 255, 255, 255, 130); gmenu2x->s->box(5, rowY, gmenu2x->resX - 16, 1, 255, 255, 255, 130);
gmenu2x->s->hline(5, rowY+1, gmenu2x->resX - 16, 0, 0, 0, 130); gmenu2x->s->box(5, rowY+1, gmenu2x->resX - 16, 1, 0, 0, 0, 130);
} else { } else {
gmenu2x->font->write(gmenu2x->s, line, 5, rowY); gmenu2x->font->write(gmenu2x->s, line, 5, rowY);
} }