WoW:API ToggleBag: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API ToggleBag to API ToggleBag without leaving a redirect)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<center>'''ToggleBag''' ''-Documentation by AlexanderYoshi-''</center>
<br>{{framexmlfunc|FrameXML/ContainerFrame.lua}} __NOTOC__


Opens or closes the specified bag.


  ToggleBag(bagNum);
  ToggleBag(bagNum);


----
Opens or closes the specified bag.
;''Arguments''
 


:(Number bagNum)
== Parameters ==
=== Arguments ===


:;bagNum : The number of which bag you want to toggle open or close
:;bagNum : Number - the [[bagId]] you want to toggle open or close


----
=== Returns ===
;''Returns''


:;nil
:;nil


----
== Example ==
;''Example''
 
  ToggleBag(2);
  ToggleBag(2);


;''Result''
----
;''Description''
: Opens or closes the specified bag.


----
== Details ==
{{Template:WoW API}}
: If toggling the backpack with the keyboard, this function is called when opening but NOT when closing. Closing appears to be done by ToggleBackpack(). However, if the mouse is used to close the Backpack then this function does respond.
[[Category:API Functions|ToggleBag]]
[[Category:API Container Functions|ToggleBag]]
[[Category:API Toggle Functions|ToggleBag]]

Latest revision as of 04:47, 15 August 2023


WoW API < ToggleBag

"I" iconThis function is implemented in Lua here FrameXML/ContainerFrame.lua.


ToggleBag(bagNum);

Opens or closes the specified bag.


Parameters[edit]

Arguments[edit]

bagNum
Number - the bagId you want to toggle open or close

Returns[edit]

nil

Example[edit]

ToggleBag(2);


Details[edit]

If toggling the backpack with the keyboard, this function is called when opening but NOT when closing. Closing appears to be done by ToggleBackpack(). However, if the mouse is used to close the Backpack then this function does respond.