View Single Post
05-01-16, 05:54 PM   #6
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Weird. While I'm sure there is nothing wrong with your copy, it doesn't seem to work for me. "Blizzard Marble" works fine on line 16, but "White Marble" does not.

My main chunk has the following.
Lua Code:
  1. -- register font & background with LibSharedMedia-3-0
  2. LSM:Register("font", "Roman SD", "Interface\\AddOns\\MyrroUI\\Media\\Roman SD.ttf")
  3. LSM:Register("background", "White Marble", "Interface\\AddOns\\MyrroUI\\Media\\white marble.tga")
  4.  
  5. function MyrroUI:OnInitialize()
  6.     -- called in MUI_Installer.lua
  7.     self.installer = self.installer or self:CreateInstaller()
  8. end

And MUI_Installer.lua

Lua Code:
  1. function MyrroUI:CreateInstaller()
  2.     -- create Installer window ----------------------
  3.     local width = UIParent:GetWidth() / 2
  4.     local height = UIParent:GetHeight() / 2
  5.     local f = f or CreateFrame("Frame", "MyrroUIInstallerFrame")
  6.     f:SetFrameStrata("MEDIUM")
  7.     f:SetMovable(true)
  8.     f:SetUserPlaced(false)
  9.     f:SetClampedToScreen(true)
  10.     f:SetSize(width, height)
  11.     f:ClearAllPoints()
  12.     f:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
  13.  
  14.     -- frame backdrop ---------------------------
  15.     f:SetBackdrop({
  16.         bgFile = LSM:Fetch("background", "Blizzard Marble"),
  17.         edgeFile = LSM:Fetch("border", "Blizzard Achievement Wood"),
  18.         tile = false, tileSize = 20, edgeSize = 130,
  19.         insets = {left = 0, right = 0, top = 0, bottom = 0}
  20.     })
  21.    
  22.     -- "Myrro UI" -------------------------------
  23.     local fo1 = f:CreateFontString()
  24.     fo1:SetFont(LSM:Fetch("font", "Roman SD"), 24, nil)
  25.     fo1:SetPoint("BOTTOM", f, "TOP", 0, -24)
  26.     fo1:SetText("Myrro UI")
  27.     fo1:SetTextColor(201, 137, 16, 1)
  28.    
  29.     -- version text -----------------------------
  30.     local fo2 = f:CreateFontString()
  31.     fo2:SetFont(LSM:Fetch("font", "Roman SD"), 18, nil)
  32.     fo2:SetPoint("TOP", fo1, "BOTTOM")
  33.     fo2:SetText(version)
  34.     fo2:SetTextColor(168, 168, 168, 1)
  35.    
  36.     -- "Installer" ------------------------------
  37.     local fo3 = f:CreateFontString()
  38.     fo3:SetFont(LSM:Fetch("font", "Roman SD"), 18, nil)
  39.     fo3:SetPoint("TOP", f, "BOTTOM", 0, 36)
  40.     fo3:SetText(L["Installer"])
  41.     fo3:SetTextColor(150, 90, 56, 1)
  42.    
  43.     return f
  44. end
  Reply With Quote