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
|
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using KKSG;
using UILib;
using UnityEngine;
using XMainClient.UI;
using XMainClient.UI.UICommon;
using XUtliPoolLib;
namespace XMainClient
{
internal class XChatSmallView : DlgBase<XChatSmallView, XChatSmallBehaviour>
{
public override string fileName
{
get
{
return "GameSystem/ChatSmallDlg";
}
}
public override int group
{
get
{
return 1;
}
}
public override bool autoload
{
get
{
return true;
}
}
public override bool isMainUI
{
get
{
return true;
}
}
public override bool isHideChat
{
get
{
return false;
}
}
private static XChatDocument _doc = null;
private bool m_ShowMini = false;
public bool IsInited = false;
private bool m_bForceShow = false;
private bool m_bFakeHide = false;
private uint m_offToken = 0u;
private static readonly int SCROLL_HEIGHT = 90;
private static readonly int HEIGHT_ADJUST = 3;
private float presstime = 0f;
private static bool start = false;
private float last_time;
protected override void Init()
{
XChatSmallView._doc = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
XChatSmallView._doc.ChatSmallView = this;
this.m_bForceShow = false;
this.m_bFakeHide = false;
base.uiBehaviour.m_ChatPool.ReturnAll(false);
this.OnShowWindow(false);
}
protected override void OnShow()
{
base.OnShow();
this.ShowMailRedpoint();
bool isInited = this.IsInited;
if (isInited)
{
this.ShowCacheMsg();
}
this.SetExp();
XSingleton<XTimerMgr>.singleton.KillTimer(this.m_offToken);
this.m_offToken = XSingleton<XTimerMgr>.singleton.SetTimer(3f, new XTimerMgr.ElapsedEventHandler(this.HanderOfflineTimer), null);
}
private void HanderOfflineTimer(object o)
{
bool flag = !XChatSmallView.start && !this.IsInited;
if (flag)
{
this.CacheMsg();
}
}
public override void RegisterEvent()
{
base.uiBehaviour.m_BgSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.DoOpenChatWindow));
base.uiBehaviour.m_BgSpriteMini.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.DoOpenChatWindow));
base.uiBehaviour.m_OpenWindow.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnOpenMiniWindow));
base.uiBehaviour.m_OpenWindowMini.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnOpenMainWindow));
base.uiBehaviour.m_sprMailRed.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(DlgBase<XChatView, XChatBehaviour>.singleton.OnMailClick));
base.uiBehaviour.m_sprMailRed.RegisterSpritePressEventHandler(new SpritePressEventHandler(this.TestChatMiniPress));
}
public void SetExp()
{
base.uiBehaviour.m_Exp.value = XSingleton<XAttributeMgr>.singleton.XPlayerData.Exp * 1f / XSingleton<XAttributeMgr>.singleton.XPlayerData.MaxExp;
base.uiBehaviour.m_ExpValue.SetText(string.Format("{0}/{1}", XSingleton<XAttributeMgr>.singleton.XPlayerData.Exp, XSingleton<XAttributeMgr>.singleton.XPlayerData.MaxExp));
}
private bool TestChatMiniPress(IXUISprite sp, bool press)
{
if (press)
{
this.presstime = Time.unscaledTime;
}
else
{
bool flag = Time.unscaledTime - this.presstime > 16f;
if (flag)
{
Transform transform = base.uiBehaviour.m_contentPanel.gameObject.transform;
int childCount = transform.childCount;
for (int i = 0; i < childCount; i++)
{
Transform child = transform.GetChild(i);
XSingleton<XDebug>.singleton.AddLog("t name:", child.name, " active:" + child.gameObject.activeSelf.ToString(), null, null, null, XDebugColor.XDebug_None);
bool activeSelf = child.gameObject.activeSelf;
if (activeSelf)
{
IXUILabel ixuilabel = child.Find("content").GetComponent("XUILabel") as IXUILabel;
XSingleton<XDebug>.singleton.AddLog(child.name, " ", ixuilabel.GetText(), null, null, null, XDebugColor.XDebug_None);
}
}
}
}
return true;
}
public void CacheMsg()
{
bool flag = base.uiBehaviour == null;
if (!flag)
{
bool flag2 = XChatSmallView._doc == null;
if (flag2)
{
XChatSmallView._doc = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
XChatSmallView._doc.ChatSmallView = this;
}
this.OnInitHistoryMsg();
this.last_time = Time.time;
this.IsInited = false;
XChatSmallView.start = true;
base.uiBehaviour.m_ChatPool.ReturnAll(false);
base.uiBehaviour.m_ScrollView.SetPosition(0f);
}
}
public override void OnUpdate()
{
bool flag = XChatSmallView.start;
if (flag)
{
bool flag2 = Time.time - this.last_time > 1f;
if (flag2)
{
XChatSmallView.start = false;
bool flag3 = !this.IsInited;
if (flag3)
{
this.ShowPanel(true);
XTeamDocument specificDocument = XDocuments.GetSpecificDocument<XTeamDocument>(XTeamDocument.uuID);
bool flag4 = specificDocument != null && specificDocument.MyTeamView != null && specificDocument.MyTeamView.IsVisible();
if (flag4)
{
this.ShowChatMiniUI(new ShowSettingArgs
{
position = 1,
needforceshow = true,
forceshow = true,
needdepth = true,
depth = 4
});
}
}
this.ShowCacheMsg();
this.IsInited = true;
}
}
}
public void ShowCacheMsg()
{
base.uiBehaviour.m_ChatPool.ReturnAll(false);
base.uiBehaviour.m_ScrollView.SetPosition(0f);
this.OnCleanUpChatWindow();
this.HandleOfflineInfoQuickily();
bool flag = !this.IsInited || XChatDocument.offlineProcessList.Count <= 0;
if (flag)
{
ChatInfo chatInfo = new ChatInfo();
chatInfo.mChannelId = ChatChannelType.World;
chatInfo.mSenderName = "";
chatInfo.mContent = XStringDefineProxy.GetString("CHAT_INIT");
XChatSmallView._doc.OnReceiveChatSmallInfo(chatInfo);
}
bool redpoint = DlgBase<XChatView, XChatBehaviour>.singleton.HasNewFriendMsg();
this.SetRedpoint(redpoint);
}
public void ShowCurrTempMsg(string content, string name = "")
{
bool flag = this.IsInited && base.IsVisible() && !string.IsNullOrEmpty(name);
if (flag)
{
ChatInfo chatInfo = new ChatInfo();
chatInfo.mChannelId = ChatChannelType.Curr;
chatInfo.mSenderName = name;
chatInfo.mContent = content;
XChatSmallView._doc.OnReceiveChatSmallInfo(chatInfo);
}
}
public void SetScrollView(object obj)
{
bool flag = base.IsLoaded() && base.IsVisible();
if (flag)
{
this.SetPivot();
}
}
protected override void OnUnload()
{
XChatSmallView._doc = null;
XSingleton<XTimerMgr>.singleton.KillTimer(this.m_offToken);
base.OnUnload();
}
public void OnShowWindow(bool ismini)
{
this.m_ShowMini = ismini;
if (ismini)
{
base.uiBehaviour.m_BgSpriteMain.SetVisible(false);
base.uiBehaviour.m_BgSpriteMini.SetVisible(true);
}
else
{
base.uiBehaviour.m_BgSpriteMain.SetVisible(true);
base.uiBehaviour.m_BgSpriteMini.SetVisible(false);
base.uiBehaviour.m_ScrollView.SetPosition(0f);
}
}
public void SetForceShow(bool bShow)
{
this.m_bForceShow = bShow;
if (bShow)
{
this.SetVisible(true, true);
}
else
{
bool bFakeHide = this.m_bFakeHide;
if (bFakeHide)
{
this.SetVisible(false, true);
}
}
}
public void SetFakeHide(bool bHide)
{
this.m_bFakeHide = bHide;
if (bHide)
{
bool flag = !this.m_bForceShow;
if (flag)
{
this.SetVisible(false, true);
}
}
else
{
this.SetVisible(true, true);
}
}
public void DoOpenChatWindow(IXUISprite sp)
{
bool flag = !DlgBase<XChatView, XChatBehaviour>.singleton.IsVisible();
if (flag)
{
DlgBase<XChatView, XChatBehaviour>.singleton.SetVisibleWithAnimation(true, null);
}
}
public void OnOpenMainWindow(IXUISprite sp)
{
this.OnShowWindow(false);
}
public static void OnLabelMainWindow(string param)
{
DlgBase<XChatSmallView, XChatSmallBehaviour>.singleton.DoOpenChatWindow(null);
}
public void OnOpenMiniWindow(IXUISprite sp)
{
this.OnShowWindow(true);
}
public void OnCleanUpChatWindow()
{
XChatSmallView._doc.RestrainSmallChatInfoNum();
base.uiBehaviour.ChatUIInfoList.Clear();
}
public void InitUI(XMainClient.ChatInfo info)
{
bool flag = !base.IsVisible() || !base.IsLoaded();
if (!flag)
{
GameObject gameObject = base.uiBehaviour.m_ChatPool.FetchGameObject(false);
this.InitChatUI(info, gameObject);
int allUIHeight = this.GetAllUIHeight(-1);
float num = (float)(55 - allUIHeight);
gameObject.transform.localPosition = new Vector3(0f, num);
XSmallChatInfo xsmallChatInfo = new XSmallChatInfo();
xsmallChatInfo.info = info;
xsmallChatInfo.uiobject = gameObject;
base.uiBehaviour.ChatUIInfoList.Add(xsmallChatInfo);
base.uiBehaviour.m_ScrollView.NeedRecalcBounds();
bool redpoint = DlgBase<XChatView, XChatBehaviour>.singleton.HasNewFriendMsg();
this.SetRedpoint(redpoint);
this.SetPivot();
}
}
public void SetRedpoint(bool show)
{
bool flag = XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.Hall;
bool flag2 = base.uiBehaviour.m_RedPoint != null;
if (flag2)
{
base.uiBehaviour.m_RedPoint.SetVisible(show && flag);
}
}
public void HandleOfflineInfoQuickily()
{
bool flag = !base.IsVisible() || !base.IsLoaded();
if (!flag)
{
List<ChatInfo> offlineProcessList = XChatDocument.offlineProcessList;
float num = 55f;
this.ConstrainChatUINum();
for (int i = 0; i < offlineProcessList.Count; i++)
{
GameObject gameObject = base.uiBehaviour.m_ChatPool.FetchGameObject(false);
this.InitChatUI(offlineProcessList[i], gameObject);
gameObject.transform.localPosition = new Vector3(0f, num);
XSmallChatInfo xsmallChatInfo = new XSmallChatInfo();
xsmallChatInfo.info = offlineProcessList[i];
xsmallChatInfo.uiobject = gameObject;
base.uiBehaviour.ChatUIInfoList.Add(xsmallChatInfo);
IXUILabel ixuilabel = gameObject.transform.Find("content").GetComponent("XUILabel") as IXUILabel;
num -= (float)((int)ixuilabel.GetPrintSize().y + XChatSmallView.HEIGHT_ADJUST);
}
base.uiBehaviour.m_ScrollView.NeedRecalcBounds();
this.SetPivot();
}
}
public void OnReceieveChatInfos(List<XMainClient.ChatInfo> infos)
{
for (int i = 0; i < infos.Count; i++)
{
this.ConstrainChatUINum();
bool isInited = this.IsInited;
if (isInited)
{
this.InitUI(infos[i]);
}
else
{
this.OnReceiveChatInfo(infos[i]);
}
}
infos.Clear();
}
public void OnReceiveChatInfo(XMainClient.ChatInfo info)
{
bool isInited = this.IsInited;
if (isInited)
{
this.ConstrainChatUINum();
bool flag = !DlgBase<XChatSettingView, XChatSettingBehaviour>.singleton.IsChannelEnable(info.mChannelId);
if (!flag)
{
bool flag2 = XChatSmallView._doc != null;
if (flag2)
{
this.InitUI(info);
bool flag3 = !base.IsVisible() && !XSingleton<XCutScene>.singleton.IsPlaying && !DlgBase<CutoverViewView, CutoverViewBehaviour>.singleton.IsOpening;
if (flag3)
{
this.SetVisible(true, true);
}
bool flag4 = base.uiBehaviour.m_MainPanel.GetAlpha() <= 0.7f;
if (flag4)
{
this.StartPlayAlphaEffect();
}
}
}
}
}
private void StartPlayAlphaEffect()
{
bool flag = base.IsVisible();
if (flag)
{
base.uiBehaviour.m_BgTweenTool.SetTweenGroup(1);
base.uiBehaviour.m_BgTweenTool.PlayTween(true, -1f);
base.uiBehaviour.m_BgSprite.SetVisible(true);
}
}
private void SetPivot()
{
bool flag = base.IsVisible();
if (flag)
{
bool flag2 = this.GetAllUIHeight(-1) > XChatSmallView.SCROLL_HEIGHT;
if (flag2)
{
base.uiBehaviour.m_ScrollView.SetPosition(1f);
}
else
{
base.uiBehaviour.m_ScrollView.SetPosition(0f);
}
}
}
public void OnInitHistoryMsg()
{
base.uiBehaviour.m_ChatPool.ReturnAll(false);
this.OnCleanUpChatWindow();
List<ChatInfo> smallChatList = XChatSmallView._doc.GetSmallChatList();
this.ConstrainChatUINum();
for (int i = 0; i < smallChatList.Count; i++)
{
this.InitUI(smallChatList[i]);
}
XSingleton<XTimerMgr>.singleton.SetTimer(0.1f, new XTimerMgr.ElapsedEventHandler(this.SetScrollView), null);
}
public void EnableClickEvent(bool enable)
{
if (enable)
{
base.uiBehaviour.m_BgSprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.DoOpenChatWindow));
}
else
{
base.uiBehaviour.m_BgSprite.RegisterSpriteClickEventHandler(null);
}
}
public static string InitMiniChatUI(ChatInfo info, GameObject go)
{
IXUILabelSymbol ixuilabelSymbol = go.transform.Find("content").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
IXUISprite ixuisprite = go.transform.Find("channel").GetComponent("XUISprite") as IXUISprite;
string text = DlgBase<ChatEmotionView, ChatEmotionBehaviour>.singleton.OnParseEmotion(info.mContent);
bool flag = string.IsNullOrEmpty(text) || (text.StartsWith(" ") && text.EndsWith(" "));
if (flag)
{
text = "......";
}
bool flag2 = info.mChannelId != ChatChannelType.System && info.isAudioChat;
if (flag2)
{
text = XSingleton<XCommon>.singleton.StringCombine(XLabelSymbolHelper.FormatImage("Chat/Chat", "yyicon5"), text);
}
XSingleton<XCommon>.singleton.CleanStringCombine();
string s = "[f39354]";
bool isSelfSender = info.isSelfSender;
if (isSelfSender)
{
s = "[54aaf3]";
}
ChatChannelType mChannelId = info.mChannelId;
if (mChannelId != ChatChannelType.System)
{
if (mChannelId != ChatChannelType.Curr)
{
if (mChannelId != ChatChannelType.Group)
{
text = ChatItem.ParsePayComsume(info, text, true);
bool flag3 = string.IsNullOrEmpty(info.mSenderName);
if (flag3)
{
XSingleton<XCommon>.singleton.AppendString("[ffffff] ", text, "[-]");
}
else
{
XSingleton<XCommon>.singleton.AppendString(XSingleton<UiUtility>.singleton.GetChatDesignation(info.mCoverDesignationID, info.mSpecialDesignation, ""));
XSingleton<XCommon>.singleton.AppendString("[ffffff] ", s, info.mSenderName);
XSingleton<XCommon>.singleton.AppendString("[-]:", text);
XSingleton<XCommon>.singleton.AppendString("[-]");
}
}
else
{
text = ChatItem.ParsePayComsume(info, text, true);
XSingleton<XCommon>.singleton.AppendString("[ffffff] ", s);
XSingleton<XCommon>.singleton.AppendString("[", info.group.groupchatName, "]");
XSingleton<XCommon>.singleton.AppendString(XSingleton<UiUtility>.singleton.GetChatDesignation(info.mCoverDesignationID, info.mSpecialDesignation, ""));
XSingleton<XCommon>.singleton.AppendString(info.mSenderName, "[-]:", text);
XSingleton<XCommon>.singleton.AppendString("[-]");
}
}
else
{
string pattern = "\\[[0-9a-fA-F]{6}\\]";
Regex regex = new Regex(pattern);
text = regex.Replace(text, "[ffffff]", 3);
text = ChatItem.ParsePayComsume(info, text, true);
XSingleton<XCommon>.singleton.AppendString(XSingleton<UiUtility>.singleton.GetChatDesignation(info.mCoverDesignationID, info.mSpecialDesignation, ""));
XSingleton<XCommon>.singleton.AppendString("[ffffff] ", s, info.mSenderName);
XSingleton<XCommon>.singleton.AppendString("[-]:", text);
XSingleton<XCommon>.singleton.AppendString("[-]");
}
}
else
{
XSingleton<XCommon>.singleton.AppendString("[e58db2] ", text, "[-]");
}
XLabelSymbolHelper.RegisterHyperLinkClicks(ixuilabelSymbol);
ixuilabelSymbol.RegisterDefaultEventHandler(new HyperLinkClickEventHandler(XChatSmallView.OnLabelMainWindow));
ixuilabelSymbol.InputText = XSingleton<XCommon>.singleton.GetString();
XChatSmallView._doc = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
string miniSpr = XChatSmallView._doc.GetRawData(info.mChannelId).miniSpr;
ixuisprite.SetSprite(miniSpr);
return XSingleton<XCommon>.singleton.GetString();
}
private void InitChatUI(ChatInfo info, GameObject go)
{
string inputText = XChatSmallView.InitMiniChatUI(info, go);
base.uiBehaviour.m_MiniTemplate.SetVisible(true);
base.uiBehaviour.m_MiniAudioTemplate.SetVisible(false);
base.uiBehaviour.m_MiniText.InputText = inputText;
}
public int GetAllUIHeight(int count = -1)
{
int num = 0;
bool flag = count == -1 || count > base.uiBehaviour.ChatUIInfoList.Count;
if (flag)
{
count = base.uiBehaviour.ChatUIInfoList.Count;
}
for (int i = 0; i < count; i++)
{
GameObject uiobject = base.uiBehaviour.ChatUIInfoList[i].uiobject;
IXUILabel ixuilabel = uiobject.transform.Find("content").GetComponent("XUILabel") as IXUILabel;
num += (int)ixuilabel.GetPrintSize().y + XChatSmallView.HEIGHT_ADJUST;
}
return num;
}
private bool ConstrainChatUINum()
{
bool flag = !base.IsVisible() || !base.IsLoaded();
bool result;
if (flag)
{
result = false;
}
else
{
bool flag2 = (long)base.uiBehaviour.ChatUIInfoList.Count >= (long)((ulong)XChatSmallBehaviour.m_MaxShowMsg);
if (flag2)
{
int count = base.uiBehaviour.ChatUIInfoList.Count;
int num = 0;
while ((long)num <= (long)count - (long)((ulong)XChatSmallBehaviour.m_MaxShowMsg))
{
XSmallChatInfo xsmallChatInfo = base.uiBehaviour.ChatUIInfoList[0];
base.uiBehaviour.m_ChatPool.ReturnInstance(xsmallChatInfo.uiobject, false);
base.uiBehaviour.ChatUIInfoList.Remove(xsmallChatInfo);
num++;
}
for (int i = 0; i < base.uiBehaviour.ChatUIInfoList.Count; i++)
{
int allUIHeight = this.GetAllUIHeight(i);
float num2 = (float)(55 - allUIHeight);
base.uiBehaviour.ChatUIInfoList[i].uiobject.transform.localPosition = new Vector3(0f, num2);
}
}
result = false;
}
return result;
}
public void SetDeepth(int depth)
{
this.m_uiBehaviour.m_panel.SetDepth(depth);
this.m_uiBehaviour.m_contentPanel.SetDepth(depth + 1);
}
public void SetPosition(int group, bool bAnim)
{
this.StartPlayAlphaEffect();
base.uiBehaviour.m_TweenTool.StopTween();
base.uiBehaviour.m_TweenTool.SetTweenGroup(group);
if (bAnim)
{
base.uiBehaviour.m_TweenTool.PlayTween(true, -1f);
}
else
{
base.uiBehaviour.m_TweenTool.ResetTweenByGroup(false, group);
}
}
public void ShowPanel(bool show)
{
base.uiBehaviour.m_MainPanel.SetVisible(show);
}
public void ShowMailRedpoint()
{
bool flag = XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.Hall && XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_BIGMELEE_READY;
bool flag2 = DlgBase<XTeamView, TabDlgBehaviour>.singleton.IsVisible();
bool flag3 = DlgBase<GuildMineMainView, GuildMineMainBehaviour>.singleton.IsVisible();
bool flag4 = XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Mail);
bool sysRedPointState = XSingleton<XGameSysMgr>.singleton.GetSysRedPointState(XSysDefine.XSys_Mail);
base.uiBehaviour.m_sprMailRed.SetVisible(flag4 && sysRedPointState && flag && !flag2 && !flag3);
}
public void ShowChatDefaultMiniUI()
{
this.ShowChatMiniUI(new ShowSettingArgs
{
position = 0,
anim = false
});
}
public void ShowChatMiniUI(ShowSettingArgs args)
{
XSingleton<XDebug>.singleton.AddGreenLog("show miniui: " + args.forceshow.ToString(), null, null, null, null, null);
bool needforceshow = args.needforceshow;
if (needforceshow)
{
bool forceshow = args.forceshow;
if (forceshow)
{
this.SetForceShow(args.forceshow);
this.SetPosition(args.position, args.anim);
}
else
{
this.SetPosition(args.position, args.anim);
this.SetForceShow(args.forceshow);
}
}
else
{
this.SetVisible(true, true);
this.SetPosition(args.position, args.anim);
}
this.ShowMailRedpoint();
this.EnableClickEvent(args.enablebackclick);
bool needdepth = args.needdepth;
if (needdepth)
{
this.SetDeepth(args.depth);
}
}
}
}
|