Ja torna a funcionar el borde
This commit is contained in:
@@ -145,16 +145,17 @@ void LoadingScreen::renderLoad()
|
||||
// Dibuja el efecto de carga en el borde
|
||||
void LoadingScreen::renderBorder()
|
||||
{
|
||||
// Pinta el borde de colro azul
|
||||
Uint8 color = stringToColor("blue");
|
||||
Screen::get()->clearSurface(color);
|
||||
// Obtiene la Surface del borde
|
||||
auto border = Screen::get()->getBorderSurface();
|
||||
|
||||
// Pinta el borde de color azul
|
||||
border->clear(stringToColor("blue"));
|
||||
|
||||
// Añade lineas amarillas
|
||||
color = stringToColor("yellow");
|
||||
const Uint8 COLOR = stringToColor("yellow");
|
||||
const int WIDTH = options.game.width + (options.video.border.width * 2);
|
||||
const int HEIGHT = options.game.height + (options.video.border.height * 2);
|
||||
bool draw_enabled = rand() % 2 == 0 ? true : false;
|
||||
auto surface = Screen::get()->getRendererSurface();
|
||||
|
||||
int row = 0;
|
||||
while (row < HEIGHT)
|
||||
@@ -164,7 +165,7 @@ void LoadingScreen::renderBorder()
|
||||
{
|
||||
for (int i = row; i < row + ROW_HEIGHT; ++i)
|
||||
{
|
||||
surface->drawLine(0, i, WIDTH, i, color);
|
||||
border->drawLine(0, i, WIDTH, i, COLOR);
|
||||
}
|
||||
}
|
||||
row += ROW_HEIGHT;
|
||||
@@ -192,9 +193,6 @@ void LoadingScreen::render()
|
||||
{
|
||||
if (options.video.border.enabled)
|
||||
{
|
||||
// Prepara para empezar a dibujar en la textura del borde
|
||||
Screen::get()->startDrawOnBorder();
|
||||
|
||||
// Dibuja el efecto de carga en el borde
|
||||
renderBorder();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user