diff --git a/_ark/dx/ui/dx_funcs.dta b/_ark/dx/ui/dx_funcs.dta index f6b25322..98aba712 100644 --- a/_ark/dx/ui/dx_funcs.dta +++ b/_ark/dx/ui/dx_funcs.dta @@ -46,53 +46,4 @@ {ui pop_screen} ) } -} - -; rewritten compare function for sorting by source -{func dx_icon_already_compared ($lhs $rhs $icon $icon_compared) - {cond - ({&& {== {$lhs get_icon} $icon} {! {== {$rhs get_icon} $icon}}} - {if_else {== {$rhs get_icon} $icon_compared} - 1 - -1 ; bring what we already sorted to the top (left side) - } - ) - ({&& {! {== {$lhs get_icon} $icon}} {== {$rhs get_icon} $icon}} - {if_else {== {$lhs get_icon} $icon_compared} - -1 - 1 ; bring what we already sorted to the top (right side) - } - ) - } -} - - -{func dx_icon_compare ($lhs $rhs $icon $already_compared) - {foreach $icon_compared $already_compared - {dx_icon_already_compared $lhs $rhs $icon $icon_compared} ;ordering fix - } - {cond - ({&& {! {== {$lhs get_icon} $icon}} {! {== {$rhs get_icon} $icon}}} ; ignore - ; {$this - ; cmp - ; $lhs - ; $rhs - ; (kSTName) - ; } - ) - ({&& {== {$lhs get_icon} $icon} {! {== {$rhs get_icon} $icon}}} - -1 ; bring what we want to sort to the top (left side) - ) - ({&& {! {== {$lhs get_icon} $icon}} {== {$rhs get_icon} $icon}} - 1 ; bring what we want to sort to the top (right side) - ) - ({&& {== {$lhs get_icon} $icon} {== {$rhs get_icon} $icon}} ; sort matches by song game - {$this - cmp - $lhs - $rhs - (kSTName) - } - ) - } } \ No newline at end of file