Gui events
Moderators: winston, another_commander
- Rustybolts
- ---- E L I T E ----
- Posts: 293
- Joined: Sun Jun 07, 2009 6:22 pm
- Location: UK
Gui events
Can i run some code if when docked with main station player opens shipyard gui or opens commodities gui e.t.c
T.Y for any help.
T.Y for any help.
STE.+ Firefly/Dragonfly + BlackJacksbullion v.1.23 link below.
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
You can. The handler is
where to and from hold the string description of the screen we got to and the screen we came from, like GUI_SCREEN_SYSTEM_DATA, GUI_SCREEN_STATUS etc.
Code: Select all
this.guiScreenChanged = function(to, from)
{
... your code here ...
}
- Rustybolts
- ---- E L I T E ----
- Posts: 293
- Joined: Sun Jun 07, 2009 6:22 pm
- Location: UK
Ty I thought it was this command. Is there a list of each of these screens somewhere or are they all called the same as they are labled inside the game when playing?
STE.+ Firefly/Dragonfly + BlackJacksbullion v.1.23 link below.
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
It is the same as in the game. Here is the complete list of GUI_SCREENs:Rustybolts wrote:Ty I thought it was this command. Is there a list of each of these screens somewhere or are they all called the same as they are labled inside the game when playing?
Code: Select all
GUI_SCREEN_MAIN,
GUI_SCREEN_INTRO1,
GUI_SCREEN_INTRO2,
GUI_SCREEN_STATUS,
GUI_SCREEN_MANIFEST,
GUI_SCREEN_EQUIP_SHIP,
GUI_SCREEN_SHIPYARD,
GUI_SCREEN_LONG_RANGE_CHART,
GUI_SCREEN_SHORT_RANGE_CHART,
GUI_SCREEN_SYSTEM_DATA,
GUI_SCREEN_MARKET,
GUI_SCREEN_CONTRACTS,
GUI_SCREEN_OPTIONS,
GUI_SCREEN_GAMEOPTIONS,
GUI_SCREEN_LOAD,
GUI_SCREEN_SAVE,
GUI_SCREEN_SAVE_OVERWRITE,
GUI_SCREEN_STICKMAPPER,
GUI_SCREEN_MISSION,
GUI_SCREEN_REPORT
- Rustybolts
- ---- E L I T E ----
- Posts: 293
- Joined: Sun Jun 07, 2009 6:22 pm
- Location: UK
Much apreciated ty
STE.+ Firefly/Dragonfly + BlackJacksbullion v.1.23 link below.
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
One warning though; Your code still has to double check if the "to" screen is the current screen as another oxp could have used that same handler for switching screens. (e.g. there could have been a launch() instruction by an other oxp)another_commander wrote:You can. The handler iswhere to and from hold the string description of the screen we got to and the screen we came from, like GUI_SCREEN_SYSTEM_DATA, GUI_SCREEN_STATUS etc.Code: Select all
this.guiScreenChanged = function(to, from) { ... your code here ... }
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Rustybolts
- ---- E L I T E ----
- Posts: 293
- Joined: Sun Jun 07, 2009 6:22 pm
- Location: UK
If i run a mission screen from one of these is it possible after the mission screen has completed to return directly to the gui screen i have overided?
STE.+ Firefly/Dragonfly + BlackJacksbullion v.1.23 link below.
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
- Rustybolts
- ---- E L I T E ----
- Posts: 293
- Joined: Sun Jun 07, 2009 6:22 pm
- Location: UK
Not what i wanted to hear. Oh well that pisses on my fire.
T.y for help
T.y for help
STE.+ Firefly/Dragonfly + BlackJacksbullion v.1.23 link below.
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871
http://www.mediafire.com/?sharekey=ca16 ... f6e8ebb871