Skip to content

Commit

Permalink
centering "message filter button" [message_list.c] (#1183)
Browse files Browse the repository at this point in the history
* message filter button centering

* center button message minor fix

* text offset

* the numeric input window now looks better

* "scenario events" window can accommodate 7 (previously 5) lines for both "Conditions" and "Actions".

* text offset (barracks)

* minor fix advisors windows (offset text)

* minimum repeat value for "reques" is 1,
minimum repeat value for "invasion" is 1.

* Update src/window/editor/scenario_event_details.c

Co-authored-by: José Cadete <[email protected]>

* Update src/window/editor/scenario_event_details.c

Co-authored-by: José Cadete <[email protected]>

* Update src/window/editor/scenario_event_details.c

Co-authored-by: José Cadete <[email protected]>

* Update src/window/editor/scenario_event_details.c

Co-authored-by: José Cadete <[email protected]>

* Update src/window/editor/scenario_event_details.c

Co-authored-by: José Cadete <[email protected]>

* Update scenario_event_details.c

* fix+2 Update scenario_event_details.c

---------

Co-authored-by: José Cadete <[email protected]>
  • Loading branch information
eugenikus8 and crudelios authored Feb 7, 2025
1 parent 73b1b47 commit 8e8588d
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 64 deletions.
12 changes: 6 additions & 6 deletions src/window/advisor/education.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ static int draw_background(void)

// table headers
lang_text_draw(57, 4, 180, 86, FONT_SMALL_PLAIN);
lang_text_draw(57, 5, 290, 86, FONT_SMALL_PLAIN);
lang_text_draw(57, 6, 478, 86, FONT_SMALL_PLAIN);
lang_text_draw(57, 5, 300, 86, FONT_SMALL_PLAIN);
lang_text_draw(57, 6, 475, 86, FONT_SMALL_PLAIN);

inner_panel_draw(32, 100, 36, 5);

// schools
lang_text_draw_amount(8, 18, building_count_total(BUILDING_SCHOOL), 40, 105, FONT_NORMAL_WHITE);
text_draw_number_centered(building_count_active(BUILDING_SCHOOL), 150, 105, 100, FONT_NORMAL_WHITE);
text_draw_number_centered(building_count_active(BUILDING_SCHOOL), 155, 105, 100, FONT_NORMAL_WHITE);

width = text_draw_number(city_culture_get_school_person_coverage(), '@', " ", 280, 105, FONT_NORMAL_WHITE, 0);
lang_text_draw(57, 7, 280 + width, 105, FONT_NORMAL_WHITE);
Expand All @@ -92,7 +92,7 @@ static int draw_background(void)

// academies
lang_text_draw_amount(8, 20, building_count_total(BUILDING_ACADEMY), 40, 125, FONT_NORMAL_WHITE);
text_draw_number_centered(building_count_active(BUILDING_ACADEMY), 150, 125, 100, FONT_NORMAL_WHITE);
text_draw_number_centered(building_count_active(BUILDING_ACADEMY), 155, 125, 100, FONT_NORMAL_WHITE);

width = text_draw_number(city_culture_get_academy_person_coverage(), '@', " ", 280, 125, FONT_NORMAL_WHITE, 0);
lang_text_draw(57, 8, 280 + width, 125, FONT_NORMAL_WHITE);
Expand All @@ -108,7 +108,7 @@ static int draw_background(void)

// libraries
lang_text_draw_amount(8, 22, building_count_total(BUILDING_LIBRARY), 40, 145, FONT_NORMAL_WHITE);
text_draw_number_centered(building_count_active(BUILDING_LIBRARY), 150, 145, 100, FONT_NORMAL_WHITE);
text_draw_number_centered(building_count_active(BUILDING_LIBRARY), 155, 145, 100, FONT_NORMAL_WHITE);

width = text_draw_number(city_culture_get_library_person_coverage(), '@', " ", 280, 145, FONT_NORMAL_WHITE, 0);
lang_text_draw(57, 9, 280 + width, 145, FONT_NORMAL_WHITE);
Expand All @@ -132,7 +132,7 @@ static int draw_background(void)
text_draw(translation_for(TR_WINDOW_ADVISOR_EDUCATION_MISSION_POSTS), 40 + width, 165, FONT_NORMAL_WHITE, 0);
}

text_draw_number_centered(building_count_active(BUILDING_MISSION_POST), 150, 165, 100, FONT_NORMAL_WHITE);
text_draw_number_centered(building_count_active(BUILDING_MISSION_POST), 155, 165, 100, FONT_NORMAL_WHITE);


lang_text_draw_multiline(57, 22 + get_education_advice(), 45, 195, 560, FONT_NORMAL_BLACK);
Expand Down
2 changes: 1 addition & 1 deletion src/window/advisor/entertainment.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static int draw_background(void)

lang_text_draw(58, 1, 173, 46, FONT_SMALL_PLAIN);
lang_text_draw(58, 2, 260, 46, FONT_SMALL_PLAIN);
lang_text_draw(58, 3, PEOPLE_OFFSET + 10, 46, FONT_SMALL_PLAIN);
lang_text_draw(58, 3, PEOPLE_OFFSET + 20, 46, FONT_SMALL_PLAIN); // can entertain
lang_text_draw_centered(58, 4, COVERAGE_OFFSET, 46, COVERAGE_WIDTH, FONT_SMALL_PLAIN);

inner_panel_draw(32, 60, 36, 8);
Expand Down
14 changes: 7 additions & 7 deletions src/window/advisor/health.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ static void print_health_building_info(int y_offset, building_type type, int pop

lang_text_draw_amount(8, BUILDING_ID_TO_STRING_ID[type - BUILDING_DOCTOR],
building_count_total(type), 40, y_offset, FONT_NORMAL_WHITE);
text_draw_number_centered(building_count_total(type), 150, y_offset, 100, FONT_NORMAL_WHITE);
text_draw_number_centered(building_count_total(type), 180, y_offset, 100, FONT_NORMAL_WHITE);

int width = text_draw_number(population_served, '@', " ", 280, y_offset, FONT_NORMAL_WHITE, 0);
int width = text_draw_number(population_served, '@', " ", 305, y_offset, FONT_NORMAL_WHITE, 0);

if (type == BUILDING_DOCTOR || type == BUILDING_HOSPITAL) {
lang_text_draw(56, 6, 280 + width, y_offset, FONT_NORMAL_WHITE);
lang_text_draw(56, 6, 305 + width, y_offset, FONT_NORMAL_WHITE);
} else {
lang_text_draw(58, 5, 280 + width, y_offset, FONT_NORMAL_WHITE);
lang_text_draw(58, 5, 305 + width, y_offset, FONT_NORMAL_WHITE);
}

if (coverage == 0) {
lang_text_draw_centered(57, 10, 440, y_offset, 160, FONT_NORMAL_WHITE);
} else if (coverage < 100) {
Expand All @@ -71,8 +71,8 @@ static int draw_background(void)
} else {
lang_text_draw_multiline(56, 15, 60, 65, 560, FONT_NORMAL_BLACK);
}
lang_text_draw(56, 3, 180, 110, FONT_SMALL_PLAIN);
lang_text_draw(56, 4, 290, 110, FONT_SMALL_PLAIN);
lang_text_draw(56, 3, 205, 110, FONT_SMALL_PLAIN);
lang_text_draw(56, 4, 330, 110, FONT_SMALL_PLAIN);
lang_text_draw_centered(56, 5, 440, 110, 160, FONT_SMALL_PLAIN);

inner_panel_draw(32, 124, 36, 5);
Expand Down
2 changes: 1 addition & 1 deletion src/window/advisor/housing.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void draw_housing_table(void)
COLOR_MASK_NONE, SCALE_NONE);
text_draw(translation_for(TR_ADVISOR_RESIDENCES_USING_POTTERY + i), 90, y_offset + 263 + (23 * i),
FONT_NORMAL_BLACK, 0);
text_draw_number(houses_using_goods[list.items[i]], '@', " ", 450, y_offset + 263 + (23 * i),
text_draw_number(houses_using_goods[list.items[i]], '@', " ", 313, y_offset + 263 + (23 * i),
FONT_NORMAL_BLACK, 0);
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/window/building/military.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ void window_building_draw_barracks(building_info_context *c)
}
if (city_data.mess_hall.food_stress_cumulative > 50) {
text_draw_multiline(translation_for(TR_BUILDING_BARRACKS_FOOD_WARNING_2),
c->x_offset + 32, c->y_offset + 106, 16 * c->width_blocks - 30, 0, FONT_NORMAL_BLACK, 0);
c->x_offset + 32, c->y_offset + 106, 16 * c->width_blocks - 50, 0, FONT_NORMAL_BLACK, 0);
} else if (city_data.mess_hall.food_stress_cumulative > 20) {
text_draw_multiline(translation_for(TR_BUILDING_BARRACKS_FOOD_WARNING),
c->x_offset + 32, c->y_offset + 106, 16 * c->width_blocks - 30, 0, FONT_NORMAL_BLACK, 0);
c->x_offset + 32, c->y_offset + 106, 16 * c->width_blocks - 50, 0, FONT_NORMAL_BLACK, 0);
} else if (c->worker_percentage >= 100) {
window_building_draw_description_at(c, 106, 136, 5 + offset);
} else if (c->worker_percentage >= 66) {
Expand Down Expand Up @@ -362,12 +362,12 @@ void window_building_draw_legion_info(building_info_context *c)

// number of soldiers
lang_text_draw(138, 23, c->x_offset + 100, c->y_offset + 60, FONT_NORMAL_BLACK);
text_draw_number(m->num_figures, '@', " ", c->x_offset + 294, c->y_offset + 60, FONT_NORMAL_BLACK, 0);
text_draw_number(m->num_figures, '@', " ", c->x_offset + 283, c->y_offset + 60, FONT_NORMAL_BLACK, 0);
// health
lang_text_draw(138, 24, c->x_offset + 100, c->y_offset + 80, FONT_NORMAL_BLACK);
if (m->mess_hall_max_morale_modifier < -20) {
text_draw(translation_for(TR_BUILDING_LEGION_STARVING),
c->x_offset + 300, c->y_offset + 80, FONT_NORMAL_PLAIN, COLOR_FONT_RED);
c->x_offset + 290, c->y_offset + 80, FONT_NORMAL_PLAIN, COLOR_FONT_RED);
} else {
int health = calc_percentage(m->total_damage, m->max_total_damage);
if (health <= 0) {
Expand All @@ -385,17 +385,17 @@ void window_building_draw_legion_info(building_info_context *c)
} else {
text_id = 32;
}
lang_text_draw(138, text_id, c->x_offset + 300, c->y_offset + 80, FONT_NORMAL_BLACK);
lang_text_draw(138, text_id, c->x_offset + 290, c->y_offset + 80, FONT_NORMAL_BLACK);
}
// military training
lang_text_draw(138, 25, c->x_offset + 100, c->y_offset + 100, FONT_NORMAL_BLACK);
lang_text_draw(18, m->has_military_training, c->x_offset + 300, c->y_offset + 100, FONT_NORMAL_BLACK);
lang_text_draw(18, m->has_military_training, c->x_offset + 290, c->y_offset + 100, FONT_NORMAL_BLACK);
// morale
if (m->cursed_by_mars) {
lang_text_draw(138, 59, c->x_offset + 100, c->y_offset + 120, FONT_NORMAL_BLACK);
} else {
lang_text_draw(138, 36, c->x_offset + 100, c->y_offset + 120, FONT_NORMAL_BLACK);
lang_text_draw(138, 37 + morale_offset, c->x_offset + 300, c->y_offset + 120, FONT_NORMAL_BLACK);
lang_text_draw(138, 37 + morale_offset, c->x_offset + 290, c->y_offset + 120, FONT_NORMAL_BLACK);
}
// food
text_draw(translation_for(TR_BUILDING_LEGION_FOOD_STATUS),
Expand All @@ -412,7 +412,7 @@ void window_building_draw_legion_info(building_info_context *c)
hunger_text = TR_BUILDING_MESS_HALL_TROOP_HUNGER_2;
}

text_draw(translation_for(hunger_text), c->x_offset + 300, c->y_offset + 140, FONT_NORMAL_BLACK, 0);
text_draw(translation_for(hunger_text), c->x_offset + 290, c->y_offset + 140, FONT_NORMAL_BLACK, 0);
// food warnings
if (m->mess_hall_max_morale_modifier < -20) {
text_draw_centered(translation_for(TR_BUILDING_LEGION_FOOD_WARNING_2),
Expand Down
4 changes: 2 additions & 2 deletions src/window/editor/edit_invasion.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ static void bound_invasion_values(void)
} else {
data.repeat_type = INVASION_REPEAT_TIMES;
}
if (data.invasion.repeat.interval.min < 3) {
data.invasion.repeat.interval.min = 3;
if (data.invasion.repeat.interval.min < 1) {
data.invasion.repeat.interval.min = 1;
}
if (data.invasion.repeat.interval.max > 50) {
data.invasion.repeat.interval.max = 50;
Expand Down
4 changes: 2 additions & 2 deletions src/window/editor/edit_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ static void bound_request_values(void)
} else {
data.repeat_type = REQUEST_REPEAT_TIMES;
}
if (data.request.repeat.interval.min < 3) {
data.request.repeat.interval.min = 3;
if (data.request.repeat.interval.min < 1) {
data.request.repeat.interval.min = 1;
}
if (data.request.repeat.interval.max > 50) {
data.request.repeat.interval.max = 50;
Expand Down
50 changes: 25 additions & 25 deletions src/window/editor/scenario_event_details.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ static struct {
} data;

static input_box event_name_input = {
112, 50, 32, 2, FONT_NORMAL_WHITE, 1, data.event_name, EVENT_NAME_LENGTH
100, 40, 32, 2, FONT_NORMAL_WHITE, 1, data.event_name, EVENT_NAME_LENGTH
};

static grid_box_type conditions_grid_box = {
.x = 16,
.y = 228,
.y = 188,
.width = 18 * BLOCK_SIZE,
.height = 10 * BLOCK_SIZE,
.height = 13 * BLOCK_SIZE + 2,
.num_columns = 1,
.item_height = 30,
.item_margin.horizontal = 10,
Expand All @@ -141,9 +141,9 @@ static grid_box_type conditions_grid_box = {

static grid_box_type actions_grid_box = {
.x = 320,
.y = 228,
.y = 188,
.width = 18 * BLOCK_SIZE,
.height = 10 * BLOCK_SIZE,
.height = 13 * BLOCK_SIZE + 2,
.num_columns = 1,
.item_height = 30,
.item_margin.horizontal = 10,
Expand All @@ -157,26 +157,26 @@ static grid_box_type actions_grid_box = {
#define NUM_TOP_BUTTONS (sizeof(top_buttons) / sizeof(generic_button))

static generic_button top_buttons[] = {
{192, 90, 220, 20, button_repeat_type, 0, EVENT_REPEAT_NEVER},
{192, 115, 220, 20, button_repeat_type, 0, EVENT_REPEAT_FOREVER},
{192, 140, 20, 20, button_repeat_type, 0, EVENT_REPEAT_TIMES},
{222, 138, 190, 25, button_repeat_times},
{272, 166, 50, 25, button_repeat_between, 0, REPEAT_MIN, DISABLE_ON_NO_REPEAT},
{362, 166, 50, 25, button_repeat_between, 0, REPEAT_MAX, DISABLE_ON_NO_REPEAT},
{150, 203, 150, 20, button_set_selected_to_group, 0, 0, DISABLE_ON_NO_SELECTION}
{100, 80, 220, 20, button_repeat_type, 0, EVENT_REPEAT_NEVER},
{100, 105, 220, 20, button_repeat_type, 0, EVENT_REPEAT_FOREVER},
{100, 130, 20, 20, button_repeat_type, 0, EVENT_REPEAT_TIMES},
{130, 128, 190, 25, button_repeat_times},
{410, 128, 50, 25, button_repeat_between, 0, REPEAT_MIN, DISABLE_ON_NO_REPEAT},
{500, 128, 50, 25, button_repeat_between, 0, REPEAT_MAX, DISABLE_ON_NO_REPEAT},
{144, 163, 155, 20, button_set_selected_to_group, 0, 0, DISABLE_ON_NO_SELECTION}
};

static generic_button select_all_none_buttons[] = {
{16, 203, 20, 20, button_select_all_none, 0, SELECT_CONDITIONS},
{320, 203, 20, 20, button_select_all_none, 0, SELECT_ACTIONS}
{16, 163, 20, 20, button_select_all_none, 0, SELECT_CONDITIONS},
{320, 163, 20, 20, button_select_all_none, 0, SELECT_ACTIONS}
};

#define NUM_BOTTOM_BUTTONS (sizeof(bottom_buttons) / sizeof(generic_button))

static generic_button bottom_buttons[] = {
{16, 404, 192, 25, button_add_new_condition},
{224, 404, 192, 25, button_delete_selected, 0, 0, DISABLE_ON_NO_SELECTION},
{432, 404, 192, 25, button_add_new_action},
{16, 409, 192, 25, button_add_new_condition},
{224, 409, 192, 25, button_delete_selected, 0, 0, DISABLE_ON_NO_SELECTION},
{432, 409, 192, 25, button_add_new_action},
{16, 439, 200, 25, button_delete_event},
{524, 439, 100, 25, button_ok},
};
Expand Down Expand Up @@ -401,13 +401,13 @@ static void draw_background(void)
outer_panel_draw(0, 0, 40, 30);

// Title and ID
text_draw_centered(translation_for(TR_EDITOR_SCENARIO_EVENTS_TITLE), 0, 16, 640, FONT_LARGE_BLACK, 0);
text_draw_centered(translation_for(TR_EDITOR_SCENARIO_EVENTS_TITLE), 0, 13, 640, FONT_LARGE_BLACK, 0);
text_draw_label_and_number(translation_for(TR_EDITOR_ID),
data.event->id, "", 16, 24, FONT_NORMAL_PLAIN, COLOR_BLACK);
data.event->id, "", 16, 13, FONT_NORMAL_PLAIN, COLOR_BLACK);

// "Name" string
lang_text_draw_right_aligned(CUSTOM_TRANSLATION, TR_EDITOR_SCENARIO_EVENT_NAME, 0, event_name_input.y + 10,
event_name_input.x - 8, FONT_NORMAL_BLACK);
lang_text_draw_right_aligned(CUSTOM_TRANSLATION, TR_EDITOR_SCENARIO_EVENT_NAME, 0, event_name_input.y + 8,
event_name_input.x - 10, FONT_NORMAL_BLACK);

// Top buttons
// Repeat type selected checkbox
Expand All @@ -431,7 +431,7 @@ static void draw_background(void)
}
if (repeat_times > 2) {
text_draw_label_and_number_centered(lang_get_string(CUSTOM_TRANSLATION, TR_EDITOR_REPEAT_TEXT), repeat_times,
(const char *)lang_get_string(CUSTOM_TRANSLATION, TR_EDITOR_REPEAT_TIMES),
(const char *) lang_get_string(CUSTOM_TRANSLATION, TR_EDITOR_REPEAT_TIMES),
btn->x, btn->y + 6, btn->width, FONT_NORMAL_BLACK, 0);
} else {
lang_text_draw_centered(CUSTOM_TRANSLATION, TR_EDITOR_REPEAT_ONCE + repeat_times - 1, btn->x, btn->y + 6,
Expand All @@ -443,9 +443,9 @@ static void draw_background(void)
color_t enabled_color = data.repeat_type == EVENT_REPEAT_NEVER ? COLOR_FONT_LIGHT_GRAY : COLOR_MASK_NONE;

btn = &top_buttons[4];
lang_text_draw_right_aligned(CUSTOM_TRANSLATION, TR_EDITOR_REPEAT_FREQUENCY, 0, btn->y + 6, top_buttons[0].x - 16,
lang_text_draw_right_aligned(CUSTOM_TRANSLATION, TR_EDITOR_REPEAT_FREQUENCY, 0, btn->y - 20, top_buttons[0].x + 450,
FONT_NORMAL_BLACK);
lang_text_draw_colored(CUSTOM_TRANSLATION, TR_EDITOR_BETWEEN, top_buttons[0].x, btn->y + 6,
lang_text_draw_colored(CUSTOM_TRANSLATION, TR_EDITOR_BETWEEN, top_buttons[0].x + 240, btn->y + 6,
enabled_font, enabled_color);
text_draw_number_centered_colored(data.event->repeat_months_min, btn->x, btn->y + 6,
btn->width, enabled_font, enabled_color);
Expand Down Expand Up @@ -518,7 +518,7 @@ static void draw_background(void)
// Add action button label
lang_text_draw_centered(CUSTOM_TRANSLATION, TR_EDITOR_SCENARIO_ACTION_ADD,
bottom_buttons[2].x, bottom_buttons[2].y + 6, bottom_buttons[2].width, FONT_NORMAL_BLACK);

// Bottom buttons
lang_text_draw_centered_colored(CUSTOM_TRANSLATION, TR_EDITOR_DELETE, bottom_buttons[3].x, bottom_buttons[3].y + 6,
bottom_buttons[3].width, FONT_NORMAL_PLAIN, COLOR_RED);
Expand Down
2 changes: 1 addition & 1 deletion src/window/message_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static generic_button generic_buttons_messages[] = {
};

static generic_button generic_button_messages_type[] = {
{ 20, 77, 372, 20, button_cycle_message_type, button_cycle_message_type }
{ 75, 77, 300, 20, button_cycle_message_type, button_cycle_message_type }
};

static generic_button generic_button_delete_read[] = {
Expand Down
22 changes: 11 additions & 11 deletions src/window/numeric_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ static generic_button buttons[] = {
{81, 111, 25, 25, button_number, 0, 9},
{21, 141, 25, 25, button_number, 0, 0},
{51, 141, 25, 25, button_negative},
{51, 171, 55, 25, button_accept},
{51, 171, 56, 25, button_accept},
{21, 201, 25, 25, button_delete},
{51, 201, 55, 25, button_cancel}
{51, 201, 56, 25, button_cancel}
};

static struct {
Expand Down Expand Up @@ -90,7 +90,7 @@ static void init(int x, int y, const generic_button *button, int max_digits,
data.is_negative_value = 0;

determine_offsets(x, y, button);

data.max_digits = max_digits;
if (!min_value && !max_value) {
data.min_value = INT_MIN;
Expand All @@ -117,11 +117,11 @@ static void close(void)
static void draw_number_button(int x, int y, int number, int is_selected)
{
color_t color = is_selected ? COLOR_FONT_BLUE : COLOR_BLACK;
graphics_draw_rect(x, y, 25, 25, color);
graphics_draw_rect(x, y - 1, 26, 26, color);
uint8_t number_string[2];
number_string[0] = '0' + number;
number_string[1] = 0;
text_draw_centered(number_string, x, y, 25, FONT_LARGE_PLAIN, color);
text_draw_centered(number_string, x, y, 27, FONT_LARGE_PLAIN, color);
}

static void draw_foreground(void)
Expand All @@ -130,7 +130,7 @@ static void draw_foreground(void)

graphics_fill_rect(data.x + 16, data.y + 16, 96, 30, COLOR_BLACK);
if (data.num_digits > 0) {
text_draw_number_centered_colored(data.value, data.x + 16, data.y + 19, 92, FONT_LARGE_PLAIN, COLOR_FONT_RED);
text_draw_number_centered_colored(data.value, data.x + 19, data.y + 19, 92, FONT_LARGE_PLAIN, COLOR_FONT_RED);
}

draw_number_button(data.x + 21, data.y + 51, 1, data.focus_button_id == 1);
Expand All @@ -150,9 +150,9 @@ static void draw_foreground(void)
text_draw_centered(string_from_ascii("-"), data.x + 51, data.y + 147, 25, FONT_NORMAL_PLAIN,
data.focus_button_id == 11 ? COLOR_FONT_BLUE : COLOR_BLACK);
}
graphics_draw_rect(data.x + 51, data.y + 171, 55, 25, data.focus_button_id == 12 ? COLOR_FONT_BLUE : COLOR_BLACK);
lang_text_draw_centered_colored(44, 16, data.x + 51, data.y + 177, 55, FONT_NORMAL_PLAIN,

graphics_draw_rect(data.x + 51, data.y + 171, 56, 25, data.focus_button_id == 12 ? COLOR_FONT_BLUE : COLOR_BLACK);
lang_text_draw_centered_colored(44, 16, data.x + 52, data.y + 177, 55, FONT_NORMAL_PLAIN,
data.focus_button_id == 12 ? COLOR_FONT_BLUE : COLOR_BLACK);

if (data.focus_button_id == 13) {
Expand All @@ -163,8 +163,8 @@ static void draw_foreground(void)

text_draw_centered(string_from_ascii("X"), data.x + 22, data.y + 207, 25, FONT_NORMAL_PLAIN,
data.focus_button_id == 13 ? COLOR_WHITE : COLOR_RED);
graphics_draw_rect(data.x + 51, data.y + 201, 55, 25, data.focus_button_id == 14 ? COLOR_FONT_BLUE : COLOR_BLACK);
lang_text_draw_centered_colored(44, 17, data.x + 51, data.y + 207, 55, FONT_NORMAL_PLAIN,
graphics_draw_rect(data.x + 51, data.y + 201, 56, 25, data.focus_button_id == 14 ? COLOR_FONT_BLUE : COLOR_BLACK);
lang_text_draw_centered_colored(44, 17, data.x + 52, data.y + 207, 55, FONT_NORMAL_PLAIN,
data.focus_button_id == 14 ? COLOR_FONT_BLUE : COLOR_BLACK);
}

Expand Down

0 comments on commit 8e8588d

Please sign in to comment.