Quantcast
Download
(24 Kb)
Download
Updated: 04-18-20 02:34 AM
Pictures
File Info
Compatibility:
Visions of N'Zoth (8.3.0)
Updated:04-18-20 02:34 AM
Created:03-20-20 08:22 PM
Downloads:566
Favorites:2
MD5:
Categories:Data Broker, Guild Compilations
8.3.0

gmGuildFriends

Version: 830-2020041801
by: gmarco, Wexen

gmGuildFriends

A very simple data broker plugin to show the guild roster and friend lists.

Requires a data broker display like chocolate bar, bazooka, ninjapanel, stat block, titan panel, docking station, buttonbin and more.

If you want the stripped down versions you can check: gmGuild and gmFriends


If you are interested in helping translating, please visit forum:
https://www.wowinterface.com/downloa....html#comments

providing the following entries:

Lua Code:
  1. L["Right-Click"]        = ""
  2. L["Left-Click"]         = ""
  3. L["Middle-Click"]       = ""
  4. L["Show Guild"]         = ""
  5. L["Show Battle.net"]    = ""
  6. L["Show FriendList"]    = ""
  7. L["Show Help"]          = ""
  8. L["Show Guild Message"] = ""
  9. L["Show Player Info"]   = ""
  10. L["Note"]               = ""
  11. L["Officer Note"]       = ""
  12. L["Achievements Points"]= ""
  13. L["Show only playing Battle.net Friends"] = ""


Example in Italian:

Lua Code:
  1. L["Right-Click"]        = "Tasto-Destro"
  2. L["Left-Click"]         = "Tasto-Sinistro"
  3. L["Middle-Click"]       = "Tasto-Centrale"
  4. L["Show Guild"]         = "Mostra gilda"
  5. L["Show Battle.net"]    = "Mostra amici Battle.net"
  6. L["Show FriendList"]    = "Mostra amici"
  7. L["Show Help"]          = "Mostra legenda"
  8. L["Show Guild Message"] = "Mostra messaggio di gilda"
  9. L["Show Player Info"]   = "Mostra informazioni aggiuntive sui giocatori"
  10. L["Note"]               = "Note"
  11. L["Officer Note"]       = "Note del GM"
  12. L["Achievements Points"]= "Punti impresa"
  13. L["Show only playing Battle.net Friends"] = "Mostra solo amici Battle.net in gioco"

Actually it supports for the following locale:
- enUS
- itIT
- deDE. Thanks to icemeph.
- zhTW. Thanks to BNS & EKE.
- zhCN. Thanks to BNS & EKE.

830-2020041801
- make the status icon a little bigger
- now add a + in the status if the players are in group with you (usefull if you want to raid invite :)
- fix the Left mouse click if not in guild

830-2020041301
- changed the saved var name.
- make an hack to prevent playerinfo note overlap
- prevent to click in combat to open guild and friends panel
- if bnet account == character print only ones.

830-2020032601
- add a scrollbar if tooltip is long and limits to: (GetScreenHeight()-100)
- change the layout of LEVEL column

830-2020032501
- Add an option to filter out BNET friends actually not playing (for people with looong friends lists).

This can breaks your config.
Please go in Interface --> Addons --> gmGuildFriends --> Press: "Reset and reloadUI"
This should be enough. If not you have to manual delete the SavedVariable when the game is close.
A message will appear on entering world about this.

- rewrite the layout and the display of bnet friends

830-2020032402
- fix a problem with BNET friends in WoW classic

830-2020032401
- used the justification of libqtip instead of custom code
Thanks to EKE for input on this :)
https://www.wowinterface.com/downloads/fileinfo.php?id=25522#comments


830-2020032205
- Added the player info note sub tip
- Added the option to use it or not
- Added the localization for some new strings

830-2020032204
- Call a GuildRoster() before building the guild tooltip.
- Update all the libs to the latest
- Add the options to hide/show the guild message of the day
This can breaks your config.
Please go in Interface --> Addons --> gmGuildFriends --> Press: "Reset and reloadUI"
This should be enough. If not you have to manual delete the SavedVariable when the game is close.
A message will appear on entering world about this.

830-2020032203
- Fix ToggleGuildFrame() to real toogle :)
- Implement a minimum of options panel to hide/show section (guild/bnet/frame/legenda).
- Used the graphical mouse icons for legenda and prepare an option config: text/graphical

I am thinking also to split guild and friends in 2 ldb for who has lots of guild mates or friends.
It is not our case but may happens :)

830-2020032102
- Fix the display of long guild motd (word wrap at 69 line length).
- Replaced the zhCN localization (my fault, thanks EKE!)

830-2020032101
- first release
Thanks to all you guys in WoWI forum, in special way Vrul and Fizzlemizz for help and patience.
You are fantastic.
https://www.wowinterface.com/forums/showthread.php?p=335396
Optional Files (0)


Archived Files (10)
File Name
Version
Size
Author
Date
830-2020041301
24kB
gmarco
04-13-20 12:10 PM
830-2020032601
23kB
gmarco
03-26-20 07:19 AM
830-2020032501
23kB
gmarco
03-25-20 06:38 AM
830-2020032402
23kB
gmarco
03-24-20 08:21 AM
830-2020032401
22kB
gmarco
03-24-20 03:01 AM
830-2020032205
22kB
gmarco
03-22-20 03:06 PM
830-2020032204
22kB
gmarco
03-22-20 08:23 AM
830-2020032203
22kB
gmarco
03-22-20 05:05 AM
830-2020032102
20kB
gmarco
03-21-20 01:52 AM
830-2020032101
20kB
gmarco
03-20-20 08:22 PM


Post A Reply Comment Options
Unread 03-25-20, 07:15 AM  
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 290
File comments: 244
Uploads: 42
Originally Posted by gmarco
Originally Posted by EKE
maybe you can use scroll function by QTip to limit max height

Ahhh what should be a simple addons of 10 rows now is begin to become a so big things ...

I really dont know it never exists the height param in libqtip.

Time to go to study I have some spare time in this period
Any samples or code snippet to read ?

Thanks so much
Ehm ...
So easy ...



This is a test using:

Lua Code:
  1. tooltip:UpdateScrolling(100)

I think really super easy ....
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Report comment to moderator  
Reply With Quote
Unread 03-25-20, 07:08 AM  
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 290
File comments: 244
Uploads: 42
Originally Posted by EKE
maybe you can use scroll function by QTip to limit max height

Ahhh what should be a simple addons of 10 rows now is begin to become a so big things ...

I really dont know it never exists the height param in libqtip.

Time to go to study I have some spare time in this period
Any samples or code snippet to read ?

Thanks so much
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Last edited by gmarco : 03-25-20 at 07:09 AM.
Report comment to moderator  
Reply With Quote
Unread 03-25-20, 06:25 AM  
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 33
File comments: 524
Uploads: 10
maybe you can use scroll function by QTip to limit max height
__________________
AltzUI Contributor for Feedback ONLY.

My Addon: EKPlates
Report comment to moderator  
Reply With Quote
Unread 03-25-20, 05:45 AM  
BNS
A Kobold Labourer
 
BNS's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 80
Uploads: 1
It would be perfect if the friend list could scroll up and down, the problem is solved. :=P
BTW, the translation you need
zhTW:
Code:
L["Show only playing Battle.net Friends"] = "僅顯示正在遊戲中的戰網好友"
zhCN:
Code:
L["Show only playing Battle.net Friends"] = "仅显示正在游戏中的战网好友"
Report comment to moderator  
Reply With Quote
Unread 03-25-20, 04:27 AM  
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 290
File comments: 244
Uploads: 42
too many bnet friends...

Some of my guild mates have so many bnet friends ...




and they asked me to filter the offline or not playing ...


So I done something like:



It breaks the config again ... I have to think about it before or later but for now go in the setting and reset to default

Ops the question:

Should be possible my friends to be this new strings be translated ?

Lua Code:
  1. L["Show only playing Battle.net Friends"] = ""

Sorry about to bother you directly.
Take care.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Last edited by gmarco : 03-25-20 at 04:29 AM.
Report comment to moderator  
Reply With Quote
Unread 03-24-20, 12:23 PM  
BNS
A Kobold Labourer
 
BNS's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 80
Uploads: 1
Originally Posted by gmarco
Hi BNS and EKE,

I dont understand what you are saying beetwen you

Can you confirm that these lines are ok ?

Lua Code:
  1. if LOCALE == "zhTW" then
  2.     -- Chinese translations by BNS
  3.     L["Right-Click"]        = "右鍵點擊"
  4.     L["Left-Click"]         = "左鍵點擊"
  5.     L["Middle-Click"]       = "中鍵點擊"
  6.     L["Show Guild"]         = "顯示公會"
  7.     L["Show Battle.net"]    = "顯示戰網"
  8.     L["Show FriendList"]    = "顯示好友名單"
  9.     L["Show Help"]          = "顯示幫助"
  10.     L["Show Guild Message"] = "顯示公會訊息"
  11.     L["Show Player Info"]   = "顯示有關玩家的資訊"
  12.     L["Note"]               = "註記"
  13.     L["Officer Note"]       = "幹部註記"
  14.     L["Achievements Points"]= "成就點數"
  15. return end
  16.  
  17. if LOCALE == "zhCN" then
  18.     -- Chinese translation by BNS & EKE
  19.     L["Right-Click"]        = "右键点击"
  20.     L["Left-Click"]         = "左键点击"
  21.     L["Middle-Click"]       = "中键点击"
  22.     L["Show Guild"]         = "显示公会"
  23.     L["Show Battle.net"]    = "显示战网"
  24.     L["Show FriendList"]    = "显示好友名单"
  25.     L["Show Help"]          = "显示帮助"
  26.     L["Show Guild Message"] = "显示公会信息"
  27.     L["Show Player Info"]   = "显示有关玩家的信息"
  28.     L["Note"]               = "注记"
  29.     L["Officer Note"]       = "官员注记"
  30.     L["Achievements Points"]= "成就点数"
  31. return end

Thanks so much of both of you ... really appreciated your help.
These translations are correct. zhCN has been corrected by EKE. After installing the latest version, the error no longer appears, and everything seems to be normal.
Report comment to moderator  
Reply With Quote
Unread 03-24-20, 08:12 AM  
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 290
File comments: 244
Uploads: 42
Hi BNS and EKE,

I dont understand what you are saying beetwen you

Can you confirm that these lines are ok ?

Lua Code:
  1. if LOCALE == "zhTW" then
  2.     -- Chinese translations by BNS
  3.     L["Right-Click"]        = "右鍵點擊"
  4.     L["Left-Click"]         = "左鍵點擊"
  5.     L["Middle-Click"]       = "中鍵點擊"
  6.     L["Show Guild"]         = "顯示公會"
  7.     L["Show Battle.net"]    = "顯示戰網"
  8.     L["Show FriendList"]    = "顯示好友名單"
  9.     L["Show Help"]          = "顯示幫助"
  10.     L["Show Guild Message"] = "顯示公會訊息"
  11.     L["Show Player Info"]   = "顯示有關玩家的資訊"
  12.     L["Note"]               = "註記"
  13.     L["Officer Note"]       = "幹部註記"
  14.     L["Achievements Points"]= "成就點數"
  15. return end
  16.  
  17. if LOCALE == "zhCN" then
  18.     -- Chinese translation by BNS & EKE
  19.     L["Right-Click"]        = "右键点击"
  20.     L["Left-Click"]         = "左键点击"
  21.     L["Middle-Click"]       = "中键点击"
  22.     L["Show Guild"]         = "显示公会"
  23.     L["Show Battle.net"]    = "显示战网"
  24.     L["Show FriendList"]    = "显示好友名单"
  25.     L["Show Help"]          = "显示帮助"
  26.     L["Show Guild Message"] = "显示公会信息"
  27.     L["Show Player Info"]   = "显示有关玩家的信息"
  28.     L["Note"]               = "注记"
  29.     L["Officer Note"]       = "官员注记"
  30.     L["Achievements Points"]= "成就点数"
  31. return end

Thanks so much of both of you ... really appreciated your help.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Report comment to moderator  
Reply With Quote
Unread 03-24-20, 07:37 AM  
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 290
File comments: 244
Uploads: 42
Code:
if client == BNET_CLIENT_WOW and wowProjectID ~= WOW_PROJECT_ID then
	realm == "" or "Classic"
end
The problem is I managed the classic version, but I wrongly assume I can ALT-click to invite them in party like others player with BNET_CLIENT_WOW clients




Now I am studying you precious input to adapt to my code

Thanks so much ! Really appreciated
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Last edited by gmarco : 03-24-20 at 07:38 AM.
Report comment to moderator  
Reply With Quote
Unread 03-24-20, 06:10 AM  
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 33
File comments: 524
Uploads: 10
Originally Posted by gmarco
Hi BNS,

I think the error is related to the fact that the api reports the client as WoW (like the retail) but not return the "realmName":

Lua Code:
  1. local realmName = "-" .. accountInfo.gameAccountInfo.realmName

So in this case I have to understand how to deal with this. In the meantime I try to fix the error and update the translations.

Thanks so much !
you can do something such like......this:
Code:
if client == BNET_CLIENT_WOW and wowProjectID ~= WOW_PROJECT_ID then
	realm == "" or "Classic"
end
or use accountInfo.gameAccountInfo.richPresence instead realmName.
__________________
AltzUI Contributor for Feedback ONLY.

My Addon: EKPlates
Last edited by EKE : 03-24-20 at 06:14 AM.
Report comment to moderator  
Reply With Quote
Unread 03-24-20, 06:01 AM  
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 290
File comments: 244
Uploads: 42
Originally Posted by BNS
Hi! I downloaded the latest version to test it. When I log in, I get an error, and then I can't display anything, including the guild and friends. The error is as follows:

Code:
3x gmGuildFriends\core.lua:282: attempt to concatenate field 'realmName' (a nil value)
[string "@gmGuildFriends\core.lua"]:282: in function <gmGuildFriends\core.lua:148>
[string "@gmGuildFriends\core.lua"]:439: in function `OnEnter'
[string "@Bazooka\Bazooka-v2.9.5.lua"]:1583: in function `showTip'
[string "@Bazooka\Bazooka-v2.9.5.lua"]:1388: in function <Bazooka\Bazooka.lua:1379>
Hi BNS,

I think the error is related to the fact that the api reports the client as WoW (like the retail) but not return the "realmName":

Lua Code:
  1. local realmName = "-" .. accountInfo.gameAccountInfo.realmName

So in this case I have to understand how to deal with this. In the meantime I try to fix the error and update the translations.

Thanks so much !
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Report comment to moderator  
Reply With Quote
Unread 03-24-20, 05:55 AM  
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 33
File comments: 524
Uploads: 10
Originally Posted by BNS
By the way, I updated the Chinese translation: (TW & CN)
Code:
if LOCALE == "zhCN" then
	-- Chinese translation by EKE
	L["Right-Click"] 		= "右键点击"
	L["Left-Click"] 		= "左键点击"
	L["Middle-Click"] 		= "中键点击"
	L["Show Guild"]			= "显示公会"
	L["Show Battle.net"]	= "显示战网"
	L["Show FriendList"]	= "显示好友名单"
	L["Show Help"]			= "显示帮助"
	L["Show Guild Message"]	= "显示公会讯息"
	L["Show Player Info"]	= "显示有关玩家的资讯"
	L["Note"]				= "注记"
	L["Officer Note"]		= "干部注记"
	L["Achievements Points"]= "成就点数"
return end
ZHCN 資訊/訊息(X) 信息(O) 幹部(X) 官員(O)
資訊跟信息的譯名可以算是Controlled vocabulary
但幹部跟官員是官譯就不一樣

L["Show Guild Message"] = "显示公会信息"
L["Show Player Info"] = "显示有关玩家的信息"
L["Note"] = "注记"
L["Officer Note"] = "官员注记"
L["Achievements Points"]= "成就点数"
__________________
AltzUI Contributor for Feedback ONLY.

My Addon: EKPlates
Last edited by EKE : 03-24-20 at 06:09 AM.
Report comment to moderator  
Reply With Quote
Unread 03-24-20, 04:25 AM  
BNS
A Kobold Labourer
 
BNS's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 80
Uploads: 1
Originally Posted by BNS
Hi! I downloaded the latest version to test it. When I log in, I get an error, and then I can't display anything, including the guild and friends. The error is as follows:

Code:
3x gmGuildFriends\core.lua:282: attempt to concatenate field 'realmName' (a nil value)
[string "@gmGuildFriends\core.lua"]:282: in function <gmGuildFriends\core.lua:148>
[string "@gmGuildFriends\core.lua"]:439: in function `OnEnter'
[string "@Bazooka\Bazooka-v2.9.5.lua"]:1583: in function `showTip'
[string "@Bazooka\Bazooka-v2.9.5.lua"]:1388: in function <Bazooka\Bazooka.lua:1379>

Locals:
self = BazookaPlugin_gmGuildFriends {
 0 = <userdata>
 tooltip = <unnamed> {
 }
 bzkPlugin = <table> {
 }
}
row = 29
col = nil
tooltip = <unnamed> {
 0 = <userdata>
 lines = <table> {
 }
 OnRelease = <function> defined @gmGuildFriends\core.lua:137
 headerFont = GameTooltipHeaderText {
 }
 cell_margin_v = 3
 scrollFrame = <unnamed> {
 }
 columns = <table> {
 }
 scrollChild = <unnamed> {
 }
 colspans = <table> {
 }
 width = 510.648125
 cell_margin_h = 6
 labelProvider = <table> {
 }
 autoHideTimerFrame = <unnamed> {
 }
 height = 390.129373
 regularFont = GameTooltipText {
 }
 OnLeave = <function> defined @gmGuildFriends\core.lua:142
 key = "gmGuildFriendstip"
}
numBNetTotal = 197
numBNetOnline = 84
numBNetFavorite = 0
numBNetFavoriteOnline = 0
bnet_color = <table> {
 b = "1"
 g = ".6"
 r = ".2"
}
numBNetTotal = 197
numBNetOnline = 84
numBNetFavorite = 0
numBNetFavoriteOnline = 0
(for index) = 11
(for limit) = 197
(for step) = 1
i = 11
accountInfo = <table> {
 isFriend = true
 isDND = false
 isFavorite = false
 gameAccountInfo = <table> {
 }
 accountName = "|Kq61|k"
 battleTag = "楊博麟#4803"
 note = ""
 rafLinkType = 0
 bnetAccountID = 101
 appearOffline = false
 customMessage = ""
 lastOnlineTime = 1585044545
 customMessageTime = 0
 isAFK = false
 isBattleTagFriend = true
}
bnetAccID = nil
account = "|Kq61|k"
isOnline = true
client = "WoW"
character = "Bolinyo"
btag = "楊博麟#4803"
timestamp = "24.03.20 18:09:05"
class = "獵人"
richPresence = "《魔獸世界》經典版"
(*temporary) = "-"
(*temporary) = nil
(*temporary) = nil
(*temporary) = "|TChatFrame\UI-ChatIcon-WOW:14:14:0:0|t|cffa9d271Bolinyo|r"
(*temporary) = "楊博麟#4803"
(*temporary) = "《魔獸世界》經典版"
(*temporary) = "attempt to concatenate field 'realmName' (a nil value)"
arg = <table> {
 24 = <table> {
 }
 25 = <table> {
 }
 7 = <table> {
 }
 27 = <table> {
 }
 28 = <table> {
 }
 26 = <table> {
 }
 19 = <table> {
 }
 20 = <table> {
 }
 21 = <table> {
 }
 22 = <table> {
 }
 23 = <table> {
 }
 6 = <table> {
 }
}
arg_note = <table> {
}
LibQTip = <table> {
 activeTooltips = <table> {
 }
 LabelPrototype = <table> {
 }
 tooltipHeap = <table> {
 }
 cellPrototype = <table> {
 }
 tableHeap = <table> {
 }
 providerMetatable = <table> {
 }
 providerPrototype = <table> {
 }
 onReleaseHandlers = <table> {
 }
 LabelProvider = <table> {
 }
 tipMetatable = <table> {
 }
 frameHeap = <table> {
 }
 IterateTooltips = <function> defined @BattlePetCount\Libs\LibQTip-1.0\LibQTip-1.0.lua:161
 CreateCellProvider = <function> defined @BattlePetCount\Libs\LibQTip-1.0\LibQTip-1.0.lua:258
 layoutCleaner = <unnamed> {
 }
 tipPrototype = <table> {
 }
 IsAcquired = <function> defined @BattlePetCount\Libs\LibQTip-1.0\LibQTip-1.0.lua:153
 Release = <function> defined @BattlePetCount\Libs\LibQTip-1.0\LibQTip-1.0.lua:142
 Acquire = <function> defined @BattlePetCount\Libs\LibQTip-1.0\LibQTip-1.0.lua:117
 cellMetatable = <table> {
 }
 frameMetatable = <table> {
 }
}
ADDON = "gmGuildFriends"
OnRelease = <function> defined @gmGuildFriends\core.lua:137
OnLeave = <function> defined @gmGuildFriends\core.lua:142
StatusIcon = ""
AwayIcon = "|TFriendsFrame\StatusIcon-Away:12:12:0:0:16:16:0:16:0:16|t "
DnDIcon = "|TFriendsFrame\StatusIcon-DnD:12:12:0:0:16:16:0:16:0:16|t "
classcolor = <function> defined @gmGuildFriends\core.lua:47
Button_OnClick = <function> defined @gmGuildFriends\core.lua:113
ShowNote = <function> defined @gmGuildFriends\core.lua:80
string_format = <function> defined =[C]:-1
LeftButton = " |TTUTORIALFRAME\UI-TUTORIAL-FRAME:13:11:0:-1:512:512:12:66:230:307|t "
RightButton = " |TTUTORIALFRAME\UI-TUTORIAL-FRAME:13:11:0:-1:512:512:12:66:333:411|t "
After looking at the error message, it seems to be related to the World of Warcraft Classic. It may be that I have friends from Battle.net playing the Classic Edition, just speculating.

By the way, I updated the Chinese translation: (TW & CN)
Code:
if LOCALE == "zhTW" then
	-- Chinese translations by BNS 
	L["Right-Click"] 		= "右鍵點擊"
	L["Left-Click"] 		= "左鍵點擊"
	L["Middle-Click"] 		= "中鍵點擊"
	L["Show Guild"]			= "顯示公會"
	L["Show Battle.net"]	= "顯示戰網"
	L["Show FriendList"]	= "顯示好友名單"
	L["Show Help"]			= "顯示幫助"
	L["Show Guild Message"]	= "顯示公會訊息"
	L["Show Player Info"]	= "顯示有關玩家的資訊"
	L["Note"]				= "註記"
	L["Officer Note"]		= "幹部註記"
	L["Achievements Points"]= "成就點數"
return end

if LOCALE == "zhCN" then
	-- Chinese translation by EKE
	L["Right-Click"] 		= "右键点击"
	L["Left-Click"] 		= "左键点击"
	L["Middle-Click"] 		= "中键点击"
	L["Show Guild"]			= "显示公会"
	L["Show Battle.net"]	= "显示战网"
	L["Show FriendList"]	= "显示好友名单"
	L["Show Help"]			= "显示帮助"
	L["Show Guild Message"]	= "显示公会讯息"
	L["Show Player Info"]	= "显示有关玩家的资讯"
	L["Note"]				= "注记"
	L["Officer Note"]		= "干部注记"
	L["Achievements Points"]= "成就点数"
return end
Report comment to moderator  
Reply With Quote
Unread 03-24-20, 02:37 AM  
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 290
File comments: 244
Uploads: 42
Originally Posted by EKE

if config max width in setcell() api provided by QTip, you can get auto word wrap.

:SetCell(lineNum, colNum, value[, font][, justification][, colSpan][, provider][, leftPadding][, rightPadding][, maxWidth][, minWidth][, ...])
Ah

I understand now.
Never seen this one.



Lua Code:
  1. if GMGUFRCFG[5][2] and GetGuildRosterMOTD() then
  2.     local width
  3.     if tooltip:GetWidth() > 200 then
  4.             width = tooltip:GetWidth() + 100
  5.     else
  6.         width = 300
  7.     end
  8.     row,col = tooltip:AddLine()
  9.     tooltip:SetCell(row,1,GetGuildRosterMOTD(),nil,"LEFT",4,nil, 0, 0, width)
  10.     tooltip:SetCellTextColor(row,1,0,1,0)
  11. end

Seems to works really nice.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Report comment to moderator  
Reply With Quote
Unread 03-24-20, 02:13 AM  
EKE
An Aku'mai Servant
 
EKE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 33
File comments: 524
Uploads: 10
Originally Posted by gmarco
With this code what are you trying to achieve ?

You do basically:

if the width of TT is bigger of 200 than sum it 100 else put it at 300.

And when you have make the width larger at least of 100 is the Libqtip that manages the long string wordwrap ?

I think the job is done by the format() but you didn't post.

I am asking because I am not able to replicate and understand well

Thanks.
https://github.com/EKE00372/diminfo/...Guild.lua#L103

if config max width in setcell() api provided by QTip, you can get auto word wrap.

https://www.wowace.com/projects/libq.../api-reference
:SetCell(lineNum, colNum, value[, font][, justification][, colSpan][, provider][, leftPadding][, rightPadding][, maxWidth][, minWidth][, ...])

I do a width manage because there's an issue happened when max width set to a value smaller than original tooltip width, but tooltip width will real-time change by member's zone name
__________________
AltzUI Contributor for Feedback ONLY.

My Addon: EKPlates
Last edited by EKE : 03-24-20 at 02:55 AM.
Report comment to moderator  
Reply With Quote
Unread 03-23-20, 10:59 PM  
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 290
File comments: 244
Uploads: 42
[quote=gmarco]
Originally Posted by EKE
as my exprience, cut line by your custom api will make Guild MotD strange -- at least in zh locale will be strange-- i think it happened because UTF-8

i do this to config width:
Code:
local width
if tooltip:GetWidth() > 200 then
	width = tooltip:GetWidth() + 100
else
	width = 300
end

local y, x = tooltip:AddLine()
tooltip:SetCell(y, 1, format(guildMotD), nil, "LEFT", 2, nil, 0, 0, width)
Hi EKE,

after seeing the screenshots I understand the problem.
My custom function try to divide the loooong string in substrings of max 69 chars using space as separators. The problem here is that your code don't divide where space are but divide in a place where for me there is no spaces.

Here:




Lua Code:
  1. local width
  2. if tooltip:GetWidth() > 200 then
  3.     width = tooltip:GetWidth() + 100
  4. else
  5.     width = 300
  6. end
  7.  
  8. local y, x = tooltip:AddLine()
  9. tooltip:SetCell(y, 1, format(guildMotD), nil, "LEFT", 2, nil, 0, 0, width)

With this code what are you trying to achieve ?

You do basically:

if the width of TT is bigger of 200 than sum it 100 else put it at 300.

And when you have make the width larger at least of 100 is the Libqtip that manages the long string wordwrap ?

I think the job is done by the format() but you didn't post.

I am asking because I am not able to replicate and understand well

Thanks.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Last edited by gmarco : 03-23-20 at 11:03 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: