You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Merge pull request #111700 from YeldhamDev/ignore_scale_remote_debug
Make remote debug elements ignore the canvas scaling
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include "scene_debugger.h"
|
#include "scene_debugger.h"
|
||||||
|
|
||||||
|
#include "core/config/project_settings.h"
|
||||||
#include "core/debugger/debugger_marshalls.h"
|
#include "core/debugger/debugger_marshalls.h"
|
||||||
#include "core/debugger/engine_debugger.h"
|
#include "core/debugger/engine_debugger.h"
|
||||||
#include "core/io/dir_access.h"
|
#include "core/io/dir_access.h"
|
||||||
@@ -1580,6 +1581,7 @@ void RuntimeNodeSelect::_setup(const Dictionary &p_settings) {
|
|||||||
panner->set_scroll_speed(pan_speed);
|
panner->set_scroll_speed(pan_speed);
|
||||||
|
|
||||||
sel_2d_grab_dist = p_settings.get("editors/polygon_editor/point_grab_radius", 0);
|
sel_2d_grab_dist = p_settings.get("editors/polygon_editor/point_grab_radius", 0);
|
||||||
|
sel_2d_scale = MAX(1, Math::ceil(2.0 / (float)GLOBAL_GET("display/window/stretch/scale")));
|
||||||
|
|
||||||
selection_area_fill = p_settings.get("box_selection_fill_color", Color());
|
selection_area_fill = p_settings.get("box_selection_fill_color", Color());
|
||||||
selection_area_outline = p_settings.get("box_selection_stroke_color", Color());
|
selection_area_outline = p_settings.get("box_selection_stroke_color", Color());
|
||||||
@@ -2256,7 +2258,7 @@ void RuntimeNodeSelect::_update_selection() {
|
|||||||
|
|
||||||
const Color selection_color_2d = Color(1, 0.6, 0.4, 0.7);
|
const Color selection_color_2d = Color(1, 0.6, 0.4, 0.7);
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
RS::get_singleton()->canvas_item_add_line(sbox_2d_ci, endpoints[i], endpoints[(i + 1) % 4], selection_color_2d, 2);
|
RS::get_singleton()->canvas_item_add_line(sbox_2d_ci, endpoints[i], endpoints[(i + 1) % 4], selection_color_2d, sel_2d_scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2420,6 +2422,11 @@ void RuntimeNodeSelect::_open_selection_list(const Vector<SelectResult> &p_items
|
|||||||
selection_list->set_position(selection_list->is_embedded() ? p_pos : (Input::get_singleton()->get_mouse_position() + root->get_position()));
|
selection_list->set_position(selection_list->is_embedded() ? p_pos : (Input::get_singleton()->get_mouse_position() + root->get_position()));
|
||||||
selection_list->reset_size();
|
selection_list->reset_size();
|
||||||
selection_list->popup();
|
selection_list->popup();
|
||||||
|
|
||||||
|
selection_list->set_content_scale_factor(1);
|
||||||
|
selection_list->set_min_size(selection_list->get_contents_minimum_size());
|
||||||
|
selection_list->reset_size();
|
||||||
|
|
||||||
// FIXME: Ugly hack that stops the popup from hiding when the button is released.
|
// FIXME: Ugly hack that stops the popup from hiding when the button is released.
|
||||||
selection_list->call_deferred(SNAME("set_position"), selection_list->get_position() + Point2(1, 0));
|
selection_list->call_deferred(SNAME("set_position"), selection_list->get_position() + Point2(1, 0));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -304,6 +304,7 @@ private:
|
|||||||
|
|
||||||
LocalVector<ObjectID> selected_ci_nodes;
|
LocalVector<ObjectID> selected_ci_nodes;
|
||||||
real_t sel_2d_grab_dist = 0;
|
real_t sel_2d_grab_dist = 0;
|
||||||
|
int sel_2d_scale = 1;
|
||||||
|
|
||||||
RID sbox_2d_ci;
|
RID sbox_2d_ci;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user