• 0

    posted a message on GetStringHeight issues
    For some reason GetStringHeight() is not returning the correct height in pixels. I have no idea why, I gave up and just set the hight of the frame to a very high value which fixed the issue. Am I doing something wrong?

    function GUB.Main:MessageBox(Message, Width, Height, Font, FontSize)
      Width = Width or 600
      Height = Height or 310
    
    
      if MessageBox == nil then
        MessageBox = CreateFrame('Frame', nil, UIParent)
        MessageBox:SetSize(Width, Height)
        MessageBox:SetPoint('CENTER')
        MessageBox:SetBackdrop(DialogBorder)
        MessageBox:SetMovable(true)
        MessageBox:SetToplevel(true)
        MessageBox:SetClampedToScreen(true)
        MessageBox:SetScript('OnMouseDown', MessageBox.StartMoving)
        MessageBox:SetScript('OnMouseUp', MessageBox.StopMovingOrSizing)
        MessageBox:SetScript('OnHide', MessageBox.StopMovingOrSizing)
        MessageBox:SetFrameStrata('TOOLTIP')
    
        -- Create the scroll frame.
        -- This is a window that shows a smaller part of the contenframe.
        local ScrollFrame = CreateFrame('ScrollFrame', nil, MessageBox)
        ScrollFrame:SetPoint('TOPLEFT', 15, -15)
        ScrollFrame:SetPoint('BOTTOMRIGHT', -30, 44)
        MessageBox.ScrollFrame = ScrollFrame
    
        -- Create the contents that will be viewed thru the ScrollFrame.
        local ContentFrame = CreateFrame('Frame', nil, ScrollFrame)
          MessageBox.ContentFrame = ContentFrame
    
          local FontString = ContentFrame:CreateFontString(nil)
          FontString:SetAllPoints(ContentFrame)
          FontString:SetFont(LSM:Fetch('font', Font or 'Arial Narrow'), FontSize or 13, 'NONE')
          FontString:SetJustifyH('LEFT')
          FontString:SetJustifyV('TOP')
          MessageBox.FontString = FontString
    
        -- Create the scroller that appears on the message box.
        local Scroller = CreateFrame('slider', nil, ScrollFrame, 'UIPanelScrollBarTemplate')
        Scroller:SetPoint('TOPRIGHT', MessageBox, -8, -25)
        Scroller:SetPoint('BOTTOMRIGHT', MessageBox, -8, 25)
        MessageBox.Scroller = Scroller
    
        -- Create the dark background for the Scroller
        local ScrollerBG = Scroller:CreateTexture(nil, 'BACKGROUND')
        ScrollerBG:SetAllPoints(Scroller)
        ScrollerBG:SetTexture(0, 0, 0, 0.4)
        Scroller.ScrollerBG = ScrollerBG
    
        -- Create the ok button to close the message box
        local OkButton =  CreateFrame('Button', nil, MessageBox, 'UIPanelButtonTemplate')
        OkButton:SetScale(1.25)
        OkButton:SetSize(50, 20)
        OkButton:ClearAllPoints()
        OkButton:SetPoint('BOTTOMLEFT', 10, 10)
        OkButton:SetScript('OnClick', function()
                                        PlaySound('igMainMenuOptionCheckBoxOn')
                                        MessageBox:Hide()
                                      end)
        OkButton:SetText('Okay')
        MessageBox.OkButton = OkButton
    
        ScrollFrame:SetScrollChild(ContentFrame)
      end
    
      -- Set the size of the content frame based on text
      local FontString = MessageBox.FontString
      local ContentFrame = MessageBox.ContentFrame
      ContentFrame:SetSize(Width - 45, 1000)
    
      FontString:SetText(Message)
    
      local Height = FontString:GetStringHeight()
      local Scroller = MessageBox.Scroller
    
      Scroller:SetMinMaxValues(1, Height - 40)
      Scroller:SetValueStep(1)
      Scroller:SetValue(0)
      Scroller:SetWidth(16)
    
      MessageBox:Show()
    end
    Posted in: Lua Code Discussion
  • 0

    posted a message on Message box frame lib exist?
    I use ace config dialog. It makes doing GUI options easy, but the limitations drive me nuts at time.

    In my addon I collect a list of debuff and buffs, and I want to list them out and be able to click them or mouse over them with a tooltip.

    aceconfig has no feature where you can list stuff like that. So I had to use the description type it looks good, but you cant click a hyperlink on it.

    Don't think you can do a custom control since that only supports editbox or dropdowns.

    Maybe ace3 on day can get some kind of read only output box. Like for the help file in my addon I use a big editbox, since you can cut text out from it. Was a good way to do it, but not how I would like to do it.
    Posted in: Ace3
  • 0

    posted a message on Adding info to a tooltip after sethyperlink
    Yeah this was a snippet from AceGUI-3.0-Spell-EditBox that I modified.
    I took that hide out. The show() thing worked though.
    Posted in: Lua Code Discussion
  • 0

    posted a message on UNIT_AURA event for pets, boss1, etc?
    Can I do a RegisterUnitEvent('UNIT_AURA', 'boss1') ?
    When i'm in a raid will this pick up aura changes on the boss1?

    Or do I have to do this differently?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Adding info to a tooltip after sethyperlink
    Awesome, thanks!
    Posted in: Lua Code Discussion
  • 0

    posted a message on Adding info to a tooltip after sethyperlink
    GameTooltip:SetOwner(self, 'ANCHOR_BOTTOMRIGHT', 3)
    GameTooltip:SetHyperlink(format(HyperLinkSt, self.SpellID))
    GameTooltip:AddLine(self.SpellID)
    GameTooltip:SetHeight(GameTooltip:GetHeight() + 15)

    Right now this is how I have to do it. Without the SetHeight, the tooltip border isn't large enough to cover the additional line.
    Posted in: Lua Code Discussion
  • 0

    posted a message on ace gui 3.0 spell edit box still good?
    I took the code and wrote it into my addon. So its not a lib anymore. Basically changed the code to my coding style, fixed a bunch of bugs. But the one I have is just made for auras.

    Least this way I can customize it more for what I need. I put in my comments that its not my work.

    Added the GetSpellName change to my post above. This change should make the drag a spell from spellbook or actionbar to the editbox work again. Looks like that part was broken for the last 4 years.
    Posted in: Ace3
  • 0

    posted a message on ace gui 3.0 spell edit box still good?
    After giving it a good shot at making it almost work I give up. Just going to go with my own method. Unless someone fixes it this lib will be dead when 6.0 hits.

    Got the lib to work to work, or the parts I need. No idea if there are
    other hidden bugs.

    Changes to fix AceGUI-3.0-Spell-EditBox

    Casts-EditBox.lua
    line 23
    Change 7 to 4

    Auras-EditBox.lua
    line 13
    Change 9 to 6

    AceGUI-3.0-Spell-EditBox.lua
    line 43
    name and icon to
    name and name ~= ""

    line 213
    GetSpellName to
    GetSpellBookItemName

    SpellLoader.lua
    line 61
    name and and not blacklist[icon] to
    name and name ~= "" and not blacklist[icon]
    Posted in: Ace3
  • 0

    posted a message on ace gui 3.0 spell edit box still good?
    Got it to load, but it gives an error on line 13 when I try to enter a spell. If this lib won't work for warlods I'll have to use a more crude method of doing the same thing. Wont look as nice though.

    Well crap GetSpellInfo was changed.
    Old: name[COLOR=Red], rank[/COLOR], icon[COLOR=Red], powerCost, isFunnel, powerType[/COLOR], castingTime, minRange, maxRange[/color] = GetSpellInfo(id) 
    New: name[COLOR=Lime], subname[/COLOR], icon, castingTime, minRange, maxRange = GetSpellInfo(id)
    4x ...Bars\Libs\14AceGUI-3.0-34-Spell-EditBox\Auras-EditBox.lua:13: attempt to compare number with nil
    ...Bars\Libs\14AceGUI-3.0-34-Spell-EditBox\Auras-EditBox.lua:13: in function `spellFilter'
    ...tBars\Libs\15AceGUI-3.0-34-Spell-EditBox\EditBox-Core.lua:55: in function <...tBars\Libs\AceGUI-3.0-Spell-EditBox\EditBox-Core.lua:47>
    ...tBars\Libs\15AceGUI-3.0-34-Spell-EditBox\EditBox-Core.lua:100: in function <...tBars\Libs\AceGUI-3.0-Spell-EditBox\EditBox-Core.lua:97>
    ...tBars\Libs\15AceGUI-3.0-34-Spell-EditBox\EditBox-Core.lua:200: in function <...tBars\Libs\AceGUI-3.0-Spell-EditBox\EditBox-Core.lua:193>
    
    Locals:
    self = AceGUI30SpellEditBox1Predictor {
     0 = <userdata>
     buttons = <table> {
     }
     obj = <table> {
     }
     Query = <function> defined @GalvinUnitBars\Libs\AceGUI-3.0-Spell-EditBox\EditBox-Core.lua:47
    }
    query = "^c"
    activeButtons = 0
    (for generator) = <function> defined =[C]:-1
    (for state) = <table> {
     2 = ""
     5 = "death touch"
     6 = ""
     7 = "suicide"
     8 = ""
     9 = ""
     10 = "blizzard"
     11 = ""
     12 = ""
     15 = ""
     16 = ""
     17 = "power word: shield"
     19 = ""
     20 = ""
     21 = ""
     23 = ""
     25 = "stun"
     28 = ""
     29 = ""
     30 = ""
     32 = ""
     36 = ""
     37 = ""
     38 = ""
     39 = ""
     40 = ""
     41 = ""
     42 = ""
     43 = ""
     44 = ""
     45 = "war stomp"
     46 = ""
     47 = ""
     48 = ""
     49 = ""
     50 = ""
     51 = ""
     52 = ""
     53 = "backstab"
     54 = ""
     55 = ""
     56 = "stun"
     57 = ""
     58 = ""
     60 = ""
     61 = ""
     62 = ""
     63 = ""
     64 = ""
     65 = "haste"
     66 = "invisibility"
     67 = ""
     68 = ""
     69 = ""
     70 = ""
     71 = "defensive stance"
     72 = ""
     73 = ""
     74 = ""
     75 = "auto shot"
     76 = ""
     78 = "heroic strike"
     79 = ""
     80 = ""
     82 = ""
     83 = ""
     84 = ""
     85 = ""
     86 = ""
     87 = ""
     88 = ""
     89 = ""
     90 = ""
     91 = "savage assault"
     92 = ""
     93 = ""
     94 = ""
     95 = ""
     96 = "dismember"
     97 = ""
     98 = ""
     99 = "incapacitating roar"
     100 = "charge"
     101 = "trip"
     102 = ""
     103 = ""
     104 = ""
     105 = ""
     106 = ""
     109 = ""
     113 = "chains of ice"
     114 = ""
     115 = ""
     116 = "frostbolt"
     117 = ""
     118 = "polymorph"
     119 = ""
     120 = "cone of cold"
     121 = ""
     122 = "frost nova"
     123 = ""
     124 = ""
     125 = ""
     126 = "eye of kilrogg"
     127 = ""
     128 = ""
     129 = ""
     130 = "slow fall"
     131 = ""
     132 = ""
     133 = "fireball"
     134 = "fire shield"
     135 = ""
     136 = "mend pet"
     137 = ""
     138 = ""
     139 = "renew"
     140 = ""
     141 = ""
     142 = ""
     143 = ""
     144 = ""
     145 = ""
     146 = ""
     147 = ""
     148 = ""
     149 = ""
     150 = ""
     151 = ""
     152 = ""
     153 = ""
     154 = ""
     155 = ""
     156 = ""
     157 = ""
     158 = ""
     159 = ""
     160 = ""
     161 = ""
     162 = ""
     163 = ""
     164 = ""
     165 = ""
     166 = ""
     167 = ""
     168 = ""
     169 = ""
     170 = ""
     171 = ""
     172 = "corruption"
     173 = ""
     174 = ""
     175 = ""
     176 = ""
     177 = ""
     178 = ""
     179 = ""
     180 = ""
     181 = ""
     182 = ""
     183 = ""
     184 = "fire shield"
     185 = ""
     186 = ""
     187 = ""
     188 = ""
     189 = ""
     190 = ""
     191 = ""
     192 = ""
     193 = ""
     194 = ""
     195 = ""
     196 = "one-handed axes"
     197 = "two-handed axes"
     198 = "one-handed maces"
     199 = "two-handed maces"
     200 = "polearms"
     201 = "one-handed swords"
     202 = "two-handed swords"
     203 = "unarmed"
     204 = "defense"
     205 = ""
     206 = ""
     207 = ""
     208 = ""
     209 = ""
     210 = ""
     211 = ""
     212 = ""
     213 = ""
     214 = ""
     215 = ""
     216 = ""
     217 = ""
     218 = ""
     219 = ""
     220 = ""
     221 = ""
     222 = ""
     223 = ""
     224 = ""
     225 = ""
     226 = ""
     227 = "staves"
     228 = "polymorph: chicken"
     229 = ""
     230 = ""
     231 = ""
     232 = ""
     233 = ""
     234 = ""
     235 = ""
     236 = ""
     237 = ""
     238 = ""
     239 = ""
     240 = ""
     241 = ""
     242 = ""
     243 = ""
     244 = ""
     245 = ""
     246 = "slow"
     247 = ""
     248 = ""
     249 = ""
     250 = ""
     251 = ""
     252 = ""
     253 = ""
     254 = ""
     255 = ""
     256 = ""
     257 = ""
     258 = ""
     259 = ""
     260 = ""
     262 = ""
     263 = ""
     264 = "bows"
     265 = "area death (test)"
     266 = "guns"
     267 = ""
     268 = ""
     270 = ""
     271 = "call of the void"
     272 = ""
     273 = ""
     274 = ""
     275 = ""
     276 = ""
     277 = ""
     278 = ""
     279 = ""
     280 = ""
     281 = ""
     282 = ""
     283 = ""
     284 = ""
     285 = ""
     286 = ""
     287 = ""
     288 = ""
     289 = ""
     290 = ""
     291 = ""
     292 = ""
     293 = ""
     294 = ""
     295 = ""
     296 = ""
     297 = ""
     298 = ""
     299 = ""
     300 = ""
     301 = ""
     302 = ""
     303 = ""
     304 = ""
     305 = ""
     306 = ""
     307 = ""
     308 = ""
     309 = ""
     310 = ""
     311 = ""
     312 = ""
     313 = ""
     314 = ""
     315 = ""
     316 = ""
     317 = ""
     318 = ""
     319 = ""
     320 = ""
     321 = ""
     322 = ""
     323 = ""
     324 = "lightning shield"
     325 = ""
     326 = ""
     327 = ""
     328 = ""
     329 = ""
     330 = ""
     331 = ""
     332 = ""
     333 = ""
     334 = ""
     335 = ""
     336 = ""
     337 = ""
     338 = ""
     339 = "entangling roots"
     340 = ""
     341 = ""
     342 = ""
     343 = ""
     344 = ""
     345 = ""
     346 = ""
     347 = ""
     348 = "immolate"
     349 = ""
     350 = ""
     351 = ""
     352 = ""
     353 = ""
     354 = ""
     355 = "taunt"
     356 = ""
     357 = ""
     35
    Posted in: Ace3
  • 0

    posted a message on acedb weirdness when saved
    Probably it was talked about here http://www.wowinterface.com/forums/showthread.php?t=49523

    Maybe this current build will fix it.
    Posted in: Ace3
  • 0

    posted a message on ace gui 3.0 spell edit box still good?
    http://www.wowace.com/addons/ace-gui-3-0-spell-editbox/

    Was looking into using this lib for my addon. I need an easy way for a player to type in a spell. But this lib is 5 years old. What does it do with all the memory it uses to store the spells? Is there a better lib out there that can do this? Just want to know if this will work in warlords of draenor.
    Posted in: Ace3
  • 0

    posted a message on Cooldown animation not working (WoD)
    I got an answer to this problem. Have to use the cooldown template.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Cooldown animation not working (WoD)
    Didn't know about the other forums till after I posted here. So I just left it.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Cooldown animation not working (WoD)
    I know blizzard added new functions for beta. My current addon cooldowns don't work. I made some sample code to test, and I just cant figure out why the cooldown is not playing. I tried messing around with DrawEdge and DrawSwipe. I even tried using blizzards function CooldownFrame_SetTimer function as well. nothing works.

    local F = CreateFrame('Frame', nil, UIParent)
    F:SetPoint('RIGHT')
    F:SetSize(100, 100)
    local CooldownFrame = CreateFrame('Cooldown', nil, F)
    local Texture = F:CreateTexture()
    Texture:SetTexture([[Interface\PlayerFrame\UI-PlayerFrame-Deathknight-Blood]])
    Texture:SetAllPoints(F)
    
    CooldownFrame:Show()
    CooldownFrame:SetPoint('CENTER', Texture, 'CENTER', 0, 0)
    CooldownFrame:SetSize(100, 100)
    
    CooldownFrame:SetDrawEdge(false)
    CooldownFrame:SetDrawSwipe(true)
    CooldownFrame:SetCooldown(GetTime(), 10)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Toggle list inside a pull down menu possible?
    I see its using dialogControl = "Dropdown". I thought this was for custom controls?
    That's what I was missing in my code.
    Posted in: Ace3
  • To post a comment, please or register a new account.