ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   libMediaProvider problem (https://www.esoui.com/forums/showthread.php?t=4205)

Baertram 01/14/15 05:04 PM

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.

Seerah 01/14/15 07:55 PM

On line 5, use your fontPath variable instead of CraftingMaterialLevelDisplay.savedVariables.font.family. You're passing through the name of the font instead of the file path for the game to use.

Baertram 01/14/15 09:54 PM

Damn, I knew it was a silly simple one...
Thx for 2 more eyes :eek:

I shouldn't code anymore after 10pm ^^

Minceraft 01/14/15 10:19 PM

Quote:

Originally Posted by Baertram (Post 18250)
I shouldn't code anymore after 10pm ^^

Totally agree with that statement!!!!

katkat42 01/14/15 10:36 PM

Quote:

Originally Posted by Minceraft (Post 18252)
Quote:

Originally Posted by Baertram (Post 18250)
I shouldn't code anymore after 10pm ^^

Totally agree with that statement!!!!

I know what you mean. I no longer release code after 11pm.... (I do most of my coding after the kid goes to bed, so if my cut-off was 10pm I'd never get anything done ;) )

Baertram 01/15/15 07:13 AM

I only got the time to code after work and friends, so 10pm is my starting time in many cases :-(


All times are GMT -6. The time now is 03:26 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI