mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-04-09 05:21:49 +02:00
Fix sorting GradientCursors.
This commit is contained in:
parent
1ec5e8a756
commit
6e09878f54
@ -201,6 +201,10 @@ void MMGradientEditor::select_color(GradientCursor *cursor, const Vector2 &posit
|
|||||||
|
|
||||||
// Calculating a color from the gradient and generating the shader;
|
// Calculating a color from the gradient and generating the shader;
|
||||||
|
|
||||||
|
struct GradientCursorCustomSorter {
|
||||||
|
_FORCE_INLINE_ bool operator()(const GradientCursor *a, const GradientCursor *b) const { return a->operator<(*b); }
|
||||||
|
};
|
||||||
|
|
||||||
Vector<GradientCursor *> MMGradientEditor::get_sorted_cursors() {
|
Vector<GradientCursor *> MMGradientEditor::get_sorted_cursors() {
|
||||||
Vector<GradientCursor *> array;
|
Vector<GradientCursor *> array;
|
||||||
|
|
||||||
@ -212,7 +216,7 @@ Vector<GradientCursor *> MMGradientEditor::get_sorted_cursors() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
array.sort();
|
array.sort_custom<GradientCursorCustomSorter>();
|
||||||
|
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user