Thread Tools Display Modes
05/08/14, 04:14 PM   #1
etb12345
Join Date: May 2014
Posts: 2
Change Tab on Smithing

I have looked trough all the wiki but i cant find anything that would let me change tab from Refining to Deconstruct. I am making a plugin and i would like that it automaticly open the Deconstruct tab when i visit a station.

Anyone have this information?

How to change Tab
  Reply With Quote
05/08/14, 06:02 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by etb12345 View Post
I have looked trough all the wiki but i cant find anything that would let me change tab from Refining to Deconstruct. I am making a plugin and i would like that it automaticly open the Deconstruct tab when i visit a station.

Anyone have this information?

How to change Tab
You can use the following command to change tab:
Lua Code:
  1. ZO_MenuBar_SelectDescriptor(ZO_SmithingTopLevelModeMenuBar, mode)
where mode is:
1: refinment
2: creation
3: improvement
4: deconstruction
5: research

This works, but I'm really not sure if it doesn't break something else, so you should test it before you actually use it in addon:
Lua Code:
  1. SMITHING_SCENE:RegisterCallback("StateChange",
  2.     function(oldState, newState)
  3.         if newState == SCENE_SHOWING then
  4.             ZO_MenuBar_SelectDescriptor(ZO_SmithingTopLevelModeMenuBar, 4)
  5.         end
  6.     end)
  Reply With Quote
05/08/14, 06:24 PM   #3
etb12345
Join Date: May 2014
Posts: 2
WOWWW ! thanks a lot! i wasnt expecting an awnser but to have it the same night .. welll. THANKS!
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Change Tab on Smithing


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off