Thread Tools Display Modes
10-20-14, 03:00 AM   #1
mchwxj
A Fallenroot Satyr
Join Date: Jan 2013
Posts: 20
Does anyone know how to make the number of free bag slots larger using LUA codes?

Does anyone know how to make the number of free bag slots larger using LUA codes? I resized the main menu bar, and that number is now too small. I'm not using bag addons, just want to use some codes to do it. Thanks

Last edited by mchwxj : 10-20-14 at 03:33 AM.
  Reply With Quote
10-20-14, 07:11 AM   #2
sirann
A Flamescale Wyrmkin
Join Date: Mar 2007
Posts: 142
You could try typing in /fstack in game and mousing over the number to show the frames underneath your cursor. Figure out which one pertains to the number and then add ExactNameOfFrameYouFound:SetScale(number) somewhere in the .lua file of an addon you already have. Note, 'number' in my example can be any integer or decimal such as 1.3234234 or 2 or 0.95 etc.
  Reply With Quote
10-20-14, 07:12 AM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Code:
/run local s,f,_,o=18,MainMenuBarBackpackButtonCount:GetFont() MainMenuBarBackpackButtonCount:SetFont(f,s,o)
Change the number to whatever you want. The default size is 14.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-20-14, 02:07 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
A really simple way is to use fontstring:SetTextHeight().
Code:
/run MainMenuBarBackpackButtonCount:SetTextHeight(18)
Note: As noted in the linked page, small adjustments are fine. You may see distortions in the text if you scale it too big. In this case, Phanx's code will cause the UI to re-render the font with the appropriate base size.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
10-20-14, 03:04 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
:SetTextHeight looks bad though.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-20-14, 04:49 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
I never noticed anything wrong with it, then again, I never used it to adjust the size more than a few pixels. If I were to go with drastic measures, I'd usually go with switching out the FontObject with another bigger variant. In this example, switching out NumberFontNormal with NumberFontNormalHuge increases the size to 30px.
Code:
/run MainMenuBarBackpackButtonCount:SetFontObject(NumberFontNormalHuge);
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 10-20-14 at 04:56 PM.
  Reply With Quote
10-20-14, 05:20 PM   #7
mchwxj
A Fallenroot Satyr
Join Date: Jan 2013
Posts: 20
Thank you guys All of you. It's really a big help
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Does anyone know how to make the number of free bag slots larger using LUA codes?

Thread Tools
Display Modes

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