WoW:API GetTradeSkillSelectionIndex: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Move page script moved page API GetTradeSkillSelectionIndex to API GetTradeSkillSelectionIndex without leaving a redirect) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
Returns the index of the currently selected trade skill. | Returns the index of the currently selected trade skill. | ||
local tradeSkillIndex = GetTradeSkillSelectionIndex(); | local tradeSkillIndex = GetTradeSkillSelectionIndex(); | ||
==Parameters== | |||
; | ===Returns=== | ||
:; tradeSkillIndex : Number - The index of the currently selected trade skill, or 0 if none selected. | |||
==Example== | |||
if ( GetTradeSkillSelectionIndex() > 1 ) then | if ( GetTradeSkillSelectionIndex() > 1 ) then | ||
TradeSkillFrame_SetSelection(GetTradeSkillSelectionIndex()); | TradeSkillFrame_SetSelection(GetTradeSkillSelectionIndex()); | ||
Line 26: | Line 15: | ||
end; | end; | ||
end; | end; | ||
Latest revision as of 04:46, 15 August 2023
← WoW API < GetTradeSkillSelectionIndex
Returns the index of the currently selected trade skill.
local tradeSkillIndex = GetTradeSkillSelectionIndex();
Parameters[edit]
Returns[edit]
- tradeSkillIndex
- Number - The index of the currently selected trade skill, or 0 if none selected.
Example[edit]
if ( GetTradeSkillSelectionIndex() > 1 ) then TradeSkillFrame_SetSelection(GetTradeSkillSelectionIndex()); else if ( GetNumTradeSkills() > 0 ) then TradeSkillFrame_SetSelection(GetFirstTradeSkill()); end; end;