-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathUI.cpp
1117 lines (948 loc) · 42.6 KB
/
UI.cpp
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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* MacroQuest: The extension platform for EverQuest
* Copyright (C) 2002-present MacroQuest Authors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "pch.h"
#include "UI.h"
#include "EQClasses.h"
#include "Globals.h"
#include <spdlog/spdlog.h>
namespace eqlib {
//============================================================================
// Statics/Globals
//============================================================================
CButtonWnd::VirtualFunctionTable* CButtonWnd::sm_vftable = nullptr;
CListWnd::VirtualFunctionTable* CListWnd::sm_vftable = nullptr;
CSidlScreenWnd::VirtualFunctionTable* MapViewMap::sm_vftable = nullptr;
bool gbUseNewUIEngine = false;
//============================================================================
// Misc stuff
//============================================================================
const char* IconCacheTypeToString(eIconCacheType type)
{
switch (type)
{
case IconCacheType_Item: return "Item";
case IconCacheType_Spell: return "Spell";
case IconCacheType_Menu: return "Menu";
case IconCacheType_SpeakingIndicator: return "SpeakingIndicator";
default: return "Unknown";
}
}
//============================================================================
EQ_Spell* PlayerBuffInfoWrapper::GetSpell() const
{
int spellID = GetSpellID();
return spellID > 0 && pSpellMgr ? pSpellMgr->GetSpellByID(spellID) : nullptr;
}
//============================================================================
// CRadioGroup
//============================================================================
CRadioGroup::CRadioGroup(CXStr name)
: Name(name)
{
}
CRadioGroup::~CRadioGroup()
{
for (int i = 0; i < Buttons.GetLength(); ++i)
{
if (Buttons[i])
{
Buttons[i]->SetRadioGroup(nullptr);
}
}
}
//============================================================================
// CButtonWnd
//============================================================================
// Class virtuals
FORWARD_FUNCTION_TO_VTABLE(void, CButtonWnd::SetRadioGroup(CRadioGroup*), CButtonWnd, SetRadioGroup);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::DrawWndText(const CXRect&, const CXRect&), CButtonWnd, DrawWndText);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::DrawCooldown(), CButtonWnd, DrawCooldown);
FORWARD_FUNCTION_TO_VTABLE(void, CButtonWnd::SetCheck(bool, bool), CButtonWnd, SetCheck);
FORWARD_FUNCTION_TO_VTABLE(void, CButtonWnd::SetCoolDownCompletionTimeDelta(uint32_t, uint32_t), CButtonWnd, SetCoolDownCompletionTimeDelta);
FORWARD_FUNCTION_TO_VTABLE(void, CButtonWnd::SetCoolDownCompletionTime(uint32_t, uint32_t), CButtonWnd, SetCoolDownCompletionTime);
FORWARD_FUNCTION_TO_VTABLE(void, CButtonWnd::SetCoolDownCompletionTime(eqtime_t, uint32_t), CButtonWnd, SetCoolDownCompletionTime2);
FORWARD_FUNCTION_TO_VTABLE(void, CButtonWnd::SetCoolDownBeginTime(uint32_t, uint32_t), CButtonWnd, SetCoolDownBeginTime);
FORWARD_FUNCTION_TO_VTABLE(void, CButtonWnd::SetCoolDownUpdatedBeginTime(uint32_t, uint32_t), CButtonWnd, SetCoolDownUpdatedBeginTime);
FORWARD_FUNCTION_TO_VTABLE(uint32_t, CButtonWnd::GetCoolDownBeginTime() const, CButtonWnd, SetCoolDownUpdatedBeginTime);
FORWARD_FUNCTION_TO_VTABLE(uint32_t, CButtonWnd::GetCoolDownTotalDuration() const, CButtonWnd, GetCoolDownTotalDuration);
FORWARD_FUNCTION_TO_VTABLE(uint32_t, CButtonWnd::GetCoolDownTimeRemaining() const, CButtonWnd, GetCoolDownTimeRemaining);
FORWARD_FUNCTION_TO_VTABLE(void, CButtonWnd::ClearCoolDownCompletionTime(), CButtonWnd, ClearCoolDownCompletionTime);
// Overridden virtuals
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::Draw(), CButtonWnd, Draw);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::DrawTooltipAtPoint(const CXPoint& pos, const CXStr& tooltip) const, CButtonWnd, DrawTooltipAtPoint);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::HandleLButtonDown(const CXPoint&, uint32_t), CButtonWnd, HandleLButtonDown);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::HandleLButtonUp(const CXPoint&, uint32_t), CButtonWnd, HandleLButtonUp);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::HandleLButtonHeld(const CXPoint&, uint32_t), CButtonWnd, HandleLButtonHeld);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::HandleLButtonUpAfterHeld(const CXPoint&, uint32_t), CButtonWnd, HandleLButtonUpAfterHeld);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::HandleRButtonDown(const CXPoint&, uint32_t), CButtonWnd, HandleRButtonDown);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::HandleRButtonUp(const CXPoint&, uint32_t), CButtonWnd, HandleRButtonUp);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::HandleRButtonHeld(const CXPoint&, uint32_t), CButtonWnd, HandleRButtonHeld);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::HandleRButtonUpAfterHeld(const CXPoint&, uint32_t), CButtonWnd, HandleRButtonUpAfterHeld);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::HandleMouseMove(const CXPoint&, uint32_t), CButtonWnd, HandleMouseMove);
FORWARD_FUNCTION_TO_VTABLE(int, CButtonWnd::OnProcessFrame(), CButtonWnd, OnProcessFrame);
FORWARD_FUNCTION_TO_VTABLE(bool, CButtonWnd::IsPointTransparent(const CXPoint& point) const, CButtonWnd, IsPointTransparent);
FORWARD_FUNCTION_TO_VTABLE(void, CButtonWnd::SetAttributesFromSidl(CParamScreenPiece*), CButtonWnd, SetAttributesFromSidl);
//============================================================================
// CComboWnd
//============================================================================
int CComboWnd::GetCurChoice() const
{
return pListWnd->GetCurSel();
}
CXStr CComboWnd::GetCurChoiceText() const
{
return pListWnd->GetItemText(pListWnd->GetCurSel());
}
CXRect CComboWnd::GetTextRect() const
{
CXRect rect = GetClientRect();
rect.right = GetButtonRect().left;
rect.top += (rect.GetHeight() - pFont->GetHeight()) / 2;
return rect;
}
CXRect CComboWnd::GetButtonRect() const
{
CXRect rect = GetClientRect();
if (ButtonDrawTemplate.ptaNormal != nullptr)
{
rect.left = rect.right - ButtonDrawTemplate.ptaNormal->GetSize().cx;
}
return rect;
}
//============================================================================
// CCursorAttachment
//============================================================================
bool CCursorAttachment::AttachSpellToCursor(int spellID)
{
if (spellID <= 0)
return false;
if (!IsOkToActivate(eCursorAttachment_MemorizeSpell))
return false;
// Search SpellBook for this SpellID
if (!pLocalPC)
return false;
BaseProfile& profile = pLocalPC->GetCurrentBaseProfile();
int bookSlot = -1;
for (int i = 0; i < NUM_BOOK_SLOTS; ++i)
{
int memorizedSpellID = profile.SpellBook[i];
if (spellID == memorizedSpellID)
{
bookSlot = i;
break;
}
}
if (bookSlot == -1)
return false;
EQ_Spell* pSpell = pSpellMgr->GetSpellByID(spellID);
if (pSpell == nullptr)
return false;
CTextureAnimation taOverlay;
CTextureAnimation* pTASpells = pSidlMgr->FindAnimation("A_SpellIcons");
if (pTASpells)
{
taOverlay = *pTASpells;
}
taOverlay.SetCurCell(pSpell->SpellIcon);
AttachToCursor(&taOverlay, nullptr, eCursorAttachment_MemorizeSpell, bookSlot, nullptr, nullptr);
return GetType() == eCursorAttachment_MemorizeSpell;
}
//============================================================================
// CEditWnd
//============================================================================
CXPoint CEditWnd::GetCaretPt() const
{
if (bAnchorAtStart)
return GetSelEndPt();
return GetSelStartPt();
}
CXPoint CEditWnd::GetSelStartPt() const
{
return GetCharIndexPt(StartPos);
}
CXPoint CEditWnd::GetSelEndPt() const
{
return GetCharIndexPt(EndPos);
}
void CEditBaseWnd::SetMaxChars(int maxChars)
{
MaxChars = maxChars;
if (maxChars < (int)InputText.length())
{
SetWindowText(InputText);
}
}
//============================================================================
// CGuageWnd
//============================================================================
CXRect CGaugeWnd::CalcFillRect(CXRect rect, int value) const
{
if (value < 0)
value = 0;
float width = static_cast<float>(value) * 0.001f * rect.GetWidth();
rect.right = rect.left + static_cast<int>(width) + 1;
return rect;
}
CXRect CGaugeWnd::CalcLinesFillRect(CXRect rect, int value) const
{
if (value < 0)
value = 0;
float width = static_cast<float>((value - 1) % 200) * 0.005f * rect.GetWidth();
rect.right = rect.left + static_cast<int>(width);
return rect;
}
//============================================================================
// CHotButton
//============================================================================
const char* HotButtonTypeToString(HotButtonTypes type)
{
switch (type)
{
case HotButtonType_None: return "None";
case HotButtonType_WeaponSlot: return "WeaponSlot";
case HotButtonType_CombatSkill: return "CombatSkill";
case HotButtonType_Ability: return "Ability";
case HotButtonType_Social: return "Social";
case HotButtonType_InventorySlot: return "InventorySlot";
case HotButtonType_MenuButton: return "MenuButton";
case HotButtonType_SpellGem: return "SpellGem";
case HotButtonType_PetCommand: return "PetCommand";
case HotButtonType_Skill: return "Skill";
case HotButtonType_MeleeAbility: return "MeleeAbility";
case HotButtonType_LeadershipAbility: return "LeadershipAbility";
case HotButtonType_ItemLink: return "ItemLink";
case HotButtonType_KronoSlot: return "KronoSlot";
case HotButtonType_Command: return "Command";
case HotButtonType_CombatAbility: return "CombatAbility";
case HotButtonType_MountLink: return "MountLink";
case HotButtonType_IllusionLink: return "IllusionLink";
case HotButtonType_FamiliarLink: return "FamiliarLink";
case HotButtonType_TeleportationLink: return "TeleportationLink";
case HotButtonType_ActivatedItemLink: return "ActivatedItemLink";
default:
return "Unknown";
}
}
const HotButtonData* CHotButton::GetHotButtonData() const
{
if (BarIndex >= 0 && BarIndex < NUM_HOTBUTTON_WINDOWS)
{
int8_t PageIndex = pEverQuestInfo->hotBank[BarIndex];
if (PageIndex >= 0 && PageIndex < NUM_HOTBUTTON_PAGES)
{
if (ButtonIndex >= 0 && ButtonIndex < HOTBUTTONS_PER_PAGE)
{
return &pEverQuestInfo->hotButtons[BarIndex][PageIndex][ButtonIndex];
}
}
}
return nullptr;
}
//============================================================================
// CListWnd
//============================================================================
// class virtuals
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::OnHeaderClick(CXPoint), CListWnd, OnHeaderClick);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::DrawColumnSeparators() const, CListWnd, DrawColumnSeparators);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::DrawSeparator(int index) const, CListWnd, DrawSeparator);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::DrawLine(int index) const, CListWnd, DrawLine);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::DrawHeader() const, CListWnd, DrawHeader);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::DrawItem(int index, int, int) const, CListWnd, DrawItem);
FORWARD_FUNCTION_TO_VTABLE(void, CListWnd::DeleteAll(), CListWnd, DeleteAll);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::Compare(const SListWndLine&, const SListWndLine&) const, CListWnd, Compare);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::Unknown0x188(int a, int b) const, CListWnd, Unknown0x188);
FORWARD_FUNCTION_TO_VTABLE(void, CListWnd::Sort(bool unstable), CListWnd, Sort);
// overrides
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::Draw(), CListWnd, Draw);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::DrawBackground() const, CListWnd, DrawBackground);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::DrawTooltip(const CXWnd* wnd) const, CListWnd, DrawTooltip);
FORWARD_FUNCTION_TO_VTABLE(HCURSOR, CListWnd::GetCursorToDisplay() const, CListWnd, GetCursorToDisplay);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::HandleLButtonDown(const CXPoint& pos, uint32_t flags), CListWnd, HandleLButtonDown);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::HandleLButtonUp(const CXPoint& pos, uint32_t flags), CListWnd, HandleLButtonUp);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::HandleLButtonHeld(const CXPoint& pos, uint32_t flags), CListWnd, HandleLButtonHeld);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::HandleLButtonUpAfterHeld(const CXPoint& pos, uint32_t flags), CListWnd, HandleLButtonUpAfterHeld);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::HandleRButtonDown(const CXPoint& pos, uint32_t flags), CListWnd, HandleRButtonDown);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::HandleRButtonUp(const CXPoint& pos, uint32_t flags), CListWnd, HandleRButtonUp);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::HandleRButtonHeld(const CXPoint& pos, uint32_t flags), CListWnd, HandleRButtonHeld);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::HandleRButtonUpAfterHeld(const CXPoint& pos, uint32_t flags), CListWnd, HandleRButtonUpAfterHeld);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::HandleMouseMove(const CXPoint& pos, uint32_t flags), CListWnd, HandleMouseMove);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::WndNotification(CXWnd* sender, uint32_t message, void* data), CListWnd, WndNotification);
FORWARD_FUNCTION_TO_VTABLE(void, CListWnd::OnWndNotification(), CListWnd, OnWndNotification);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::OnMove(const CXRect& rect), CListWnd, OnMove);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::OnResize(int w, int h), CListWnd, OnResize);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::OnVScroll(EScrollCode code, int pos), CListWnd, OnVScroll);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::OnHScroll(EScrollCode code, int pos), CListWnd, OnHScroll);
//FORWARD_FUNCTION_TO_VTABLE(CXRect, CListWnd::GetHitTestRect(int code) const, CListWnd, GetHitTestRect);
//FORWARD_FUNCTION_TO_VTABLE(CXRect, CListWnd::GetClientClipRect() const, CListWnd, GetClientClipRect);
FORWARD_FUNCTION_TO_VTABLE(CXWnd*, CListWnd::GetChildWndAt(const CXPoint& pos, bool, bool) const, CListWnd, GetChildWndAt);
FORWARD_FUNCTION_TO_VTABLE(int, CListWnd::SetVScrollPos(int pos), CListWnd, SetVScrollPos);
#ifdef CListWnd__CListWnd_x
CONSTRUCTOR_AT_ADDRESS(CListWnd::CListWnd(CXWnd*, uint32_t, CXRect const&), CListWnd__CListWnd);
#endif
#ifdef CListWnd__dCListWnd_x
DESTRUCTOR_AT_ADDRESS(CListWnd::~CListWnd(), CListWnd__dCListWnd);
#endif
int CListWnd::GetItemAtPoint(const CXPoint& p) const
{
for (int row = FirstVisibleLine; row < ItemsArray.GetCount(); ++row)
{
for (int col = 0; col < Columns.GetCount(); ++col)
{
if (GetItemRect(row, col).ContainsPoint(p))
return row;
}
}
return -1;
}
void CListWnd::GetItemAtPoint(const CXPoint& p, int* outRow, int* outCol) const
{
if (outRow != nullptr && outCol != nullptr)
{
for (int row = FirstVisibleLine; row < ItemsArray.GetCount(); ++row)
{
for (int col = 0; col < Columns.GetCount(); ++col)
{
if (GetItemRect(row, col).ContainsPoint(p))
{
*outRow = row;
*outCol = col;
return;
}
}
}
}
else if (outRow != nullptr)
{
*outRow = GetItemAtPoint(p);
}
else if (outCol != nullptr)
{
*outCol = -1;
}
}
int CListWnd::AddString(const char* Str, COLORREF Color, uint64_t Data, const CTextureAnimation* pTa, const char* TooltipStr)
{
return AddString(CXStr(Str), Color, Data, pTa, TooltipStr);
}
int CListWnd::IndexOf(int column, const std::function<bool(const CXStr)>& predicate)
{
for (auto row = 0; row < ItemsArray.GetLength(); row++)
{
if (predicate(GetItemText(row, column)))
return row;
}
return -1;
}
int CListWnd::IndexOf(const std::function<bool(const CXStr)>& predicate)
{
return IndexOf(0, predicate);
}
bool CListWnd::Contains(int column, const std::function<bool(const CXStr)>& predicate)
{
return IndexOf(column, predicate) != -1;
}
bool CListWnd::Contains(const std::function<bool(const CXStr)>& predicate)
{
return IndexOf(0, predicate) != -1;
}
#if 0 // apparently we already have this as an import
CXWnd* CListWnd::GetItemWnd(int Index, int SubItem) const
{
if (Index < 0 || Index >= ItemsArray.GetLength())
return nullptr;
const SListWndLine& line = ItemsArray[Index];
if (SubItem < 0 || SubItem >= line.Cells.GetLength())
return nullptr;
if (line.Cells[SubItem].pWnd != nullptr)
return line.Cells[SubItem].pWnd->GetFirstChildWnd();
return nullptr;
}
#endif
CXStr CListWnd::GetColumnTooltip(int column) const
{
if (column >= 0 && column < GetColumnCount())
return Columns[column].Tooltip;
return CXStr();
}
const CTextureAnimation* CListWnd::GetItemIcon(int row, int col) const
{
if (row < 0 || row >= ItemsArray.GetCount())
return nullptr;
auto& line = ItemsArray[row];
if (col < 0 || col >= line.Cells.GetCount())
return nullptr;
return line.Cells[col].pTA;
}
//============================================================================
// CPageWnd
//============================================================================
CXStr CPageWnd::GetTabText(bool bShowFlashing) const
{
if (bShowFlashing && bFlashing)
{
return TabText + "*";
}
return TabText;
}
//============================================================================
// CTabWnd
//============================================================================
//void CTabWnd::InsertPage(CPageWnd* pPageWnd, int position)
//{
// if (!pPageWnd || pPageWnd->GetParent() != this)
// return;
//
// for (int i = 0; i < PageArray.GetLength(); ++i)
// {
// if (PageArray[i] == pPageWnd)
// return;
// }
//
// pPageWnd->RemoveStyle(WSF_TITLEBAR | WSF_SIZABLE | WSF_USEMYALPHA | WSF_NOHITTEST);
// pPageWnd->AddStyle(WSF_RELATIVERECT);
//
// if (position < 0)
// {
// // append
// position = PageArray.GetLength();
// PageArray.Add(pPageWnd);
// }
// else
// {
// PageArray.InsertElement(position, pPageWnd);
// }
//
// // Update height
// if (bShowTabs)
// {
// if (CTextureAnimation* pAnim = pPageWnd->GetTabIcon())
// {
// if (pAnim->GetSize().cy > TabHeight)
// TabHeight = pAnim->GetSize().cy + pTabBorder->GetAnimation(CTAFrameDraw::FrameDraw_Top)->GetSize().cy;
// }
// }
//
// UpdatePage();
//
// if (CurTabIndex == -1)
// SetPage(0, false, )
//}
void CTabWnd::RemovePage(CPageWnd* pPageWnd)
{
int tabCount = GetNumTabs();
for (int i = 0; i < tabCount; ++i)
{
if (PageArray[i] == pPageWnd)
{
pPageWnd->AddStyle(WSF_NOHITTEST);
pPageWnd->Show(false);
if (pPageWnd == GetCurrentPage())
{
if (tabCount == 1)
CurTabIndex = -1;
else
SetPage(0);
}
else if (i < CurTabIndex)
CurTabIndex--;
PageArray.DeleteElement(i);
return;
}
}
}
CPageWnd* CTabWnd::GetPageFromTabIndex(int tabIndex) const
{
if (tabIndex >= 0 && tabIndex < PageArray.GetLength())
return PageArray[tabIndex];
return nullptr;
}
CPageWnd* CTabWnd::GetCurrentPage() const
{
return GetPageFromTabIndex(GetCurrentTabIndex());
}
CXRect CTabWnd::GetPageClientRect() const
{
CXRect rect = PageRect;
rect = rect + GetClientRect().TopLeft();
return rect;
}
CXRect CTabWnd::GetPageInnerRect() const
{
CXRect rect = GetPageClientRect();
rect.left += pPageBorder->GetAnimation(CTAFrameDraw::FrameDraw_LeftTop)->GetSize().cx;
rect.top += pPageBorder->GetAnimation(CTAFrameDraw::FrameDraw_Top)->GetSize().cy;
rect.right -= pPageBorder->GetAnimation(CTAFrameDraw::FrameDraw_RightTop)->GetSize().cx;
rect.bottom -= pPageBorder->GetAnimation(CTAFrameDraw::FrameDraw_Bottom)->GetSize().cy;
return rect;
}
CXRect CTabWnd::GetTabInnerRect(int tabIndex) const
{
CXRect rect = GetTabRect(tabIndex);
if (IsValidIndex(tabIndex))
{
rect.top += pTabBorder->GetAnimation(CTAFrameDraw::FrameDraw_Top)->GetSize().cy;
rect.left += pTabBorder->GetAnimation(CTAFrameDraw::FrameDraw_Left)->GetSize().cx;
rect.right -= pTabBorder->GetAnimation(CTAFrameDraw::FrameDraw_Right)->GetSize().cy;
}
return rect;
}
//============================================================================
// CCombatSkillsSelectWnd
//============================================================================
bool CCombatSkillsSelectWnd::ShouldDisplayThisSkill(int skillIdx)
{
EQ_Spell* pSpell = pLocalPC->GetMeleeSpellFromSkillIndex(skillIdx);
if (!pSpell)
{
return true;
}
for (int index = 0; index < NUM_COMBAT_ABILITIES; ++index)
{
if (skillIdx != index)
{
EQ_Spell* pOther = pLocalPC->GetMeleeSpellFromSkillIndex(index);
if (pOther != nullptr
&& pSpell->SpellGroup == pOther->SpellGroup
&& pSpell->SpellRank < pOther->SpellRank)
{
return false;
}
}
}
return true;
}
//============================================================================
// CContainerWnd
//============================================================================
// CContainerMgr
CContainerWnd* CContainerMgr::GetWindowForItem(const ItemPtr& pContainer) const
{
for (auto& pContainerWnd : pContainerMgr->pContainerWnds)
{
if (pContainerWnd && pContainerWnd->Container == pContainer)
return pContainerWnd;
}
return nullptr;
}
//============================================================================
// CInvSlotWnd
//============================================================================
ItemGlobalIndex CInvSlot::GetItemLocation() const
{
if (pInvSlotWnd)
{
return pInvSlotWnd->ItemLocation;
}
return ItemGlobalIndex();
}
//============================================================================
// CInvSlot
//============================================================================
#ifdef CInvSlotWnd__CInvSlotWnd_x
CONSTRUCTOR_AT_ADDRESS(CInvSlotWnd::CInvSlotWnd(CXWnd* pParent, uint32_t ID, CXRect rect,
CTextureAnimation* ptaBackground, const ItemGlobalIndex& itemLocation, int ItemOffsetX, int ItemOffsetY), CInvSlotWnd__CInvSlotWnd);
#endif
//============================================================================
// CKeyRingWnd
//============================================================================
CListWnd* CKeyRingWnd::GetKeyRingList(KeyRingType type) const
{
if (type < 0 || type >= eKeyRingTypeCount)
return nullptr;
return pList[type];
}
//============================================================================
// CMapViewWnd
//============================================================================
// CMapViewWnd
#ifdef CMapViewWnd__CMapViewWnd_x
CONSTRUCTOR_AT_ADDRESS(CMapViewWnd::CMapViewWnd(CXWnd*), CMapViewWnd__CMapViewWnd);
#endif
// MapViewMap virtual override implementations
FORWARD_FUNCTION_TO_VTABLE(int, MapViewMap::PostDraw(), MapViewMap, PostDraw);
FORWARD_FUNCTION_TO_VTABLE(int, MapViewMap::HandleLButtonDown(const CXPoint&, uint32_t), MapViewMap, HandleLButtonDown);
FORWARD_FUNCTION_TO_VTABLE(int, MapViewMap::HandleLButtonUp(const CXPoint&, uint32_t), MapViewMap, HandleLButtonUp);
FORWARD_FUNCTION_TO_VTABLE(int, MapViewMap::HandleLButtonUpAfterHeld(const CXPoint&, uint32_t), MapViewMap, HandleLButtonUpAfterHeld);
FORWARD_FUNCTION_TO_VTABLE(int, MapViewMap::HandleRButtonDown(const CXPoint&, uint32_t), MapViewMap, HandleRButtonDown);
FORWARD_FUNCTION_TO_VTABLE(int, MapViewMap::HandleWheelMove(const CXPoint&, int, uint32_t), MapViewMap, HandleWheelMove);
#ifdef MapViewMap__MapViewMap_x
CONSTRUCTOR_AT_ADDRESS(MapViewMap::MapViewMap(), MapViewMap__MapViewMap);
#endif
#ifdef MapViewMap__dMapViewMap_x
DESTRUCTOR_AT_ADDRESS(MapViewMap::~MapViewMap(), MapViewMap__dMapViewMap);
#endif
void MapViewMap::GetWorldCoordinates(CVector3& point)
{
CXRect clientRect = GetClientRect();
point.X -= clientRect.left + panOffsetX;
point.Y -= clientRect.top + panOffsetY;
if (zoom == 1.0f)
{
point.X -= scaleDiffX;
point.Y -= scaleDiffY;
}
else
{
point.X -= clientRect.GetWidth() / 2.0f;
point.Y -= clientRect.GetHeight() / 2.0f;
}
point.X /= mapViewScaleX;
point.Y /= mapViewScaleY;
if (zoom != 1.0f)
{
point.X = (point.X + lineOffsetX) / zoom;
point.Y = (point.Y + lineOffsetY) / zoom;
}
float tempY = -(point.X - mapViewMaxX);
float tempX = -(point.Y - mapViewMaxY);
point.X = tempX;
point.Y = tempY;
}
//============================================================================
// CChatWindowManager
//============================================================================
CChatWindow* CChatWindowManager::GetLockedActiveChatWindow() const
{
if (LockedActive != -1)
{
return ChatWindows[LockedActive];
}
return nullptr;
}
//============================================================================
// CChatWindow
//============================================================================
#ifdef CChatWindow__CChatWindow_x
CONSTRUCTOR_AT_ADDRESS(CChatWindow::CChatWindow(CXWnd*), CChatWindow__CChatWindow);
#endif
//============================================================================
// CSidlManagerBase
//============================================================================
CXMLParamManager* CSidlManagerBase::GetParamManager()
{
return &XMLDataMgr;
}
CButtonDrawTemplate* CSidlManagerBase::FindButtonDrawTemplate(std::string_view Name) const
{
if (Name.empty())
return nullptr;
for (int i = 0; i < ButtonDrawTemplateArray.GetLength(); ++i)
{
CButtonDrawTemplate* pTemplate = ButtonDrawTemplateArray[i];
if (mq::string_equals(pTemplate->strName, Name))
return pTemplate;
}
return nullptr;
}
EStaticScreenPieceClasses CSidlManagerBase::GetScreenPieceEnum(const CScreenPieceTemplate* pTemplate) const
{
int index = pTemplate->GetUltimateType();
for (int i = 0; i < StaticScreenPieceMax; ++i)
{
if (ScreenPieceClassIndex[i] == index)
return static_cast<EStaticScreenPieceClasses>(i);
}
return StaticScreenPieceUnknown;
}
EStaticScreenPieceClasses CSidlManagerBase::GetScreenPieceEnum(const CParamScreenPiece* pPiece) const
{
for (int i = 0; i < StaticScreenPieceMax; ++i)
{
if (ScreenPieceClassIndex[i] == pPiece->nClassIdx)
return static_cast<EStaticScreenPieceClasses>(i);
}
return StaticScreenPieceUnknown;
}
//============================================================================
// CascadeItemBase and friends
//============================================================================
CascadeItemCommand::CascadeItemCommand(int icon, const char* text, int command)
{
m_icon = icon;
m_text = text;
m_command = command;
// Get KeyCombo for the command
if (command >= 0 && command < nEQMappableCommands)
{
const KeyCombo combo = pKeypressHandler->NormalKey[command];
m_text = CXStr{ text } +" <" + combo.GetTextDescription() + ">";
}
}
void CascadeItemCommand::ExecuteCommand()
{
EQExecuteCmd(m_command, true, nullptr, nullptr);
}
//============================================================================
void CItemDisplayManager::ShowItem(const ItemPtr& pItem)
{
int flags = pWndMgr->IsShiftKey() ? 0 : 1;
int index = FindWindow(true);
if (index == -1)
{
index = CreateWindowInstance();
}
if (index >= 0)
{
if (CItemDisplayWnd* pWnd = GetWindow(index))
{
pWnd->Minimize(false);
pWnd->SetItem(pItem, flags);
pWnd->Activate();
// update time so we know it is the newest window.
m_times[index] = EQGetTime();
}
}
}
//----------------------------------------------------------------------------
void InitializeUI()
{
CButtonWnd::sm_vftable = reinterpret_cast<CButtonWnd::VirtualFunctionTable*>(CButtonWnd__vftable);
CListWnd::sm_vftable = reinterpret_cast<CListWnd::VirtualFunctionTable*>(CListWnd__vftable);
MapViewMap::sm_vftable = reinterpret_cast<CSidlScreenWnd::VirtualFunctionTable*>(MapViewMap__vftable);
}
static std::unordered_multimap<std::string_view, ForeignPointer<CSidlScreenWnd>&> s_windowInitMap = {
{ "AAWindow", pAAWnd.ref<CSidlScreenWnd>() },
{ "AchievementsWnd", pAchievementsWnd.ref<CSidlScreenWnd>() },
{ "ActionsWindow", pActionsWnd.ref<CSidlScreenWnd>() },
{ "AdvancedDisplayOptionsWindow", pAdvancedDisplayOptionsWnd.ref<CSidlScreenWnd>() },
{ "AdvancedLootWnd", pAdvancedLootWnd.ref<CSidlScreenWnd>() },
{ "AdventureLeaderboardWnd", pAdventureLeaderboardWnd.ref<CSidlScreenWnd>() },
{ "AdventureRequestWnd", pAdventureRequestWnd.ref<CSidlScreenWnd>() },
{ "AdventureStatsWnd", pAdventureStatsWnd.ref<CSidlScreenWnd>() },
{ "AggroMeterWnd", pAggroMeterWnd.ref<CSidlScreenWnd>() },
{ "AlarmWnd", pAlarmWnd.ref<CSidlScreenWnd>() },
{ "AlertHistoryWnd", pAlertHistoryWnd.ref<CSidlScreenWnd>() },
{ "AlertStackWnd", pAlertStackWnd.ref<CSidlScreenWnd>() },
{ "AlertWnd", pAlertWnd.ref<CSidlScreenWnd>() },
{ "AltStorageWnd", pAltStorageWnd.ref<CSidlScreenWnd>() },
{ "AudioTriggersWindow", pAudioTriggersWnd.ref<CSidlScreenWnd>() },
{ "AuraWindow", pAuraWnd.ref<CSidlScreenWnd>() },
{ "BandolierWnd", pBandolierWnd.ref<CSidlScreenWnd>() },
{ "BankWnd", pBankWnd.ref<CSidlScreenWnd>() },
{ "BarterMerchantWnd", pBarterMerchantWnd.ref<CSidlScreenWnd>() },
{ "BarterSearchWnd", pBarterSearchWnd.ref<CSidlScreenWnd>() },
{ "BarterWnd", pBarterWnd.ref<CSidlScreenWnd>() },
{ "BazaarConfirmationWnd", pBazaarConfirmationWnd.ref<CSidlScreenWnd>() },
{ "BazaarSearchWnd", pBazaarSearchWnd.ref<CSidlScreenWnd>() },
{ "BazaarWnd", pBazaarWnd.ref<CSidlScreenWnd>() },
{ "BigBankWnd", pBankWnd.ref<CSidlScreenWnd>() },
{ "BlockedBuffWnd", pBlockedBuffWnd.ref<CSidlScreenWnd>() },
{ "BlockedPetBuffWnd", pBlockedBuffWnd.ref<CSidlScreenWnd>() },
{ "BodyTintWnd", pBodyTintWnd.ref<CSidlScreenWnd>() },
{ "BookWindow", pBookWnd.ref<CSidlScreenWnd>() },
{ "BreathWindow", pBreathWnd.ref<CSidlScreenWnd>() },
{ "BuffWindow", pBuffWnd.ref<CSidlScreenWnd>() },
{ "BugReportWindow", pBugReportWnd.ref<CSidlScreenWnd>() },
{ "CastingWindow", pCastingWnd.ref<CSidlScreenWnd>() },
{ "CastSpellWnd", pCastSpellWnd.ref<CSidlScreenWnd>() },
{ "CharacterCreation", pCharacterCreation.ref<CSidlScreenWnd>() },
{ "CharacterListWnd", pCharacterListWnd.ref<CSidlScreenWnd>() },
{ "ClaimWnd", pClaimWnd.ref<CSidlScreenWnd>() },
{ "ColorPickerWnd", pColorPickerWnd.ref<CSidlScreenWnd>() },
{ "CombatAbilityWnd", pCombatAbilityWnd.ref<CSidlScreenWnd>() },
{ "CombatSkillSelectWnd", pCombatSkillsSelectWnd.ref<CSidlScreenWnd>() },
{ "CompassWindow", pCompassWnd.ref<CSidlScreenWnd>() },
{ "CursorAttachment", pCursorAttachment.ref<CSidlScreenWnd>() },
{ "DragonHoardWnd", pDragonHoardWnd.ref<CSidlScreenWnd>() },
{ "DynamicZoneWnd", pDynamicZoneWnd.ref<CSidlScreenWnd>() },
{ "EditLabelWnd", pEditLabelWnd.ref<CSidlScreenWnd>() },
{ "EQMainWnd", pEQMainWnd.ref<CSidlScreenWnd>() },
{ "EventCalendarWnd", pEventCalendarWnd.ref<CSidlScreenWnd>() },
{ "ExtendedTargetWnd", pExtendedTargetWnd.ref<CSidlScreenWnd>() },
{ "FactionWnd", pFactionWnd.ref<CSidlScreenWnd>() },
{ "FeedbackWindow", pFeedbackWnd.ref<CSidlScreenWnd>() }, // No longer exists in Live
{ "FellowshipWnd", pFellowshipWnd.ref<CSidlScreenWnd>() },
{ "FileSelectionWnd", pFileSelectionWnd.ref<CSidlScreenWnd>() },
{ "FindItemWnd", pFindItemWnd.ref<CSidlScreenWnd>() },
{ "FindLocationWnd", pFindLocationWnd.ref<CSidlScreenWnd>() },
{ "FriendsWindow", pFriendsWnd.ref<CSidlScreenWnd>() },
{ "GemsGameWnd", pGemsGameWnd.ref<CSidlScreenWnd>() },
{ "GiveWnd", pGiveWnd.ref<CSidlScreenWnd>() },
{ "GroupSearchFiltersWnd", pGroupSearchFiltersWnd.ref<CSidlScreenWnd>() },
{ "GroupSearchWnd", pGroupSearchWnd.ref<CSidlScreenWnd>() },
{ "GroupWindow", pGroupWnd.ref<CSidlScreenWnd>() },
{ "GuildBankWnd", pGuildBankWnd.ref<CSidlScreenWnd>() },
{ "GuildCreationWnd", pGuildCreationWnd.ref<CSidlScreenWnd>() },
{ "GuildManagementWnd", pGuildMgmtWnd.ref<CSidlScreenWnd>() },
{ "HelpWindow", pHelpWnd.ref<CSidlScreenWnd>() },
{ "HeritageSelectionWnd", pHeritageSelectionWnd.ref<CSidlScreenWnd>() },
{ "IconSelectionWnd", pIconSelectionWnd.ref<CSidlScreenWnd>() },
{ "InspectWnd", pInspectWnd.ref<CSidlScreenWnd>() },
{ "InventoryWindow", pInventoryWnd.ref<CSidlScreenWnd>() },
{ "ItemExpTransferWnd", pItemExpTransferWnd.ref<CSidlScreenWnd>() },
{ "ItemFuseWnd", pItemFuseWnd.ref<CSidlScreenWnd>() },
{ "ItemOverflowWnd", pItemOverflowWnd.ref<CSidlScreenWnd>() },
{ "JournalCatWnd", pJournalCatWnd.ref<CSidlScreenWnd>() },
{ "JournalNPCWnd", pJournalTextWnd.ref<CSidlScreenWnd>() },
{ "KeyRingWnd", pKeyRingWnd.ref<CSidlScreenWnd>() },
{ "LargeDialogWindow", pLargeDialog.ref<CSidlScreenWnd>() },
{ "LayoutCopyWindow", pLayoutCopyWnd.ref<CSidlScreenWnd>() },
{ "LFGuildWnd", pLFGuildWnd.ref<CSidlScreenWnd>() },
{ "LoadskinWnd", pLoadskinWnd.ref<CSidlScreenWnd>() },
{ "LootFiltersCopyWnd", pLootFiltersCopyWnd.ref<CSidlScreenWnd>() },
{ "LootFiltersWnd", pLootFiltersWnd.ref<CSidlScreenWnd>() },
{ "LootSettingsWnd", pLootSettingsWnd.ref<CSidlScreenWnd>() },
{ "LootWnd", pLootWnd.ref<CSidlScreenWnd>() },
{ "MailAddressBookWindow", pMailAddressBookWnd.ref<CSidlScreenWnd>() },
{ "MailCompositionWindow", pMailCompositionWnd.ref<CSidlScreenWnd>() },
{ "MailIgnoreListWindow", pMailIgnoreListWindow.ref<CSidlScreenWnd>() },
{ "MailWindow", pMailWnd.ref<CSidlScreenWnd>() },
{ "ManageLootWnd", pManageLootWnd.ref<CSidlScreenWnd>() },
{ "MapToolbarWnd", pMapToolbarWnd.ref<CSidlScreenWnd>() },
{ "MapViewWnd", pMapViewWnd.ref<CSidlScreenWnd>() },
{ "MarketplaceWnd", pMarketplaceWnd.ref<CSidlScreenWnd>() },
{ "MerchantWnd", pMerchantWnd.ref<CSidlScreenWnd>() },
{ "MIZoneSelectWnd", pMIZoneSelectWnd.ref<CSidlScreenWnd>() },
{ "MusicPlayerWnd", pMusicPlayerWnd.ref<CSidlScreenWnd>() },
{ "NameChangeMercWnd", pNameChangeMercWnd.ref<CSidlScreenWnd>() },
{ "NameChangePetWnd", pNameChangePetWnd.ref<CSidlScreenWnd>() },
{ "NameChangeWnd", pNameChangeWnd.ref<CSidlScreenWnd>() },
{ "NoteWindow", pNoteWnd.ref<CSidlScreenWnd>() },
{ "ObjectPreviewWnd", pObjectPreviewWnd.ref<CSidlScreenWnd>() },
{ "OptionsWindow", pOptionsWnd.ref<CSidlScreenWnd>() },
{ "OverseerWnd", pOverseerWnd.ref<CSidlScreenWnd>() },
{ "PetInfoWindow", pPetInfoWnd.ref<CSidlScreenWnd>() },
{ "PlayerCustomizationWnd", pPlayerCustomizationWnd.ref<CSidlScreenWnd>() },
{ "PlayerNotesWindow", pPlayerNotesWnd.ref<CSidlScreenWnd>() },
{ "PlayerWindow", pPlayerWnd.ref<CSidlScreenWnd>() },
{ "ProgressionSelectionWnd", pProgressionSelectionWnd.ref<CSidlScreenWnd>() },
{ "PurchaseGroupWnd", pPurchaseGroupWnd.ref<CSidlScreenWnd>() },
{ "PurchaseWnd", pPurchaseWnd.ref<CSidlScreenWnd>() },
{ "PvpLeaderboardWnd", pPvPLeaderboardWnd.ref<CSidlScreenWnd>() },
{ "PvPStatsWnd", pPvPStatsWnd.ref<CSidlScreenWnd>() },
{ "QuantityWnd", pQuantityWnd.ref<CSidlScreenWnd>() },
{ "RaceChangeWnd", pRaceChangeWnd.ref<CSidlScreenWnd>() },
{ "RaidOptionsWindow", pRaidOptionsWnd.ref<CSidlScreenWnd>() },
{ "RaidWindow", pRaidWnd.ref<CSidlScreenWnd>() },
{ "RealEstateItemsWnd", pRealEstateItemsWnd.ref<CSidlScreenWnd>() },
{ "RealEstateLayoutDetailsWnd", pRealEstateLayoutDetailsWnd.ref<CSidlScreenWnd>() },
{ "RealEstateManageWnd", pRealEstateManageWnd.ref<CSidlScreenWnd>() },
{ "RealEstateNeighborhoodWnd", pRealEstateNeighborhoodWnd.ref<CSidlScreenWnd>() },
{ "RealEstatePlotSearchWnd", pRealEstatePlotSearchWnd.ref<CSidlScreenWnd>() },
{ "RealEstatePurchaseWnd", pRealEstatePurchaseWnd.ref<CSidlScreenWnd>() },
{ "RespawnWnd", pRespawnWnd.ref<CSidlScreenWnd>() },
{ "RewardSelectionWnd", pRewardSelectionWnd.ref<CSidlScreenWnd>() },
{ "SelectorWindow", pSelectorWnd.ref<CSidlScreenWnd>() },
{ "SendMoneyWnd", pSendMoneyWnd.ref<CSidlScreenWnd>() },
{ "ServerListWnd", pServerListWnd.ref<CSidlScreenWnd>() },
{ "ShortDurationBuffWindow", pSongWnd.ref<CSidlScreenWnd>() },
{ "SkillsSelectWindow", pSkillsSelectWnd.ref<CSidlScreenWnd>() },
{ "SkillsWindow", pSkillsWnd.ref<CSidlScreenWnd>() },
{ "SocialEditWnd", pSocialEditWnd.ref<CSidlScreenWnd>() },
{ "SocialWnd", pSocialWnd.ref<CSidlScreenWnd>() },
{ "SpellBookWnd", pSpellBookWnd.ref<CSidlScreenWnd>() },
{ "StoryWnd", pStoryWnd.ref<CSidlScreenWnd>() },
{ "TargetOfTargetWindow", pTargetOfTargetWnd.ref<CSidlScreenWnd>() },