1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Use functions defined in the their classes.

This commit is contained in:
Anilforextra
2021-09-29 09:36:34 +05:45
parent 5aa099aaed
commit fc9767abb1
16 changed files with 41 additions and 58 deletions

View File

@@ -126,8 +126,8 @@ void ThemeEditorPreview::_draw_picker_overlay() {
highlight_label_rect.size.x += margin_left + margin_right;
highlight_label_rect.size.y += margin_top + margin_bottom;
highlight_label_rect.position.x = CLAMP(highlight_label_rect.position.x, 0.0, picker_overlay->get_size().width);
highlight_label_rect.position.y = CLAMP(highlight_label_rect.position.y, 0.0, picker_overlay->get_size().height);
highlight_label_rect.position = highlight_label_rect.position.clamp(Vector2(), picker_overlay->get_size());
picker_overlay->draw_style_box(theme_cache.preview_picker_label, highlight_label_rect);
Point2 label_pos = highlight_label_rect.position;