• 0

    posted a message on Using |T<path>:<width>[:<height>:<xOffset>:<yOffset>]|t in longer strings
    This hack really is horrible: sure text and icons are lined up, but then it's the whole thing that "climb". Unusable with LDB... Unless we push the hack further: adding a "fontstringOffsetY" attribute or something that display addons would use to relocate the fontstring on the frame/button. :p
    Posted in: Lua Code Discussion
  • 0

    posted a message on Looking for someone on PTR to test "real ID"
    Hello !

    I'm looking for someone (preferably an addon author) on the 3.3.5 PTR (EU) to test the real ID system. My character is Moobringer on the Brill server.

    I wasn't able to convince people from my entourage to install the PTR client ._. and I need to implement that feature on a friend list addon.

    If interested, leave me a private message here.

    Thank you.

    EDIT: oops ! I wanted to post in general forums.
    Posted in: AddOn HELP!
  • 0

    posted a message on 3.2 patch
    I understand better why there's alot of new users to LDB. All hail patch 3.2 :p
    Posted in: FuBar AddOns
  • 0

    posted a message on DropDown Menu: simulated radio buttons working when keepShownOnClick is set ?
    Thank you Xinhuan, you're always very helpful :) (although it's still ugly :p).
    Posted in: Lua Code Discussion
  • 0

    posted a message on DropDown Menu: simulated radio buttons working when keepShownOnClick is set ?
    I tried LilSparky's Workshop but it's not what Im looking for.

    I want that checking a menu entry:
    - keep the menu entry shown (keepShownOnClick = true)
    - uncheck the other menu entries of this level
    Posted in: Lua Code Discussion
  • 0

    posted a message on DropDown Menu: simulated radio buttons working when keepShownOnClick is set ?
    I don't understand what that's supposed to do. :confused:
    Can you throw some code, or an addon where you're doing that ? :p


    EDIT: I found that
    _G["DropDownList"..UIDROPDOWNMENU_MENU_LEVEL].numButtons = 0
    dropdown_init(nil, UIDROPDOWNMENU_MENU_LEVEL)
    

    works for most of the radio button menus. Unfortunatly it doesn't work if a radio button has a sub-menu as shown below:

    Posted in: Lua Code Discussion
  • 0

    posted a message on DropDown Menu: simulated radio buttons working when keepShownOnClick is set ?
    Usually I use "info.checked = variable == 'value'" to simulate radio buttons with checkmarks within a dropdown menu.

    Now, the problem is I want to set "info.keepShownOnClick = true" and find a way to refresh the checkmarks at the current menu level when an item is clicked.

    Below is an ugly attempt to do this but it seems to conflict with the Blizzard's handling of checkmarks and only works half of the time.

    [php]
    local function SetOption(frame, var, val, checked)
    config[var] = val or checked -- works with "radio" & "check"

    -- ugly attempt to refresh checkmarks
    local sub = strsub(frame:GetName(), 1, 19)
    for i = 1, 5 do
    local menuFrame = _G[ sub .. tostring(i) ]
    local checkmark = _G[ sub .. tostring(i) .. "Check" ]
    checkmark:SetTexture(menuFrame == frame and "Interface\\Buttons\\UI-CheckBox-Check" or "")
    end

    -- --> something to clear the menu lines
    -- dropdown_init(nil, UIDROPDOWNMENU_MENU_LEVEL)
    end


    local options = {
    { text = format( "|cffffb366Ara|r Reputations (%s)", GetAddOnMetadata( "Ara_Broker_Reputations", "Version") ), isTitle = true },
    { text = "Block display", submenu = {
    { text = "ASCII Bar", var = "blockDisplay", type = "radio", val = "ascii", submenu = {
    { text = "Single Color", var = "asciiBar", type = "radio", val = "singleColor" },
    { text = "Dual Colors", var = "asciiBar", type = "radio", val = "dualColors" }, } },
    { text = "Text", var = "blockDisplay", type = "radio", val = "text", submenu = {
    { text = levels[6].." - 7500/12000 ", var = "textInfo", type = "radio", val = "standingValues" },
    { text = levels[6].." - 62%", var = "textInfo", type = "radio", val = "standingPerc" }, } } } },
    { text = "Tooltip bars", submenu = {
    { text = "Standard", var = "tipDisplay", type = "radio", val = "standard" },
    { text = "Double Wide", var = "tipDisplay", type = "radio", val = "doubleWide" } } },
    { text = "Hide Hints", var = "hideHints", type = "check" }
    }


    dropdown_init = function(self, level)
    level = level or 1
    for i, v in ipairs( level > 1 and UIDROPDOWNMENU_MENU_VALUE or options ) do
    local info = UIDropDownMenu_CreateInfo()
    info.text = v.text
    info.isTitle = v.isTitle
    if v.type == "radio" then
    info.checked = config[v.var] == v.val
    info.func, info.arg1, info.arg2 = SetOption, v.var, v.val
    info.keepShownOnClick = true -- TRY
    elseif v.type == "check" then
    info.checked = config[v.var]
    info.func, info.arg1 = SetOption, v.var
    info.keepShownOnClick = true
    end
    info.hasArrow = v.submenu ~= nil
    info.value = v.submenu
    UIDropDownMenu_AddButton( info, level )
    end
    end
    [/php]

    Is there a way to clear the lines of the current menu level and call the dropdown init function to redraw the menu, or something clever ?

    Sorry for my bad explanations. :(
    Posted in: Lua Code Discussion
  • 0

    posted a message on Scroll Frames...*Sigh*
    Great ! It was easier to understand and implement than a real FSF :p

    Ara_Broker_Guild_Friends can now scroll large guilds with little to no additions besides the creation of the slider.

    Thank you :)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Scroll Frames...*Sigh*
    Im looking for addons that have nice implementation of the fauxscrollframe, preferably small addons in order not to spend too much time looking into it :p
    Can someone provide some names ?

    Thank you in advance. :p
    Posted in: Lua Code Discussion
  • 0

    posted a message on Inserting text into the item tooltip
    Quote from Slakah
    Just tested it, and you don't need to call :Show() when hooking "OnTooltipSetUnit" or "OnTooltipSetItem", as it will get called after using your hook.

    But it is required for stuff like hooking the recipe shown when mouse is over the recipe icon in the tradeskill panel:
    [php]
    local button = _G.TradeSkillSkillIcon
    local TS_OnEnter = button:GetScript"OnEnter"
    local TS_OnLeave = button:GetScript"OnLeave"
    local orgSetTradeSkillItem = GameTooltip.SetTradeSkillItem

    local function newSetTradeSkillItem(...)
    orgSetTradeSkillItem(...)
    GameTooltip:AddLine("\n"..L"|cffff8040Click|r to create a shortcut.", .2, 1, .2)
    GameTooltip:Show()
    end

    button:SetScript("OnEnter", function(...)
    GameTooltip.SetTradeSkillItem = newSetTradeSkillItem
    TS_OnEnter(...)
    end)

    button:SetScript("OnLeave", function(...)
    TS_OnLeave(...)
    GameTooltip.SetTradeSkillItem = orgSetTradeSkillItem
    end)
    [/php]
    Posted in: Lua Code Discussion
  • 0

    posted a message on replacement for FuBar?
    cargoShip seems to follow the same design as oUF (haste): ultra light but requires you to write code for the layout if you don't like the provided one or want to enhance it.
    Posted in: AddOn HELP!
  • 0

    posted a message on Protected ReplaceEnchant() and workaround
    I feel insulted :p

    What I meant is: you can't delay a spell cast programatically. The only way to cast a spell is through a secure button, and the secure action button template doesn't provide any way to delay it.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Protected ReplaceEnchant() and workaround
    Quote from durcyn
    just cancel the tench then apply the new one on a 0.1s or so timer


    But how do you achieve that ? If the /in command doesnt accept /use and /cast it probably means it's not possible programatically either.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Protected ReplaceEnchant() and workaround
    Unfortunatly this doesn't work. I still get that damn: "Ara Broker WeaponBuffer has been blocked from an action only available to the Blizzard UI".

    I give up, stupid Blizzard. The first click is legit, so why can't we bypass the confirm dialog ? It makes no sense. :mad: :mad: :mad:
    Posted in: Lua Code Discussion
  • 0

    posted a message on Protected ReplaceEnchant() and workaround
    Quote from arnath2
    Just write a function that checks which static popup is shown and if it's the enchantment replacement popup, click the OK button and then do /script ClickFunction() in your macro.


    I use the REPLACE_ENCHANT event so I know it's the replace popup. But I don't get the part where you ask for clicking the OK button. If you meant "programatically" click the OK button, I can't find how to achieve this without error. Is there really a way to refresh a weapon buff in just one click ?
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.