|
@@ -667,6 +667,9 @@ GUIUtils = function(){
|
|
if (a.id.includes("MainMenu")) {
|
|
if (a.id.includes("MainMenu")) {
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
+ if (b.id.includes("MainMenu")) {
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
|
|
//toolbars come first
|
|
//toolbars come first
|
|
if (a.id.includes("Toolbars") && !(b.id.includes("Toolbars"))) {
|
|
if (a.id.includes("Toolbars") && !(b.id.includes("Toolbars"))) {
|
|
@@ -677,6 +680,15 @@ GUIUtils = function(){
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //any other kind of buttons come next
|
|
|
|
+ if (a.id.includes(".buttons.model") && !(b.id.includes(".buttons.model"))) {
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (b.id.includes(".buttons.model") && !(a.id.includes(".buttons.model"))) {
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
//otherwise, sort by name
|
|
//otherwise, sort by name
|
|
return a.id == b.id ? 0 : (a.id > b.id ? 1 : -1);
|
|
return a.id == b.id ? 0 : (a.id > b.id ? 1 : -1);
|
|
});
|
|
});
|