View Single Post
01/14/15, 05:04 PM   #1
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,050
libMediaProvider problem

Hey there,

Is libMediaProvider still working with current version of the game?
I changed an addon (CraftingMaterialLevelDisplay), added the libMediaProver library and some LAM 2.0 settings to choose a font family, font size, font color and font style.
From the information I've found (I think it was Garkin again who had explained the usage of the fontString in a forum thread) I've build a font string and updated the controls in the inventory with the new font information:

Lua Code:
  1. LMP = LibStub:GetLibrary('LibMediaProvider-1.0')
  2.  
  3. local color = CraftingMaterialLevelDisplay.savedVariables.font.color
  4. local fontPath = LMP:Fetch('font', CraftingMaterialLevelDisplay.savedVariables.font.family)
  5. local fontString = string.format('%s|%u|%s', CraftingMaterialLevelDisplay.savedVariables.font.family, CraftingMaterialLevelDisplay.savedVariables.font.size, CraftingMaterialLevelDisplay.savedVariables.font.style)
  6. ...
  7. for _,labelControl in pairs(CraftingMaterialLevelDisplay.currentInventoryRows) do
  8.             labelControl:SetFont(fontString)
  9.             labelControl:SetColor(color.r, color.g, color.b, color.a)
  10. end

The library is correctly included and working as the LAM menu shows the dropdown box entries correctly and stores it correctly into the SavedVariables.

My Problem now is:
The controls inside the inventory (normally shown right to the name of the item) won#t be shown anymore :-(
I can ZGOO them and the color was updated corretly. But they are not there. Even if I :SetHidden(false) they are still not shown.
Seems as if the dimensions were set to 0 or something like this.

Any ideas why the controls are not shown anymore?
The original addon simply uses ZoFontGame as the font (labelcontrol:SetFont("ZoFontGame")) and this works, but I'm not able to change the size of the font and that annoys me

Thx for the help.
  Reply With Quote