Thread: Inventory Width
View Single Post
05/19/14, 01:39 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
It's not perfect, but it works for me:

Resize.lua:
Lua Code:
  1. local width = 600
  2.  
  3. local function SetWidth(controlName)
  4.    WINDOW_MANAGER:GetControlByName(controlName):SetWidth(width)
  5. end
  6.  
  7. local function Resize(name, list)
  8.    list = list or "Backpack"
  9.    SetWidth(name)
  10.    SetWidth(name..list)
  11.    SetWidth(name.."SortBy")
  12.    SetWidth(name.."FilterDivider")
  13. end
  14.  
  15. local function ResInv(arg)
  16.    if arg ~= "" then
  17.       width = tonumber(zo_strmatch(arg, "%d+"))
  18.    end
  19.      
  20.    SetWidth("ZO_SharedRightPanelBackground")
  21.    Resize("ZO_PlayerInventory")
  22.    Resize("ZO_PlayerBank")
  23.    Resize("ZO_GuildBank")
  24.    Resize("ZO_StoreWindow", "List")
  25.    Resize("ZO_SmithingTopLevelRefinementPanelInventory")
  26.    Resize("ZO_SmithingTopLevelDeconstructionPanelInventory")
  27.    Resize("ZO_SmithingTopLevelImprovementPanelInventory")
  28.    Resize("ZO_SmithingTopLevelRefinementPanelInventory")
  29.    Resize("ZO_EnchantingTopLevelInventory")
  30.    Resize("ZO_AlchemyTopLevelInventory")
  31. end
  32.  
  33. --usage: /resinv <width>, if <width> is not specified, default value is 600.
  34. SLASH_COMMANDS["/resinv"] = ResInv
  Reply With Quote