nova font per al editor
This commit is contained in:
@@ -51,25 +51,25 @@ void EditorStatusBar::fillTexture() {
|
|||||||
|
|
||||||
surface_->clear(stringToColor("black"));
|
surface_->clear(stringToColor("black"));
|
||||||
|
|
||||||
auto text = Resource::Cache::get()->getText("smb2");
|
auto text = Resource::Cache::get()->getText("8bithud");
|
||||||
const Uint8 LABEL_COLOR = stringToColor("bright_cyan");
|
const Uint8 LABEL_COLOR = stringToColor("bright_cyan");
|
||||||
const Uint8 VALUE_COLOR = stringToColor("white");
|
const Uint8 VALUE_COLOR = stringToColor("white");
|
||||||
|
|
||||||
// Línea 1: Número y nombre de la habitación
|
// Línea 1: Número y nombre de la habitación
|
||||||
const std::string ROOM_TEXT = room_number_ + " " + room_name_;
|
const std::string ROOM_TEXT = toLower(room_number_ + " " + room_name_);
|
||||||
text->writeColored(LEFT_X, LINE1_Y, ROOM_TEXT, LABEL_COLOR);
|
text->writeColored(LEFT_X, LINE1_Y, ROOM_TEXT, LABEL_COLOR);
|
||||||
|
|
||||||
// Línea 2: Coordenadas del ratón en tiles
|
// Línea 2: Coordenadas del ratón en tiles
|
||||||
const std::string TILE_X_STR = (mouse_tile_x_ < 10 ? "0" : "") + std::to_string(mouse_tile_x_);
|
const std::string TILE_X_STR = (mouse_tile_x_ < 10 ? "0" : "") + std::to_string(mouse_tile_x_);
|
||||||
const std::string TILE_Y_STR = (mouse_tile_y_ < 10 ? "0" : "") + std::to_string(mouse_tile_y_);
|
const std::string TILE_Y_STR = (mouse_tile_y_ < 10 ? "0" : "") + std::to_string(mouse_tile_y_);
|
||||||
text->writeColored(LEFT_X, LINE2_Y, "TILE:", LABEL_COLOR);
|
text->writeColored(LEFT_X, LINE2_Y, toLower("tile:"), LABEL_COLOR);
|
||||||
text->writeColored(LEFT_X + 48, LINE2_Y, TILE_X_STR + "," + TILE_Y_STR, VALUE_COLOR);
|
text->writeColored(LEFT_X + 30, LINE2_Y, TILE_X_STR + "," + TILE_Y_STR, VALUE_COLOR);
|
||||||
|
|
||||||
// Info de selección o indicador de modo editor
|
// Info de selección o indicador de modo editor
|
||||||
if (!selection_info_.empty()) {
|
if (!selection_info_.empty()) {
|
||||||
text->writeColored(LEFT_X + 112, LINE2_Y, selection_info_, stringToColor("bright_yellow"));
|
text->writeColored(LEFT_X + 80, LINE2_Y, toLower(selection_info_), stringToColor("bright_yellow"));
|
||||||
} else {
|
} else {
|
||||||
text->writeColored(176, LINE2_Y, "EDITOR", stringToColor("bright_green"));
|
text->writeColored(176, LINE2_Y, toLower("editor"), stringToColor("bright_green"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Screen::get()->setRendererSurface(previous_renderer);
|
Screen::get()->setRendererSurface(previous_renderer);
|
||||||
|
|||||||
@@ -23,9 +23,10 @@ class EditorStatusBar {
|
|||||||
void fillTexture(); // Dibuja los elementos en la surface
|
void fillTexture(); // Dibuja los elementos en la surface
|
||||||
|
|
||||||
// Constantes de posición (en pixels dentro de la surface de 256x48)
|
// Constantes de posición (en pixels dentro de la surface de 256x48)
|
||||||
static constexpr int LINE1_Y = 8; // Nombre de la habitación
|
static constexpr int LINE1_Y = 4; // Nombre de la habitación
|
||||||
static constexpr int LINE2_Y = 24; // Coordenadas del ratón
|
static constexpr int LINE2_Y = 14; // Coordenadas del ratón + selección
|
||||||
static constexpr int LEFT_X = 8; // Margen izquierdo
|
static constexpr int LINE3_Y = 24; // Línea extra disponible
|
||||||
|
static constexpr int LEFT_X = 4; // Margen izquierdo
|
||||||
|
|
||||||
// Objetos
|
// Objetos
|
||||||
std::shared_ptr<Surface> surface_; // Surface donde dibujar la barra
|
std::shared_ptr<Surface> surface_; // Surface donde dibujar la barra
|
||||||
|
|||||||
Reference in New Issue
Block a user