Xenon UI OXP

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

Post Reply
NorthenderPNE
Deadly
Deadly
Posts: 132
Joined: Tue Jul 25, 2006 2:32 pm

Re: Xenon UI OXP

Post by NorthenderPNE »

phkb wrote:
@NorthenderPNE: Now, to override the background images in Escort Contracts, and keep the Xenon UI look and feel, edit the "xenonui.js" file and remove the comment marks from line 114. Let me know if it doesn't work!
Yepp it works! :wink: Hope you didn't read my previous, it didn't work post, i loaded up Oolite before i updated the oxz file. :roll:

Thanks for fixing it mate, i love you.......COUGH!!!!! :D

I had a few random UI switching issues when docked for example F6, F7 & F8. They would switch to the nohud.png instead of the standard.png so i copied 3 standard.png and renamed them to nohud.png from the relevant F6, F7 & F8 files to keep the UI from giving me the wrong size. Crude but it works! :wink:

Question:

What are the long nohud UI's for? Are they oxz specific or something. Or is it because some huds don't have the "allow_big_gui = yes/no;" that i think i read somewhere? Even though i've set mine to allow_big_gui = no; i still get the odd nohud.png's. Hope i'm making sense. :roll:

Until i applied the crude fix above that is. :wink:
Fritz
---- E L I T E ----
---- E L I T E ----
Posts: 591
Joined: Sun Jul 12, 2015 2:30 pm
Location: Bavaria, Germany
Contact:

Re: Xenon UI OXP

Post by Fritz »

It works with me too, thank you!

@NorthenderPNE: There are HUDs around (for example Xenon HUD) that are kind of disabled during docking, so they don't occupy space.
"You wouldn't kill me just for a few credits, would you?" – "No, I'll do it just for the fun!"
NorthenderPNE
Deadly
Deadly
Posts: 132
Joined: Tue Jul 25, 2006 2:32 pm

Re: Xenon UI OXP

Post by NorthenderPNE »

Fritz wrote:
@NorthenderPNE: There are HUDs around (for example Xenon HUD) that are kind of disabled during docking, so they don't occupy space.
Hi Fritz

The HUD i'm using is captain beatnik's coluber hud ch01 slightly modified. I also changed the setting from allow_big_gui = yes; to allow_big_gui = no; which sorted one problem but the wrong sized background images when switchingscreen i simply resolved with my crude fix. All in all it works. ;)

Oh and love the engine sounds oxz you put together Fritz. ;)
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Xenon UI OXP

Post by phkb »

I spend most of my time with a hud that enables the big gui setting so I might need to switch for a while and try another.

Although if you said you use a customised Coluber HUD where the allow_big_gui was set to true, then that will be the problem if you're using 1.82. The ability to check the current hud for that setting only comes in 1.83/4, so my routine checks an array of known huds that have it set to true. At the moment the only published hud that has it set is the Xenon HUD. If you want, you could add the name of your hud into that array and it should then work.

Xenon UI is dynamic, in that it tries to work out the best background image to use based on a number of factors - inflight or docked, red alert status, and also whether the allow big gui is set, or if the screen has had the hud turned off, which some mission screens do to maximise space.
NorthenderPNE
Deadly
Deadly
Posts: 132
Joined: Tue Jul 25, 2006 2:32 pm

Re: Xenon UI OXP

Post by NorthenderPNE »

phkb wrote:
Although if you said you use a customised Coluber HUD where the allow_big_gui was set to true, then that will be the problem if you're using 1.82. The ability to check the current hud for that setting only comes in 1.83/4, so my routine checks an array of known huds that have it set to true.
I'm using Trunk 1.83 nightly builds x64. The equipment list was causing me problems until i found the allow_big_gui = yes; and changed it to no which solved the text row issue on the equipment screen. I had to do a crude fix as posted previous with regards to it randomly showing the long backgrounds. Or if you switched back and forth between screens it would correct itself. I haven't had an addon yet that's caused an overlap on the UI. I downloaded coluber untouched and still did the same, i didn't touch any code just moved a few things around and changed the hud icons for personal choice. But it works, a bit bodge it and scarper but it did the trick. ;)

I'm using nearly all your addons, very cool mate! ;)
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Xenon UI OXP

Post by phkb »

NorthenderPNE wrote:
I'm using Trunk 1.83 nightly builds x64
Ah, in that case, can you change line 271 in xenonui.js, from this:

Code: Select all

	if (oolite.compareVersion("1.83") < 0) {
to this

Code: Select all

	if (oolite.compareVersion("1.83") <= 0) {
and see if that makes a difference?
NorthenderPNE wrote:
I'm using nearly all your addons, very cool mate!
That's wonderful! I'm so glad you're enjoying them.
NorthenderPNE
Deadly
Deadly
Posts: 132
Joined: Tue Jul 25, 2006 2:32 pm

Re: Xenon UI OXP

Post by NorthenderPNE »

phkb wrote:
NorthenderPNE wrote:
I'm using Trunk 1.83 nightly builds x64
Ah, in that case, can you change line 271 in xenonui.js, from this:

Code: Select all

	if (oolite.compareVersion("1.83") < 0) {
to this

Code: Select all

	if (oolite.compareVersion("1.83") <= 0) {
and see if that makes a difference?
NorthenderPNE wrote:
I'm using nearly all your addons, very cool mate!
That's wonderful! I'm so glad you're enjoying them.
No still doesn't work it just switches from xenon_standard_f7_nohud.png to xenon_standard_f7.png and when you switch back it shows the correct size. It does the same on F6 and F8.

Anyway that aside, i tried out your hud this morning and i really like it. You can see you've put a lot of attention into your addons mate. Really nice and clean, so i think i'll drop the other hud and stick with yours instead. I appreciate the time you've taken to try and solve the coluber hud issue. Respect mate. ;)

Addition:

I went back to the coluber hud ch01 out of curiosity and found where the problem originates. I can select any function key and it's fine except when i select the F7 key that's when the docked hud size problems start from. So it's the F7 key, if i never touch that key for example they're fine. Hope it helps if you wanted to track down the problem. ;)
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Xenon UI OXP

Post by phkb »

Thanks, that does help. I think I know what the problem is now.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Xenon UI OXP

Post by phkb »

Well the issue wasn't what I thought it was. If you're still running 1.83, and you've still got that little patch that changed line 271 in Xenon UI, then the problem actually lies with the Coluber HUD. That HUD has a standard and docked version of it's HUD - when you dock the HUD is switched to "coluber_hud_ch01-dock.plist", and when you launch it's set to "coluber_hud_ch01.plist".

The bug is that if you load a saved game with the Coluber HUD set, or you use the HUD Selector to change your HUD when docked, the callback function employed by the HUD to set itself up doesn't check that you're docked, so you will have the "coluber_hud_ch01.plist" HUD set. If you launch and redock, the correct HUD is selected.

The fix is to do the following to the "script.js" file in the "Config" folder of the Coluber HUD:
Change this:

Code: Select all

this.$HUDSelectorCallBack = function ( off ) {
	var w = worldScripts.coluber_hud_ch01;
	if( off ) { //do things to disable your HUD like rename functions
		if( w.shipWillDockWithStation ) {
			w.$save_shipWillDockWithStation = w.shipWillDockWithStation;
			delete w.shipWillDockWithStation;
		}
		if( w.shipWillLaunchFromStation ) {
			w.$save_shipWillLaunchFromStation = w.shipWillLaunchFromStation;
			delete w.shipWillLaunchFromStation;
		}
		if( w.$Timer ) { w.$Timer.stop(); delete w.$Timer;}
	} else { //do things to activate your HUD like restore disabled functions
		if( !w.shipWillLaunchFromStation ) {
			eval("w.shipWillDockWithStation = "+w.$save_shipWillDockWithStation);
			eval("w.shipWillLaunchFromStation = "+w.$save_shipWillLaunchFromStation);
		}
		if( !this.$Timer ) this.$Timer = new Timer(this, this._update.bind(this), 0, 0.25);
	}
}
To this:

Code: Select all

this.$HUDSelectorCallBack = function ( off ) {
	var w = worldScripts.coluber_hud_ch01;
	if( off ) { //do things to disable your HUD like rename functions
		if( w.shipWillDockWithStation ) {
			w.$save_shipWillDockWithStation = w.shipWillDockWithStation;
			delete w.shipWillDockWithStation;
		}
		if( w.shipWillLaunchFromStation ) {
			w.$save_shipWillLaunchFromStation = w.shipWillLaunchFromStation;
			delete w.shipWillLaunchFromStation;
		}
		if( w.$Timer ) { w.$Timer.stop(); delete w.$Timer;}
	} else { //do things to activate your HUD like restore disabled functions
		//  if the player is docked, use the docked version of the HUD
		if (player.ship.docked) player.ship.hud =  this.name + "-dock.plist";
		if( !w.shipWillLaunchFromStation ) {
			eval("w.shipWillDockWithStation = "+w.$save_shipWillDockWithStation);
			eval("w.shipWillLaunchFromStation = "+w.$save_shipWillLaunchFromStation);
		}
		if( !this.$Timer ) this.$Timer = new Timer(this, this._update.bind(this), 0, 0.25);
	}
}
(Edit to note: Norby has now updated the Coluber HUD with this fix. Thanks, Norby!)

In my tests the two fixes (changing XenonUI line 271 and the above) make the Coluber HUD work correctly with Xenon UI.

If you can confirm this I'll post the Xenon UI fix later today.
NorthenderPNE
Deadly
Deadly
Posts: 132
Joined: Tue Jul 25, 2006 2:32 pm

Re: Xenon UI OXP

Post by NorthenderPNE »

phkb wrote:
If you can confirm this I'll post the Xenon UI fix later today.
It works fine, thanks again, really appreciate the time and effort mate. ;)
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Xenon UI OXP

Post by phkb »

OK, new version of Xenon UI is up that fixes the check for "Allow Big GUI" in 1.83/4.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Xenon UI OXP

Post by phkb »

Version 1.4.2 has just been released, which fixes a fairly critical bug relating to the Nova mission.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16063
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Xenon UI OXP

Post by Cody »

Decided to try this after last night's nova fun. Having an old 5:4 monitor (1280x1024), I had to install the Redux version without sidebars. Installed in the AddOns folder, with BGS installed via the manager, it takes precedence over BGS on all screens except for F7 - and it threw a handful of these:

Code: Select all

13:46:20.448 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (XenonReduxUI 1.3.2): TypeError: p is null
13:46:20.448 [script.javaScript.exception.unexpectedType]:       ../AddOns/XenonReduxUI.oxz/Scripts/xenonreduxui.js, line 122. 
The latest widescreen version (1.4.2) does not have this problem - but the sidebars are cut in half. <sobs>

I'd need to reduce the font size to use either version though, as text overflows the central box.
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!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4653
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Xenon UI OXP

Post by phkb »

Cody, thanks for the error reports. Version 1.3.3 of the Redux version should fix it. The fix for the text overflow is going to take a bit longer, as I'll have to redo the backgrounds. I believe you're using the standard font, correct? Not one of the wider ones (like Xolonium or Dangerous Square)?
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16063
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Xenon UI OXP

Post by Cody »

phkb wrote:
I believe you're using the standard font, correct? Not one of the wider ones (like Xolonium or Dangerous Square)?
I'm using the 3dFont (but it's the same with the default font) - pic here.
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!
Post Reply