View Single Post
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