You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Core: Use Math namespace for constants
This commit is contained in:
@@ -635,7 +635,7 @@ void CreateDialog::_favorite_activated() {
|
||||
}
|
||||
|
||||
Variant CreateDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
|
||||
TreeItem *ti = (p_point == Vector2(INFINITY, INFINITY)) ? favorites->get_selected() : favorites->get_item_at_position(p_point);
|
||||
TreeItem *ti = (p_point == Vector2(Math::INF, Math::INF)) ? favorites->get_selected() : favorites->get_item_at_position(p_point);
|
||||
if (ti) {
|
||||
Dictionary d;
|
||||
d["type"] = "create_favorite_drag";
|
||||
@@ -667,13 +667,13 @@ bool CreateDialog::can_drop_data_fw(const Point2 &p_point, const Variant &p_data
|
||||
void CreateDialog::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
|
||||
Dictionary d = p_data;
|
||||
|
||||
TreeItem *ti = (p_point == Vector2(INFINITY, INFINITY)) ? favorites->get_selected() : favorites->get_item_at_position(p_point);
|
||||
TreeItem *ti = (p_point == Vector2(Math::INF, Math::INF)) ? favorites->get_selected() : favorites->get_item_at_position(p_point);
|
||||
if (!ti) {
|
||||
return;
|
||||
}
|
||||
|
||||
String drop_at = ti->get_text(0);
|
||||
int ds = (p_point == Vector2(INFINITY, INFINITY)) ? favorites->get_drop_section_at_position(favorites->get_item_rect(ti).position) : favorites->get_drop_section_at_position(p_point);
|
||||
int ds = (p_point == Vector2(Math::INF, Math::INF)) ? favorites->get_drop_section_at_position(favorites->get_item_rect(ti).position) : favorites->get_drop_section_at_position(p_point);
|
||||
|
||||
int drop_idx = favorite_list.find(drop_at);
|
||||
if (drop_idx < 0) {
|
||||
|
||||
Reference in New Issue
Block a user