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
|
|
@ -659,13 +659,13 @@ bool EditorAutoloadSettings::can_drop_data_fw(const Point2 &p_point, const Varia
|
|||
}
|
||||
|
||||
if (drop_data.has("type")) {
|
||||
TreeItem *ti = (p_point == Vector2(INFINITY, INFINITY)) ? tree->get_selected() : tree->get_item_at_position(p_point);
|
||||
TreeItem *ti = (p_point == Vector2(Math::INF, Math::INF)) ? tree->get_selected() : tree->get_item_at_position(p_point);
|
||||
|
||||
if (!ti) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int section = (p_point == Vector2(INFINITY, INFINITY)) ? tree->get_drop_section_at_position(tree->get_item_rect(ti).position) : tree->get_drop_section_at_position(p_point);
|
||||
int section = (p_point == Vector2(Math::INF, Math::INF)) ? tree->get_drop_section_at_position(tree->get_item_rect(ti).position) : tree->get_drop_section_at_position(p_point);
|
||||
|
||||
return section >= -1;
|
||||
}
|
||||
|
|
@ -674,13 +674,13 @@ bool EditorAutoloadSettings::can_drop_data_fw(const Point2 &p_point, const Varia
|
|||
}
|
||||
|
||||
void EditorAutoloadSettings::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_control) {
|
||||
TreeItem *ti = (p_point == Vector2(INFINITY, INFINITY)) ? tree->get_selected() : tree->get_item_at_position(p_point);
|
||||
TreeItem *ti = (p_point == Vector2(Math::INF, Math::INF)) ? tree->get_selected() : tree->get_item_at_position(p_point);
|
||||
|
||||
if (!ti) {
|
||||
return;
|
||||
}
|
||||
|
||||
int section = (p_point == Vector2(INFINITY, INFINITY)) ? tree->get_drop_section_at_position(tree->get_item_rect(ti).position) : tree->get_drop_section_at_position(p_point);
|
||||
int section = (p_point == Vector2(Math::INF, Math::INF)) ? tree->get_drop_section_at_position(tree->get_item_rect(ti).position) : tree->get_drop_section_at_position(p_point);
|
||||
|
||||
if (section < -1) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue