diff --git a/NoSoliciting.Trainer/data.csv b/NoSoliciting.Trainer/data.csv index 58bc8dc..b511953 100755 --- a/NoSoliciting.Trainer/data.csv +++ b/NoSoliciting.Trainer/data.csv @@ -9,6 +9,7 @@ COMMUNITY,0,"Deep Dungeons Discord for Potd/Hoh runs/loot/clears. 4500+ ppl. Mar COMMUNITY,0,"discord.gg/clubxiv, come join ""The Clubhouse"" the foremost social club on Primal: all about friendship. " COMMUNITY,0,"Enjoy discussions, events, help, and more at the (official) FFXIV Gilgamesh Discord Server https://discord.gg/MzyYXPdvre " COMMUNITY,0,Enjoying PvP? Want a welcoming / growing community? Join us :) discord.gg/pvprevival +COMMUNITY,0,Enjoying Rival Wings but want more pops? Join us! We queue nightly at 9PM EST discord.gg/pvprevival COMMUNITY,0,FFXIV Gilgamesh Discord Server- https://discord.gg/MzyYXPdvre COMMUNITY,0,Free Blu Power Leveling to 60! 30m-ish depending on level. Blu Discord for upcoming/old content: https://discord.gg/NaTP2drE3E COMMUNITY,0,Gayorzea is a friendly & welcoming Discord community for LGBTQ XIV players! Join at: https://discord.gg/gayorzea @@ -34,7 +35,9 @@ COMMUNITY,0,New discord server for the Gilgamesh community! Join at www.discord. COMMUNITY,0, : A dating/social FFXIV community is looking for new members/singles! https://discord.gg/GjJD6Yr COMMUNITY,11," matches on and at 7 pm ST (server time) ! - Join us via to get those elusive magitek gorilla mounts ! https://discord.gg/revivalwings" COMMUNITY,11,★★ Want all your hunting notifications relayed to you by a sweetly seductive mooing cow? Join Faloop today and get pings directly from you local spawners and train conductors!★★ https://discord.gg/wQt8yzE +COMMUNITY,11,FFXIV Sanctuary is a discord where those with anxiety and disabilities can have a safe place to enjoy all this game has to offer without fear of judgement! COMMUNITY,11,"If you want to be notified about trains, S Ranks or Special Achievement Fates, join the Faloop discord today. No Bots, just people working hard: https://discord.gg/wQt8yzE" +COMMUNITY,11,Too shy to join right away? Thats ok! Join our fellowship called Anxiety Safehouse FF14 Sanctuary and join when you're ready! Find us in the Fellowship finder! FC,0,"«ToC» recruiting active members. Join the party, send me a /Tell or stop by the FC house (Goblet P13, W19) for more information." FC,0,((Looking for paragraph roleplay guild to join. Son of Ignis Scieintia/OC FFXV/FFXIV/Crossover. No Erp. )) FC,0,"[Eye of the Storm] Looking for an established, small, mature but funloving family FC? C'mon in and say hello! " @@ -237,7 +240,11 @@ NORMAL,0,2 Chest clear - Happy brambles / TH NW - DPS SE / Boss relative interco NORMAL,0,2 Chest Clear. JP Strat VG3. Gp 1 - NW | Gp 2 - SE | DPS ADJUST. NORMAL,0,2 Chest enrage to clear .group 1 = NW/Left group 2 = SE/Right. jp strat NORMAL,0,2 chest lighting N fire S safe stay know the mechs don't join if you don't have the dps fuck off if you are looking for one pull clear +NORMAL,0,2 chest reclear | G1 AB G2 CD | DS TITAN | Line Lion W safe | TPS | fun times only +NORMAL,0,"2 Chest Reclear Party - Blue Uptime, Braindead Sundered " +NORMAL,0,"2 Chest weekly, Happy brambles T/H N/E" NORMAL,0,2 Chest. Discord available for callouts. E11S after for those who are interested. +NORMAL,0,2 Chests e9-11s Reclears. Happy TH NE. JP VG2. Braindead Fox BluUptime NORMAL,0,"2-2-2-2, phase 2 prog, got some vets, seen enrage" NORMAL,0,2-chest clear run II Standard PF strats II Know the mechs or you will be asked to leave NORMAL,0,2/2/2/2 Learning party with hopes of a full clear. We keep it chill. @@ -261,6 +268,7 @@ NORMAL,0,another day another camp on the finder! u know the drill by now bahapro NORMAL,0,Any Chest Clear Party l TPS l Line Lions l Shadow Titan l T/H ccw NORMAL,0,Any chest~Clear party~braindead~t/h rotate~color~sword up = in NORMAL,0,anyone else starting to prefer those bot rmt shouts over those rp advert shouts? +NORMAL,0,"AoT chapter 139 does not exist, it cant hurt you" NORMAL,0,Are you sad or lonely? Need some advice? To vent? Or just want a place to come chill? Then come on in. NORMAL,0,Artifact Farming Experienced players welcome NORMAL,0,Ballafell Tournament TONIGHT! Consensual lalafell pushing! INFO: https://ffxiv.pf-n.co/ballafell.png @@ -271,6 +279,7 @@ NORMAL,0,"Best friends forever, final lap for anima weapon" NORMAL,0,"best ult don't @ me, one not-cleared" NORMAL,0,Bili clean up / Dwayne / T H CW :3 NORMAL,0,Bili lions and onwards. +NORMAL,0,bj/cc prog split strat UPR: https://discord.gg/9EJBfvDR NORMAL,0,"Blind learning for some friends, others who want to learn also welcome. Can explain only if people want" NORMAL,0,BLU - Glower #10 NORMAL,0,BLU #15 - Sharpened Knife @@ -295,9 +304,11 @@ NORMAL,0,"Bonding ceremony tonight at 8pm est. Join party if you want an invite/ NORMAL,0,"chill farm, no rotate" NORMAL,0,Cinder prog for the fc all are welcome no salt! :D NORMAL,0,Cleaning up to heart phase. Tank swap at 2 stacks. +NORMAL,0,Clear 4 1 Happy strat 2 chest NORMAL,0,clear party • braindead sundered • blue uptime • fox mist NORMAL,0,CLEAR PARTY!!!!!!!!! COME JOIN!!!!!!!! LOVE YOU ALL <33333333333 NORMAL,0,"Clearing for a friend, also come get your dragon " +NORMAL,0,"Cluster&Fragment farm 2/2/2/1/1 (4 x tank + 3 x dps + 1 x healer) 1st 2nd 3rd(tank+dps) Bot,Mid&Top 4th tank spirits healer s-ranks " NORMAL,0,come 2's and chill NORMAL,0,Come bonk the pope to get your bird NORMAL,0,come for weapons and dragons :) 4/4 orbs please @@ -317,12 +328,14 @@ NORMAL,0,Deltascape4.0 WT - - usnynced NORMAL,0,Discord me for  irl Feet pics ruby#0201 AFK can't see tells NORMAL,0,Discord required. Stratbox available for G1 G2. No salt. All good times. NORMAL,0,Does anyone have an indoor marketplace in their house? I'd appreciate the inspiration if you're willing to let me take a look :) +NORMAL,0,dogs and mats and worms NORMAL,0,Doin runs from 21-30. Idm any class/gear. Just need Empyean. NORMAL,0,Doing Art commission of your charactet with good price! more info add me on discord: d0uglaz#7409 ♥ NORMAL,0,doing final floor of each savage fight to unlock ultimates NORMAL,0,draggo farm NORMAL,0,"Draggo Farm, T/H CW partners (CW SMN) , DPS towers, NIN uptime, N= 1-4 E= 2-5 S= 3-7 W=4-8 BLM" NORMAL,0,Duo doodling! Get your portrait drawn by Tori and Aphi! https://picarto.tv/aphi Join party for portrait queue! Ada Limsa +NORMAL,0,"E10-12s, stay at least for e11s, go in go out quick kills" NORMAL,0,e10s learning party jp vg2 NORMAL,0,e10s teaching party. Voidgate 1 prog for everyone except me. Discord recommended. Group 1 CCW from N and Left Wall Relativ NORMAL,0,"e11 weekly 2 chests, sword up = in" @@ -365,6 +378,7 @@ NORMAL,0,from VG2 (to kill) NORMAL,0,Gemstone Farming and Ranking!!! All is welcome ^^ come and join! ♥ NORMAL,0,Get custom pictures of your character! Follow link for detail! https://rsppictures.carrd.co/ NORMAL,0,"Glam and TEA gear " +NORMAL,0,Going for the clear G1 N ccw G2 Ne cw Looking at wall group 1 left group 2 right JP vg2 NORMAL,0,Got stuck in combat and missed my 40 minute queue. Any chance someone wants to help? ;w; NORMAL,0,Group 6/8 training Junction Shiva and titan NORMAL,0,Handing out FREE fashion report gear at the Gilgamesh Gold Saucer! Just need a level 40 DoW! @@ -489,8 +503,10 @@ NORMAL,0,Practise platform and onward! NORMAL,0,"Prog group. 4:4, Saw phase 2 enrage" NORMAL,0,Prog to Clear | Pairs | Vets welcome | Helping FC mates NORMAL,0,"Prog, new and experienced players present, discord w/ callouts available. Healer south/dps behind boss for gaols." +NORMAL,0,pug strats 2 chest e9-e10 clear NORMAL,0,quick 9-11 reclears then 12s p2 prog NORMAL,0,"R > Crossworld Linkshell dedicated to doing Castrum! Get your clears, come farm for the title, or because it's fun. Join for inv!" +NORMAL,0,"recruiting TEA party, (not a static), Must have cleared ES12, aiming to run Fri-sat around 9-10 ish pm" NORMAL,0,Running 10 times for scales. Come hang! NORMAL,0,Seen Enrage. 2-Chest Clear Party. NORMAL,0,Shared fate farming if anyone wants to join. @@ -1659,6 +1675,7 @@ NORMAL,11,And send them superchats. NORMAL,11,And sending death threats to the company? NORMAL,11,Another bullet dodged. Enjoy! NORMAL,11,Any FATE parties with open spot? +NORMAL,11,any info on castrum? NORMAL,11,any open partis for the support fate? NORMAL,11,anyone have a house in goblet either fc or personal that i may use to teleport to it add me as a friend ; ; NORMAL,11,"Anyone looking Kian, you find them here" @@ -1746,6 +1763,7 @@ NORMAL,11,"If someone offered to tell you accurately exactly where you'd be in 2 NORMAL,11,"If you don't arrive, we will create the ideal Caramel Mocha." NORMAL,11,"If you don't come within the next three minutes, I will claim her for myself!" NORMAL,11,if you see a guy called debug testdata please say hello he is NEW +NORMAL,11,"If you wish to join, please let me know." NORMAL,11,ill check them out NORMAL,11,"im being bullied in stream by chat, they are telling me 1 level in an hour and a half is little" NORMAL,11,Im fine. Just had a bunch of discord people making fun of my abusive situation in a discord fc chat. @@ -1799,6 +1817,7 @@ NORMAL,11,not with the way some people tip in RP bars NORMAL,11,okay which city is better: Los Angeles or New York? NORMAL,11,omg let's rp jhin and rakan in bot lane >///< NORMAL,11,Our wedding is on 12/27 at 6pm EST . we are passing out invitations for all who are interested +NORMAL,11,ovni should pop if you are interested NORMAL,11,php mains need not apply NORMAL,11,POSTURE IS NO JOKE - YOU ONLY GET ONE BACK NORMAL,11,"RDM is still the standard ""easy mode"" for figuring out PotD though, if you can do that then you're more suited to experiment with new classes, tbh less than 20 people have cleared PotD solo on just about every server" @@ -1871,6 +1890,7 @@ NORMAL,11,Which Ranger team is your favorite? NORMAL,11,WHM looking for an invite NORMAL,11,why NORMAL,11,why be sorry? It was a placeholder FC. +NORMAL,11,Why So I can get kicked out of another FC for BS reasons? NORMAL,11,why would you willingly ride in something like that NORMAL,11,will he take an existing job or will he grab whichever of the new jobs is a DPS NORMAL,11,"will pay 50k for tank to speed up queue timer, dm if interested" @@ -1905,6 +1925,7 @@ NORMAL,30,How do you avoid doom in the new BLU stage? NORMAL,30,I DID NOT MARRY A CATBOI NORMAL,30,I MARRIED KAINE LAFORENZE THE AU RA NOT CATBOI NORMAL,30,I NO LONGER GO BY THAT NAME NO MORE +NORMAL,30,if you have spaces hurry up and invite NORMAL,30,join Vivian Infinity's party for e9s prog! looking for awesome melee DPS :D NORMAL,30,May I also get a big hug from Goth Mom?? NORMAL,30,"PSA: If your SCH has Eos out, you need new scholar" @@ -2066,6 +2087,7 @@ RMT_C,0,"● MIN M AX Ø | ❶ Loot & Mounts (New Savage, Ultimates RMT_C,0,☀5.4 Pre-orders☀Savage☀Trials☀Ultimates☀BLU 「DISCORD」⇒ Meliora#2500 RMT_C,0,♥ Eden's Promise (☆ i530/i535 ☆) - DR Savage - TEA/UwU/UCoB - Mounts and more | Discord: gin#9999 RMT_C,0,♥ Eden's Promise (☆ i530/i535 ☆) - TEA/UwU/UCoB - Mounts and more | Discord: gin#9999 +RMT_C,0,♥ GIL ONLY ♥ Eden's Promise 9-12 and others! Discord: Ririka#3508 RMT_C,0,♥ SELLING ♥ Eden's Promise (☆ i530/i535 ☆) - DR Savage - TEA/UwU/UCoB - Mounts and more | Discord add me: gin#5147 RMT_C,0,♥ SELLING ♥ Eden's Promise (☆ i530/i535 ☆) - DR Savage - TEA/UwU/UCoB - Mounts and more | Discord add me: gin#5147 RMT_C,0,♥ SELLING ♥ Eden's Promise (☆ i530/i535 ☆) - DR Savage - TEA/UwU/UCoB - Mounts and more | Discord add me: gin#5147 @@ -2142,6 +2164,7 @@ RMT_G,11,"Seach pvp and bank on google,5 Min Delivery For Gil ! Resistance 5 RMT_G,11,"Seach pvp and bank on google,5 Min Delivery For Gil ! Resistance 500 (5 slots) Weapons & Skysteel 500 Crafting Tools & Eden Verse (savage) Full Loot clear ! Cheap & Safety Guarantee!【Code: 714 ,5% OFF 】!!!-sqkaf" RMT_G,11,"Seach pvp and bank on google,5 Min Delivery For Gil ! Resistance 500 (5 slots) Weapons & Skysteel 500 Crafting Tools & Eden Verse (savage) Full Loot clear ! Cheap & Safety Guarantee!【Code: 714 ,5% OFF 】!!!-ztdyu" RMT_G,13,If u need Mogstation iteams ,U can check here (bymmogame-c o m,only need $ 5. ^_^ -1111 +RP,0," [SFW]VLVT DRMS|Club&Bar|CASINO NIGHTJenLavBedsW8P32|https://discord.gg/WKVGj9PSNm" RP,0," ★   ★ TONIGHT! 10EST ★ Coeurl, GB, W14, P35" RP,0," ♥|UNITY| SNEAK PEAK |6 DJ's| Charity Event 4 Rescue Animals Hosted by | PINK | Mat.Shiro.W18.P7 | 8PM-2AM EST| VIBE // TRIBE|" RP,0," World of Wonders Cafe 3pm-6pm est Mat,shiro,w16p40. Come enjoy some of the finest food and drinks in Eorzea!" @@ -2630,6 +2653,7 @@ RP,0,"Looking for adventure? Bounties, work, odd jobs? Join Bounty Call! M RP,0,"Looking for adventure? Bounties, work, odd jobs? Join Bounty Call! More info in our discord: https://discord.gg/SnjZWRf" RP,0,"  - [RP-21+] Pub,Drinks,Live Music [Goblin/Goblet/W22/P8] Open Now" RP,0,"  is currently hiring rp-oriented persons as bartenders, dancers https://forms.gle/eGXsHKcjkLJh33qj9" +RP,0,Chimeric Accord is helping augmented or synthetic entities find their place in the world. Non-FC rp group. carp.crd.co RP,0,"Come be a part of our inclusive, wholesome, sexy family.♥ PBM - Now Hiring ♥ playboymansion.info/recruitment" RP,11,[18+RP] ☆'☆ 10pm-1am EST Birthday Party♥Dancers♥Casino♥(Coeurl LBW16 P36) RP,11,"[Coeurl - 18+RP] Foxy's Night Club, we're open tonight from 10pm - 1am EST. Celebrating a birthday at midnight tonight!" @@ -2861,6 +2885,7 @@ STATIC,0,semi serious casual static looking for dps. on e11s enrage. Tues and th STATIC,0,Semi-Hardcore Static LF1M for 5.4 Raids. phys-rng/melee. M/T/F/Sat 8pm est. STATIC,0,SoftCore no Salt Static LF frontline dps replacement. Working on Tiles E9S. Monday/Thursday 9-11 EST. join/tell intrest STATIC,0,"starting a tea static, send a tell if ur interested :D" +STATIC,0,"Static 7/8 LF Shield Healer. Fri:830p-1030p, Sat:5p-7p EST. Raid exp required. Discord required. --- AFK, pls DM HapaMuffin#3956" STATIC,0,Static LF 1 Healer and 1 Phys. Ranged DPS. We are on Hot/Cold enrage. Sun/Tues/Fri 9pm-1am EST. /tell or DM Makar#0501 STATIC,0,"Static LF 1 non-nin melee DPS, 7:30pm - 9:30pm EST Tues - Thurs, currently on e12 phase 1, discord Snow#6988 for info" STATIC,0,"Static lf 2 healers for 12S P1. Seen to Lions. Contact Cass#1413 on discord for more info. T, Thr, F 7PM-10PM EST" @@ -2917,8 +2942,10 @@ STATIC_SUB,0,E9-11s 2 chest Regular pug stuff will clarify inside STATIC_SUB,0,"E9-11S weekly Farm Clears, Please Stay for all 3, 2 Chest Only. 7/8 Static" STATIC_SUB,0,healer needed for 7/8 static at 8:30pm PT - e12s after - pug strats STATIC_SUB,0,LF 1 sub for ttonight for E10S clear @ 8 PM PST. We r on 2nd towers. Jobs below! Maybe AFK. Calli#0027 on disc :) +STATIC_SUB,0,LF one melee for our groups reclear of e12s tonight 8est :) Uptime strat for lions STATIC_SUB,0,LF regen healer sub for fresh eternity prog tonight at 7pm est-10pm. Currently /busy for a house but can discord // Rizzard#3135 STATIC_SUB,0,"LF sub for tonight, 10.30pm-12.30am pst, for e10s clear, 2 chest, discord nech#7777" +STATIC_SUB,0,LF1M sub for E9S - E11S reclears @ 7pm PST / 9pm CST / 10pm EST 2 chest - Melee preferred STATIC_SUB,0,Lions clean up / standard pug strats / discord / 7/8 static missing a healer. starting at 7:00 eastern. i might be AFK. STATIC_SUB,0,"MC Static LF1M, potential 1 Sub for 5.4 Savage. M/T 9pm-12am est, TH 10pm-1am est." STATIC_SUB,0,"Need a tank and a caster for a static fill for tonight 8pm cst for 9 & 10s, dm me at Lulu#4444 " @@ -3054,6 +3081,7 @@ TRADE,0,Selling 510  sets 900k (Weapon upon request) // Individual prices av TRADE,0,Selling 510  sets 900k // Individual prices available // Join Party // TRADE,0,Selling a Mist Medium relocation on bryn. Plot 37 join/tell offers. TRADE,0,Selling any 490HQ set (lower then mb!) +TRADE,0,selling bahamut miniature (not mog) 3mil /tell or join TRADE,0,Selling Bozjan Runner's Secrets head and hand gear. Name your price per. Thorne Dynasty Mantelshelf 1.5 mil. Please join party. TRADE,0,"Selling Calfskin jacket/pants 1m ea, boots/hat/gloves 550k ea PM me" TRADE,0,Selling Calfskin Rider's Jacket for 900k! Join PF in interested :D diff --git a/NoSoliciting/ILRepack.targets b/NoSoliciting/ILRepack.targets index 7b9a61a..e0736c7 100644 --- a/NoSoliciting/ILRepack.targets +++ b/NoSoliciting/ILRepack.targets @@ -14,7 +14,7 @@ Parallel="true" Internalize="true" InputAssemblies="@(InputAssemblies)" - LibraryPath="$(OutputPath)" + LibraryPath="$(OutputPath);$(AppData)\XIVLauncher\addon\Hooks\dev" TargetKind="Dll" OutputFile="$(OutputPath)\$(AssemblyName).dll" /> diff --git a/NoSoliciting/Interface/Report.cs b/NoSoliciting/Interface/Report.cs index 9fd1793..fc52a56 100755 --- a/NoSoliciting/Interface/Report.cs +++ b/NoSoliciting/Interface/Report.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Net; @@ -13,6 +12,13 @@ using ImGuiNET; namespace NoSoliciting.Interface { public class Report { + private const ImGuiTableFlags TableFlags = ImGuiTableFlags.Borders + & ~ImGuiTableFlags.BordersOuterV + | ImGuiTableFlags.PadOuterX + | ImGuiTableFlags.RowBg + | ImGuiTableFlags.SizingFixedFit + | ImGuiTableFlags.ScrollY; + private Plugin Plugin { get; } private ReportStatus LastReportStatus { get; set; } = ReportStatus.None; @@ -77,42 +83,43 @@ namespace NoSoliciting.Interface { return; } - float[] maxSizes = {0f, 0f, 0f, 0f}; - if (ImGui.BeginChild("##chat-messages", new Vector2(-1, -1))) { - ImGui.Columns(5); + if (ImGui.BeginTable("nosol-chat-report-table", 5, TableFlags)) { + ImGui.TableSetupColumn("Timestamp"); + ImGui.TableSetupColumn("Channel"); + ImGui.TableSetupColumn("Reason"); + ImGui.TableSetupColumn("Sender"); + ImGui.TableSetupColumn("Message", ImGuiTableColumnFlags.WidthStretch); + ImGui.TableSetupScrollFreeze(0, 1); + ImGui.TableHeadersRow(); - AddRow(maxSizes, "Timestamp", "Channel", "Reason", "Sender", "Message"); - ImGui.Separator(); + foreach (var message in this.Plugin.MessageHistory) { + ImGui.TableNextRow(); - foreach (var message in this.Plugin.MessageHistory) { - if (message.FilterReason != null) { - ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(238f / 255f, 71f / 255f, 71f / 255f, 1f)); + if (message.FilterReason != null) { + ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(238f / 255f, 71f / 255f, 71f / 255f, 1f)); + } + + var sender = message.Sender.Payloads + .Where(payload => payload.Type == PayloadType.RawText) + .Cast() + .Select(payload => payload.Text) + .FirstOrDefault() ?? ""; + + if (AddRow(message.Timestamp.ToString(CultureInfo.CurrentCulture), message.ChatType.Name(this.Plugin.Interface.Data), message.FilterReason ?? "", sender, message.Content.TextValue)) { + ImGui.OpenPopup($"###modal-message-{message.Id}"); + } + + if (message.FilterReason != null) { + ImGui.PopStyleColor(); + } + + this.SetUpReportModal(message); } - var sender = message.Sender.Payloads - .Where(payload => payload.Type == PayloadType.RawText) - .Cast() - .Select(payload => payload.Text) - .FirstOrDefault() ?? ""; - - if (AddRow(maxSizes, message.Timestamp.ToString(CultureInfo.CurrentCulture), message.ChatType.Name(this.Plugin.Interface.Data), message.FilterReason ?? "", sender, message.Content.TextValue)) { - ImGui.OpenPopup($"###modal-message-{message.Id}"); - } - - if (message.FilterReason != null) { - ImGui.PopStyleColor(); - } - - this.SetUpReportModal(message); + ImGui.EndTable(); } - for (var idx = 0; idx < maxSizes.Length; idx++) { - ImGui.SetColumnWidth(idx, maxSizes[idx] + ImGui.GetStyle().ItemSpacing.X * 2); - } - - ImGui.Columns(1); - ImGui.EndChild(); } @@ -140,42 +147,42 @@ namespace NoSoliciting.Interface { } #endif - float[] maxSizes = {0f, 0f, 0f}; - if (ImGui.BeginChild("##pf-messages", new Vector2(-1, -1))) { - ImGui.Columns(4); + if (ImGui.BeginTable("nosol-pf-report-table", 4, TableFlags)) { + ImGui.TableSetupColumn("Timestamp"); + ImGui.TableSetupColumn("Reason"); + ImGui.TableSetupColumn("Host"); + ImGui.TableSetupColumn("Description", ImGuiTableColumnFlags.WidthStretch); + ImGui.TableSetupScrollFreeze(0, 1); + ImGui.TableHeadersRow(); - AddRow(maxSizes, "Timestamp", "Reason", "Host", "Description"); - ImGui.Separator(); + foreach (var message in this.Plugin.PartyFinderHistory) { + ImGui.TableNextRow(); - foreach (var message in this.Plugin.PartyFinderHistory) { - if (message.FilterReason != null) { - ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(238f / 255f, 71f / 255f, 71f / 255f, 1f)); + if (message.FilterReason != null) { + ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(238f / 255f, 71f / 255f, 71f / 255f, 1f)); + } + + var sender = message.Sender.Payloads + .Where(payload => payload.Type == PayloadType.RawText) + .Cast() + .Select(payload => payload.Text) + .FirstOrDefault() ?? ""; + + if (AddRow(message.Timestamp.ToString(CultureInfo.CurrentCulture), message.FilterReason ?? "", sender, message.Content.TextValue)) { + ImGui.OpenPopup($"###modal-message-{message.Id}"); + } + + if (message.FilterReason != null) { + ImGui.PopStyleColor(); + } + + this.SetUpReportModal(message); } - var sender = message.Sender.Payloads - .Where(payload => payload.Type == PayloadType.RawText) - .Cast() - .Select(payload => payload.Text) - .FirstOrDefault() ?? ""; - - if (AddRow(maxSizes, message.Timestamp.ToString(CultureInfo.CurrentCulture), message.FilterReason ?? "", sender, message.Content.TextValue)) { - ImGui.OpenPopup($"###modal-message-{message.Id}"); - } - - if (message.FilterReason != null) { - ImGui.PopStyleColor(); - } - - this.SetUpReportModal(message); + ImGui.EndTable(); } - for (var idx = 0; idx < maxSizes.Length; idx++) { - ImGui.SetColumnWidth(idx, maxSizes[idx] + ImGui.GetStyle().ItemSpacing.X * 2); - } - - ImGui.Columns(1); - ImGui.EndChild(); } @@ -273,10 +280,12 @@ namespace NoSoliciting.Interface { #region Utility - private static bool AddRow(IList maxSizes, params string[] args) { + private static bool AddRow(params string[] args) { var clicked = false; for (var i = 0; i < args.Length; i++) { + ImGui.TableNextColumn(); + var arg = args[i]; var last = i == args.Length - 1; @@ -285,16 +294,12 @@ namespace NoSoliciting.Interface { } ImGui.TextUnformatted(arg); + if (last) { ImGui.PopTextWrapPos(); } clicked = clicked || ImGui.IsItemClicked(); - if (!last) { - maxSizes[i] = Math.Max(maxSizes[i], ImGui.CalcTextSize(arg).X); - } - - ImGui.NextColumn(); } return clicked; diff --git a/NoSoliciting/NoSoliciting.csproj b/NoSoliciting/NoSoliciting.csproj index e834b6c..05c0643 100755 --- a/NoSoliciting/NoSoliciting.csproj +++ b/NoSoliciting/NoSoliciting.csproj @@ -9,27 +9,27 @@ x64 - + $(AppData)\XIVLauncher\addon\Hooks\dev\Dalamud.dll False - + $(AppData)\XIVLauncher\addon\Hooks\dev\ImGui.NET.dll False - + $(AppData)\XIVLauncher\addon\Hooks\dev\ImGuiScene.dll False - + $(AppData)\XIVLauncher\addon\Hooks\dev\Lumina.dll False - + $(AppData)\XIVLauncher\addon\Hooks\dev\Lumina.Excel.dll False - + $(AppData)\XIVLauncher\addon\Hooks\dev\Newtonsoft.Json.dll False diff --git a/NoSoliciting/Plugin.cs b/NoSoliciting/Plugin.cs index 469a465..5c50b25 100644 --- a/NoSoliciting/Plugin.cs +++ b/NoSoliciting/Plugin.cs @@ -40,13 +40,14 @@ namespace NoSoliciting { string newPath = Path.GetDirectoryName(this.AssemblyLocation)!; Environment.SetEnvironmentVariable("PATH", $"{path};{newPath}"); - this.Interface = pluginInterface ?? throw new ArgumentNullException(nameof(pluginInterface), "DalamudPluginInterface cannot be null"); - this.Ui = new PluginUi(this); - this.Commands = new Commands(this); + this.Interface = pluginInterface; this.Config = this.Interface.GetPluginConfig() as PluginConfiguration ?? new PluginConfiguration(); this.Config.Initialise(this.Interface); + this.Ui = new PluginUi(this); + this.Commands = new Commands(this); + this.UpdateDefinitions(); this.Filter = new Filter(this);