mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Core: Use Math namespace for constants
This commit is contained in:
parent
06c71fbf40
commit
94282d88f9
181 changed files with 812 additions and 818 deletions
|
|
@ -759,7 +759,7 @@ Variant EditorSettingsDialog::get_drag_data_fw(const Point2 &p_point, Control *p
|
|||
|
||||
bool EditorSettingsDialog::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
|
||||
TreeItem *selected = shortcuts->get_selected();
|
||||
TreeItem *item = (p_point == Vector2(INFINITY, INFINITY)) ? shortcuts->get_selected() : shortcuts->get_item_at_position(p_point);
|
||||
TreeItem *item = (p_point == Vector2(Math::INF, Math::INF)) ? shortcuts->get_selected() : shortcuts->get_item_at_position(p_point);
|
||||
if (!selected || !item || item == selected || (String)item->get_meta("type", "") != "event") {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -778,7 +778,7 @@ void EditorSettingsDialog::drop_data_fw(const Point2 &p_point, const Variant &p_
|
|||
}
|
||||
|
||||
TreeItem *selected = shortcuts->get_selected();
|
||||
TreeItem *target = (p_point == Vector2(INFINITY, INFINITY)) ? shortcuts->get_selected() : shortcuts->get_item_at_position(p_point);
|
||||
TreeItem *target = (p_point == Vector2(Math::INF, Math::INF)) ? shortcuts->get_selected() : shortcuts->get_item_at_position(p_point);
|
||||
|
||||
if (!target) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue