|
@@ -831,16 +831,16 @@ void SpineSprite::draw() {
|
|
auto global_scale = get_global_scale();
|
|
auto global_scale = get_global_scale();
|
|
draw_set_transform(mouse_position + Vector2(20, 0), -get_global_rotation(), Vector2(inverse_zoom * (1 / global_scale.x), inverse_zoom * (1 / global_scale.y)));
|
|
draw_set_transform(mouse_position + Vector2(20, 0), -get_global_rotation(), Vector2(inverse_zoom * (1 / global_scale.x), inverse_zoom * (1 / global_scale.y)));
|
|
|
|
|
|
- float line_height = default_font->get_height() + default_font->get_descent();
|
|
|
|
|
|
+ float line_height = default_font->get_height(Font::DEFAULT_FONT_SIZE) + default_font->get_descent(Font::DEFAULT_FONT_SIZE);
|
|
float rect_width = 0;
|
|
float rect_width = 0;
|
|
for (int i = 0; i < hover_text_lines.size(); i++) {
|
|
for (int i = 0; i < hover_text_lines.size(); i++) {
|
|
rect_width = MAX(rect_width, default_font->get_string_size(hover_text_lines[i]).x);
|
|
rect_width = MAX(rect_width, default_font->get_string_size(hover_text_lines[i]).x);
|
|
}
|
|
}
|
|
- Rect2 background_rect(0, -default_font->get_height() - 5, rect_width + 20, line_height * hover_text_lines.size() + 10);
|
|
|
|
|
|
+ Rect2 background_rect(0, -default_font->get_height(Font::DEFAULT_FONT_SIZE) - 5, rect_width + 20, line_height * hover_text_lines.size() + 10);
|
|
if (hover_text_lines.size() > 0) draw_rect(background_rect, Color(0, 0, 0, 0.8));
|
|
if (hover_text_lines.size() > 0) draw_rect(background_rect, Color(0, 0, 0, 0.8));
|
|
for (int i = 0; i < hover_text_lines.size(); i++) {
|
|
for (int i = 0; i < hover_text_lines.size(); i++) {
|
|
#if VERSION_MAJOR > 3
|
|
#if VERSION_MAJOR > 3
|
|
- draw_string(default_font, Vector2(10, 0 + i * default_font->get_height()), hover_text_lines[i], HORIZONTAL_ALIGNMENT_LEFT, -1, Font::DEFAULT_FONT_SIZE, Color(1, 1, 1, 1));
|
|
|
|
|
|
+ draw_string(default_font, Vector2(10, 0 + i * default_font->get_height(Font::DEFAULT_FONT_SIZE)), hover_text_lines[i], HORIZONTAL_ALIGNMENT_LEFT, -1, Font::DEFAULT_FONT_SIZE, Color(1, 1, 1, 1));
|
|
#else
|
|
#else
|
|
draw_string(default_font, Vector2(10, 0 + i * default_font->get_height()), hover_text_lines[i], Color(1, 1, 1, 1));
|
|
draw_string(default_font, Vector2(10, 0 + i * default_font->get_height()), hover_text_lines[i], Color(1, 1, 1, 1));
|
|
#endif
|
|
#endif
|