1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 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 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 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 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
CHAT_OPTIONS = nil
local FILTERS_PER_ROW = 2
local GUILDS_PER_ROW = 2
--defines channels to be combined under one button
local COMBINED_CHANNELS = {
[ CHAT_CATEGORY_WHISPER_INCOMING ] = { parentChannel = CHAT_CATEGORY_WHISPER_INCOMING , name = SI_CHAT_CHANNEL_NAME_WHISPER } ,
[ CHAT_CATEGORY_WHISPER_OUTGOING ] = { parentChannel = CHAT_CATEGORY_WHISPER_INCOMING , name = SI_CHAT_CHANNEL_NAME_WHISPER } ,
[ CHAT_CATEGORY_MONSTER_SAY ] = { parentChannel = CHAT_CATEGORY_MONSTER_SAY , name = SI_CHAT_CHANNEL_NAME_NPC } ,
[ CHAT_CATEGORY_MONSTER_YELL ] = { parentChannel = CHAT_CATEGORY_MONSTER_SAY , name = SI_CHAT_CHANNEL_NAME_NPC } ,
[ CHAT_CATEGORY_MONSTER_WHISPER ] = { parentChannel = CHAT_CATEGORY_MONSTER_SAY , name = SI_CHAT_CHANNEL_NAME_NPC } ,
[ CHAT_CATEGORY_MONSTER_EMOTE ] = { parentChannel = CHAT_CATEGORY_MONSTER_SAY , name = SI_CHAT_CHANNEL_NAME_NPC } ,
}
-- defines channels to skip when building the filter (non guild) section
local SKIP_CHANNELS = {
[ CHAT_CATEGORY_SYSTEM ] = true ,
[ CHAT_CATEGORY_GUILD_1 ] = true ,
[ CHAT_CATEGORY_GUILD_2 ] = true ,
[ CHAT_CATEGORY_GUILD_3 ] = true ,
[ CHAT_CATEGORY_GUILD_4 ] = true ,
[ CHAT_CATEGORY_GUILD_5 ] = true ,
[ CHAT_CATEGORY_OFFICER_1 ] = true ,
[ CHAT_CATEGORY_OFFICER_2 ] = true ,
[ CHAT_CATEGORY_OFFICER_3 ] = true ,
[ CHAT_CATEGORY_OFFICER_4 ] = true ,
[ CHAT_CATEGORY_OFFICER_5 ] = true ,
}
-- defines the ordering of the filter categories
local CHANNEL_ORDERING_WEIGHT = {
[ CHAT_CATEGORY_SAY ] = 10 ,
[ CHAT_CATEGORY_YELL ] = 20 ,
[ CHAT_CATEGORY_WHISPER_INCOMING ] = 30 ,
[ CHAT_CATEGORY_PARTY ] = 40 ,
[ CHAT_CATEGORY_EMOTE ] = 50 ,
[ CHAT_CATEGORY_MONSTER_SAY ] = 60 ,
[ CHAT_CATEGORY_ZONE ] = 80 ,
[ CHAT_CATEGORY_ZONE_ENGLISH ] = 90 ,
[ CHAT_CATEGORY_ZONE_FRENCH ] = 100 ,
[ CHAT_CATEGORY_ZONE_GERMAN ] = 110 ,
[ CHAT_CATEGORY_ZONE_JAPANESE ] = 120 ,
[ CHAT_CATEGORY_ZONE_RUSSIAN ] = 130 ,
}
--[[ Chat Options Panel ]] --
return options
end
{
title =
{
} ,
buttons =
{
{
end ,
} ,
{
end ,
} ,
}
} )
end
end
end
end
end
end
end
end
end
local leftPrimaryCategory = left . channels [ 1 ]
local rightPrimaryCategory = right . channels [ 1 ]
local leftWeight = CHANNEL_ORDERING_WEIGHT [ leftPrimaryCategory ]
local rightWeight = CHANNEL_ORDERING_WEIGHT [ rightPrimaryCategory ]
if leftWeight and rightWeight then
return leftWeight < rightWeight
elseif not leftWeight and not rightWeight then
return false
elseif leftWeight then
return true
end
return false
end
do
local FILTER_PAD_X = 90
local FILTER_PAD_Y = 0
local FILTER_WIDTH = 150
local FILTER_HEIGHT = 27
local INITIAL_XOFFS = 0
local INITIAL_YOFFS = 0
--generate a table of entry data from the chat category header information
local entryData = { }
local lastEntry = CHAT_CATEGORY_HEADER_COMBAT - 1
for i = CHAT_CATEGORY_HEADER_CHANNELS , lastEntry do
if ( COMBINED_CHANNELS [ i ] == nil ) then
entryData [ i ] =
{
channels = { i } ,
}
else
--create the entry for those with combined channels just once
local parentChannel = COMBINED_CHANNELS [ i ] . parentChannel
if ( not entryData [ parentChannel ] ) then
entryData [ parentChannel ] =
{
channels = { } ,
}
end
end
end
end
--now generate and anchor buttons
local sortedEntries = { }
sortedEntries [ # sortedEntries + 1 ] = entry
end
filter . key = key
ZO_Anchor_BoxLayout ( filterAnchor , filter , count , FILTERS_PER_ROW , FILTER_PAD_X , FILTER_PAD_Y , FILTER_WIDTH , FILTER_HEIGHT , INITIAL_XOFFS , INITIAL_YOFFS )
end
end
local GUILD_PAD_X = 90
local GUILD_PAD_Y = 0
local GUILD_WIDTH = 150
local GUILD_HEIGHT = 90
-- setup and anchor the guild sections
local maxGuild = CHAT_CATEGORY_HEADER_GUILDS + MAX_GUILDS - 1
for k = CHAT_CATEGORY_HEADER_GUILDS , maxGuild do
guild . key = key
guildButton . channels = { k }
local officerChannel = k + MAX_GUILDS
officerButton . channels = { officerChannel }
ZO_Anchor_BoxLayout ( guildAnchor , guild , count , GUILDS_PER_ROW , GUILD_PAD_X , GUILD_PAD_Y , GUILD_WIDTH , GUILD_HEIGHT , INITIAL_XOFFS , INITIAL_YOFFS )
end
end
end
if ( guildName ~= "" ) then
else
end
end
end
end
end
-- If options are switched before closing the window, allow the previously selected window to fade out...
end
-- Iterate each button's channel list and check just the first entry in each as they are all toggled together
else
end
end
end
end
--set all channel buttons selected active
end
end
end
end
end
--[[ XML Handlers ]] --
end
end
end
local channels = buttonControl . channels
end
end |