WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Guild member level font size change (https://www.wowinterface.com/forums/showthread.php?t=51536)

EKE 01-14-15 11:38 PM

Guild member level font size change
 
Guild member level and search level get "..." because the font style make number text wide

like this:
http://i.imgur.com/RH6hDuA.png

i know it use "GameFontHighlightSmall" but i want change them only,

can any addon do this? or only need simple code?

Phanx 01-15-15 10:14 PM

The simplest option is probably just to do this:
Code:

hooksecurefunc("GuildRosterButton_SetStringText", function(buttonString, text, isOnline, class)
    if strmatch(text, "%D") then
        -- text contains something that isn't a number, use the standard font:
        buttonString:SetFontObject(GameFontHighlightSmall)
    else
        -- text contains only numbers, use a smaller font:
        buttonString:SetFontObject(GameFontWhiteTiny)
    end
end)

If there are some other columns that display numbers that you don't want to make smaller, this might work, but I didn't test it:
Code:

hooksecurefunc("GuildRoster_Update", function()
        -- What viewing mode are we in?
        local currentGuildView = UIDropDownMenu_GetSelectedValue(GuildRosterViewDropdown)
       
        -- In most viewing modes the target column shows a level:
        local fontObject = GameFontWhiteTiny
        -- But in one viewing mode it shows text:
        if currentGuildView == "guildStatus" then
                fontObject = GameFontHighlightSmall
        end

        -- Loop over all the rows in the roster list:
        local buttons = GuildRosterContainer.buttons
        for i = 1, #buttons do
                local button = buttons[i]
                -- And apply the desired font object:
                button.string1:SetFontObject(GameFontWhiteTiny)
        end
end)


EKE 01-16-15 02:42 PM

Quote:

Originally Posted by Phanx (Post 304961)
The simplest option is probably just to do this......

oops, seems second part code get error at line 14 (i've try to fix it and test)

these two code were tested, but i found......not work?

If there is no way to solution to this problem, maybe change "GameFontHighlightSmall" font size is the last choice

and also i feel guildui on zhTW client have many bugs, i should change client location to contrast....... -_-

thank for your reply

Phanx 01-16-15 04:14 PM

Code:

for = 1, #buttons do
---->
Code:

for i = 1, #buttons do

EKE 01-16-15 07:24 PM

oh :/

lua error said GuildRosterButton_SetStringText/GuildRoster_Update is not a function

Phanx 01-17-15 02:49 AM

Your addon needs to wait until the Blizzard_GuildUI loads. The simplest method would be to add this in your TOC file:

Code:

## LoadOnDemand: 1
## LoadWith: Blizzard_GuildUI


EKE 01-17-15 11:35 AM

Quote:

Originally Posted by Phanx (Post 305043)
Your addon needs to wait until the Blizzard_GuildUI loads. The simplest method would be to add this in your TOC file......

OH a looow mistake... o.O

thank you very much the guild list level show on now :banana:

now ohly who frame show "..."
http://i.imgur.com/qBZn4XT.png

ps. an other question: why should class icon oh guild frame align to the left ?_? notice this recently

Phanx 01-17-15 11:31 PM

Quote:

Originally Posted by EKE (Post 305123)
now ohly who frame show "..."
http://i.imgur.com/qBZn4XT.png

Code:

for i = 1, WHOS_TO_DISPLAY do
    _G["WhoFrameButton"..i.."Level"]:SetFontObject(GameFontWhiteTiny)
end

This doesn't need to be delayed or wrapped in a function, since the who frame is loaded before addons.

Quote:

ps. an other question: why should class icon oh guild frame align to the left ?_? notice this recently
Not sure which icon you mean. Can you post a screenshot?


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

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