Interface Reordering OXP
Moderators: winston, another_commander
Interface Reordering OXP
This OXP allows change the order of interfaces on F4 screen via "Reorder Interfaces" on the same screen.
Reordering can be set for individual interfaces and entire categories. Only categories and interfaces that are currently available can be added to the ordering list. The position of the other interfaces is given by the position of the "<Other interfaces>" element in that list. Within this group and categories, interfaces are ordered as usual.
Download link: https://www.dropbox.com/s/82fu7zl2vbwea ... 1.oxz?dl=1
And the question in the end: Would it be interesting to add hiding or grouping interfaces here?
Reordering can be set for individual interfaces and entire categories. Only categories and interfaces that are currently available can be added to the ordering list. The position of the other interfaces is given by the position of the "<Other interfaces>" element in that list. Within this group and categories, interfaces are ordered as usual.
Download link: https://www.dropbox.com/s/82fu7zl2vbwea ... 1.oxz?dl=1
And the question in the end: Would it be interesting to add hiding or grouping interfaces here?
- Slartibartfast
- Deadly
- Posts: 175
- Joined: Mon Jan 21, 2008 3:54 pm
Re: Interface Reordering OXP
Hello
just downloaded and tested
... cool!!
but it conflicts with Galactic Almanac && Communication log
if you chose a menu-entry below these - it jumps back to F4 screen.
matthias
btw. grouping would be fine / hiding ...no ... put in a "hide"-group and move to the end
just downloaded and tested
... cool!!
but it conflicts with Galactic Almanac && Communication log
if you chose a menu-entry below these - it jumps back to F4 screen.
matthias
btw. grouping would be fine / hiding ...no ... put in a "hide"-group and move to the end
Oolite 1.91 / Imp. Trader ( slighly modified ) on Lubuntu 22.04 LTS on AMD64 2x 3800+ ,
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
Re: Interface Reordering OXP
Sorry, but I can't reproduce it. I do not see any places where there could be a conflict, rather it is just one of my bugs. Could you please share your logs? Also I would like to clarify: in which menu exactly does this happen?Slartibartfast wrote: ↑Thu Jun 23, 2022 5:58 pmbut it conflicts with Galactic Almanac && Communication log
if you chose a menu-entry below these - it jumps back to F4 screen.
- Slartibartfast
- Deadly
- Posts: 175
- Joined: Mon Jan 21, 2008 3:54 pm
Re: Interface Reordering OXP
hi
=> Galactic almanac
====>> "Toggle the display ..." ( first entry)
=> Communicstions log
=====> "Next page"
logs -- maybe later
=> Galactic almanac
====>> "Toggle the display ..." ( first entry)
=> Communicstions log
=====> "Next page"
logs -- maybe later
Oolite 1.91 / Imp. Trader ( slighly modified ) on Lubuntu 22.04 LTS on AMD64 2x 3800+ ,
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
- Slartibartfast
- Deadly
- Posts: 175
- Joined: Mon Jan 21, 2008 3:54 pm
Re: Interface Reordering OXP
After saving / reloading
the problem was gone
!!! i made a "confirmation" with an old saved game ==> the problem appears again
from the log
the problem was gone
!!! i made a "confirmation" with an old saved game ==> the problem appears again
from the log
Code: Select all
21:45:49.077 [Alnivel_InterfaceLib_Message]: Remain lines after content 2 from 15
21:45:50.899 [InterfaceReordering_Message]: New prefixes set: {"Exhibitions":" ","oolite-contracts-parcels":" ","Gallery":" ","GalleryAll":" ","FuelTweaks_Quirium":" ","oolite-contracts-passengers":" ","oolite-registership":" ","Lib_Config":" ","HomeSystem":" ","oolite-primable-equipment-manager":" ","DamageReportMFD":" ","GalCopBB_Reputation":" ","EmailSystem":" ","FlightLog":" ","GalacticRegistry":" ","EquipmentStorage":" ","RoutePlanner_Interface":" ","oolite-ship-library":" ","Ships Library":" ","inamed_stations_distances":" ","CommsLogMFD":" ","bar_chatter":" ","BulletinBoardSystem":" ","InterfaceReordering_ManageOrder":" ","Lib_PAD":" ","inquirer_market":" ","inquirer_distances":" "}
21:46:09.481 [script.javaScript.exception.notFunction]: ***** JavaScript exception (InterfaceReordering 0.1): TypeError: this.showAlmanac2 is not a function
21:46:37.045 [script.javaScript.exception.notFunction]: ***** JavaScript exception (InterfaceReordering 0.1): TypeError: this.$showPage is not a function
21:46:37.282 [NPC_Equipment_Damage]: damaging EQ_SHIELD_ENHANCER on Krait
21:46:49.942 [script.javaScript.exception.notFunction]: ***** JavaScript exception (InterfaceReordering 0.1): TypeError: this.showAlmanac2 is not a function
Oolite 1.91 / Imp. Trader ( slighly modified ) on Lubuntu 22.04 LTS on AMD64 2x 3800+ ,
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Interface Reordering OXP
Alnivel - thank you for this one!
I've been grumbling about this for yonks, and you have actually come up with a solution for it!
What do you want to do about the wiki page? Would you like me to put something together for you to marmalise, or would you rather do it all on your tod?
I've been grumbling about this for yonks, and you have actually come up with a solution for it!
What do you want to do about the wiki page? Would you like me to put something together for you to marmalise, or would you rather do it all on your tod?
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Re: Interface Reordering OXP
Thank you for the report and logs, they were very helpful.Slartibartfast wrote: ↑Thu Jun 23, 2022 7:55 pmAfter saving / reloading
the problem was gone
!!! i made a "confirmation" with an old saved game ==> the problem appears again
I found out why this is happening, but, unfortunately, I don't see a way to fix this yet. The bug can affect not only those two cases, but many others and will be repeated after each reordering and is fixed only by saving and loading.
I was going to make it but put it off due to fix attempts. I would really appreciate your help with page!Cholmondely wrote: ↑Fri Jun 24, 2022 10:03 amWhat do you want to do about the wiki page? Would you like me to put something together for you to marmalise, or would you rather do it all on your tod?
- Slartibartfast
- Deadly
- Posts: 175
- Joined: Mon Jan 21, 2008 3:54 pm
Re: Interface Reordering OXP
Hello Alnivel
I don't think, that i will reorder very often.
cheers
for me -- that's no show-stopperwill be repeated after each reordering and is fixed only by saving and loading.
I don't think, that i will reorder very often.
cheers
Oolite 1.91 / Imp. Trader ( slighly modified ) on Lubuntu 22.04 LTS on AMD64 2x 3800+ ,
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
ATI Radeon R7240 XFS / Samsung TV 40" 1080p
C-Media CMI8738 / Yamaha RX-V575 / DIY-Speaker
Logitech Attack3 & standard german keyboard
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Interface Reordering OXP
Started wiki page: Interface Reordering OXP
Tagged as a misc oxp (other options will be seen when you edit it).
I've not yet succeeded in using it so I can't fill in the instructions - but I've put in a couple of pointers for you!
(I'll delete all this detail when you take over the page, just leaving the pointer to the wiki page)
Tagged as a misc oxp (other options will be seen when you edit it).
I've not yet succeeded in using it so I can't fill in the instructions - but I've put in a couple of pointers for you!
(I'll delete all this detail when you take over the page, just leaving the pointer to the wiki page)
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Interface Reordering OXP
Just wondering if
1) a "select all" button would make sense
2) ditto for a "reset" button
1) a "select all" button would make sense
2) ditto for a "reset" button
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Re: Interface Reordering OXP
When creating OXP, I did not think that someone would totally reorder everything, but rather just add a couple of things to the beginning and hide things like configs to the end.Cholmondely wrote: ↑Fri Jun 24, 2022 7:23 pmJust wondering if
1) a "select all" button would make sense
2) ditto for a "reset" button
1) But for those who want to remake everything for themselves, of course, why not. I'll add it in the next version.
2) What exactly do you mean by "reset"? Reset to no reordering, essentially clear the ordering list, or reset the changes to the state before opening the edit screen?
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Interface Reordering OXP
<nods>
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Interface Reordering OXP
Reset to no reordering.Alnivel wrote: ↑Fri Jun 24, 2022 8:00 pmWhen creating OXP, I did not think that someone would totally reorder everything, but rather just add a couple of things to the beginning and hide things like configs to the end.Cholmondely wrote: ↑Fri Jun 24, 2022 7:23 pmJust wondering if
1) a "select all" button would make sense
2) ditto for a "reset" button
1) But for those who want to remake everything for themselves, of course, why not. I'll add it in the next version.
2) What exactly do you mean by "reset"? Reset to no reordering, essentially clear the ordering list, or reset the changes to the state before opening the edit screen?
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Interface Reordering OXP
A suggestion: In "interface-reordering-main.js", lines 500-504, try the following instead of the "\u2xxx" nomenclature:
And at line 63, try this:
That should remove all the question marks popping up everywhere.
Code: Select all
const markerBeforeOthers = String.fromCharCode(31) + String.fromCharCode(160) + String.fromCharCode(160); // abb
const markerOthers = String.fromCharCode(160) + String.fromCharCode(31) + String.fromCharCode(160); // bab
const markerAfterOthers = String.fromCharCode(160) + String.fromCharCode(160) + String.fromCharCode(31); // bba
const markerDepth = String.fromCharCode(160);
Code: Select all
let prefix = script.$interfacePrefixes[key] || script.$interfacePrefixes[interfaceDefinition.category] || String.fromCharCode(160) + String.fromCharCode(31) + String.fromCharCode(160); // see "markerOther" in $makeInterfacePrefixes
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Interface Reordering OXP
Concerning these F4 pages that are causing errors, the issue, I think, is in how theSlartibartfast wrote: ↑Thu Jun 23, 2022 7:07 pm=> Galactic almanac
====>> "Toggle the display ..." ( first entry)
=> Communicstions log
=====> "Next page"
runScreen
function is being called. Basically, the third parameter of the function call is missing in both these OXPs, and whatever default the core code is applying is not the same as specifying "this". So, to fix the Comms Log issue, the code would need to change from this:
Code: Select all
mission.runScreen(opts,this.$logHandler);
Code: Select all
mission.runScreen(opts,this.$logHandler, this);
Code: Select all
mission.runScreen(opts,this.$logHandler.bind(this));
For the Galactic Almanac (v0.7) it's a bit more involved, as there are 33 different calls to "runScreen", and 32 of them need a change. But the fix would be at lines 4655, 4684, 4713, 4740, 4778, 4833, 4886, 4917, 4960, 4991, 5023, 5066, 5098, 5120, 5205, 5283, 8764, 8787, 8814, 8841, 8868, 9215, 9238, 9348, 9381, 9653, 9677, 9791, 9832, 9885, 10050, and 10107.
In each of those instances, between the final "}" and ")" symbols "
, this
" needs to be inserted, so it looks like this:
Code: Select all
}, this);