Elin Modding Docs Doc
All Classes Namespaces
UI.cs
1using System;
2using System.Collections.Generic;
3using System.Reflection;
4using DG.Tweening;
5using DG.Tweening.Core;
6using DG.Tweening.Plugins.Options;
7using UnityEngine;
8using UnityEngine.UI;
9
10// Token: 0x020005CF RID: 1487
11public class UI : ELayer
12{
13 // Token: 0x17000BD0 RID: 3024
14 // (get) Token: 0x060028CE RID: 10446 RVA: 0x000E6BD9 File Offset: 0x000E4DD9
15 public SkinManager skins
16 {
17 get
18 {
19 return ELayer.core.skins;
20 }
21 }
22
23 // Token: 0x17000BD1 RID: 3025
24 // (get) Token: 0x060028CF RID: 10447 RVA: 0x000E6BE5 File Offset: 0x000E4DE5
25 public bool IsActive
26 {
27 get
28 {
29 return this.layers.Count > 0 || this.contextMenu.isActive;
30 }
31 }
32
33 // Token: 0x17000BD2 RID: 3026
34 // (get) Token: 0x060028D0 RID: 10448 RVA: 0x000E6C02 File Offset: 0x000E4E02
35 public bool AllowInventoryInteractions
36 {
37 get
38 {
39 return !this.contextMenu.isActive && (this.layers.Count == 0 || base.TopLayer.option.allowInventoryInteraction);
40 }
41 }
42
43 // Token: 0x17000BD3 RID: 3027
44 // (get) Token: 0x060028D1 RID: 10449 RVA: 0x000E6C32 File Offset: 0x000E4E32
45 public bool BlockActions
46 {
47 get
48 {
49 return (this.wasActive && (!base.TopLayer || !base.TopLayer.option.passive)) || EInput.isInputFieldActive;
50 }
51 }
52
53 // Token: 0x17000BD4 RID: 3028
54 // (get) Token: 0x060028D2 RID: 10450 RVA: 0x000E6C62 File Offset: 0x000E4E62
55 public bool BlockMouseOverUpdate
56 {
57 get
58 {
59 return this.wasActive;
60 }
61 }
62
63 // Token: 0x17000BD5 RID: 3029
64 // (get) Token: 0x060028D3 RID: 10451 RVA: 0x000E6C6A File Offset: 0x000E4E6A
65 public bool BlockInput
66 {
67 get
68 {
69 return this.IsDragging || base.IsBlockWidgetClick() || LayerAbility.hotElement != null || EInput.isInputFieldActive || this.contextMenu.isActive;
70 }
71 }
72
73 // Token: 0x17000BD6 RID: 3030
74 // (get) Token: 0x060028D4 RID: 10452 RVA: 0x000E6C9D File Offset: 0x000E4E9D
75 public bool IsPauseGame
76 {
77 get
78 {
79 return this.layers.Count > 0 && base.TopLayer.option.pauseGame;
80 }
81 }
82
83 // Token: 0x17000BD7 RID: 3031
84 // (get) Token: 0x060028D5 RID: 10453 RVA: 0x000E6CBF File Offset: 0x000E4EBF
85 public bool IsInventoryOpen
86 {
87 get
88 {
89 return this.layerFloat.GetLayer<LayerInventory>(false);
90 }
91 }
92
93 // Token: 0x17000BD8 RID: 3032
94 // (get) Token: 0x060028D6 RID: 10454 RVA: 0x000E6CD2 File Offset: 0x000E4ED2
95 public bool IsAbilityOpen
96 {
97 get
98 {
99 return this.layerFloat.GetLayer<LayerAbility>(false);
100 }
101 }
102
103 // Token: 0x17000BD9 RID: 3033
104 // (get) Token: 0x060028D7 RID: 10455 RVA: 0x000E6CE5 File Offset: 0x000E4EE5
105 public override bool blockWidgetClick
106 {
107 get
108 {
109 return false;
110 }
111 }
112
113 // Token: 0x17000BDA RID: 3034
114 // (get) Token: 0x060028D8 RID: 10456 RVA: 0x000E6CE8 File Offset: 0x000E4EE8
115 public override RectTransform rectLayers
116 {
117 get
118 {
119 return this._rectLayers;
120 }
121 }
122
123 // Token: 0x17000BDB RID: 3035
124 // (get) Token: 0x060028D9 RID: 10457 RVA: 0x000E6CF0 File Offset: 0x000E4EF0
125 public bool IsDragging
126 {
127 get
128 {
129 return this.currentDrag != null;
130 }
131 }
132
133 // Token: 0x060028DA RID: 10458 RVA: 0x000E6CFB File Offset: 0x000E4EFB
134 protected override void Awake()
135 {
136 base.Awake();
137 base.InvokeRepeating("CheckWindowOrder", 1f, 0.5f);
138 }
139
140 // Token: 0x060028DB RID: 10459 RVA: 0x000E6D18 File Offset: 0x000E4F18
141 public void OnCoreStart()
142 {
143 this.mouseInfo.SetActive(false);
144 }
145
146 // Token: 0x060028DC RID: 10460 RVA: 0x000E6D28 File Offset: 0x000E4F28
147 public void OnActivateZone()
148 {
149 this.widgets.OnActivateZone();
150 ELayer.player.queues.SetOwner(ELayer.pc);
151 if (this.hud.hangCorner && this.hud.hangCorner.isActiveAndEnabled)
152 {
153 this.hud.hangCorner.Refresh();
154 }
155 }
156
157 // Token: 0x060028DD RID: 10461 RVA: 0x000E6D88 File Offset: 0x000E4F88
158 public void ShowFloats()
159 {
160 this.layerFloat.SetActive(true);
161 }
162
163 // Token: 0x060028DE RID: 10462 RVA: 0x000E6D96 File Offset: 0x000E4F96
164 public void HideFloats()
165 {
166 this.layerFloat.SetActive(false);
167 }
168
169 // Token: 0x060028DF RID: 10463 RVA: 0x000E6DA4 File Offset: 0x000E4FA4
170 public void OnKillGame()
171 {
172 this.widgets.OnKillGame();
173 this.ShowBalloon(true);
174 this.layerFloat.RemoveLayers(true);
175 this.currentDrag = null;
176 }
177
178 // Token: 0x060028E0 RID: 10464 RVA: 0x000E6DCB File Offset: 0x000E4FCB
179 public void OnClickAction(string _mode)
180 {
181 base.RemoveLayers(false);
182 ((ActionMode)typeof(ActionMode).GetField(_mode, BindingFlags.Static | BindingFlags.Public).GetValue(null)).Activate(true, false);
183 }
184
185 // Token: 0x060028E1 RID: 10465 RVA: 0x000E6DF8 File Offset: 0x000E4FF8
186 public void RefreshActiveState()
187 {
188 this.isPointerOverUI = false;
189 foreach (GameObject gameObject in InputModuleEX.GetPointerEventData(-1).hovered)
190 {
191 if (gameObject && gameObject.layer == 5)
192 {
193 this.isPointerOverUI = true;
194 break;
195 }
196 }
197 this.wasActive = this.IsActive;
198 if (this.wasActive)
199 {
200 CursorSystem.SetCursor(null, 0);
201 }
202 }
203
204 // Token: 0x060028E2 RID: 10466 RVA: 0x000E6E88 File Offset: 0x000E5088
205 public override void OnChangeLayer()
206 {
207 this.RefreshActiveState();
208 CursorSystem.SetCursor(null, 0);
209 this.hud.HideMouseInfo();
210 if (ELayer.core.IsGameStarted)
211 {
212 ELayer.scene.actionMode.OnUpdateCursor();
213 }
214 CursorSystem.Instance.Draw();
215 Layer topLayer = base.TopLayer;
216 if (topLayer != null && topLayer.option.dontShowHint)
217 {
218 return;
219 }
220 if (this.layers.Count == 0)
221 {
222 this.hud.hint.Refresh();
223 return;
224 }
225 if (base.TopLayer.option.hideFloatUI)
226 {
227 this.HideFloats();
228 }
229 if (base.TopLayer.option.hideWidgets)
230 {
231 this.widgets.Hide();
232 }
233 ELayer elayer = base.TopLayer as ELayer;
234 if (elayer == null)
235 {
236 return;
237 }
238 elayer.TryShowHint(null);
239 }
240
241 // Token: 0x060028E3 RID: 10467 RVA: 0x000E6F58 File Offset: 0x000E5158
242 public void FlashCover(float durationOut = 1f, float duration = 1f, float durationIn = 1f, Action onFadeOut = null, Action onComplete = null, Color color = default(Color))
243 {
244 this.ShowCover(durationOut, 1f, null, color);
245 TweenUtil.Tween(durationOut + duration, null, delegate()
246 {
247 if (onFadeOut != null)
248 {
249 onFadeOut();
250 }
251 this.HideCover(durationIn, onComplete);
252 });
253 }
254
255 // Token: 0x060028E4 RID: 10468 RVA: 0x000E6FB0 File Offset: 0x000E51B0
256 public void ShowCover(float duration = 0f, float dest = 1f, Action onComplete = null, Color color = default(Color))
257 {
258 TweenUtil.KillTween(ref this.tweenCover, false);
259 float a = this.hud.imageCover.color.a;
260 this.hud.imageCover.color = ((color == default(Color)) ? Color.black : color).SetAlpha(a);
261 this.hud.imageCover.SetActive(true);
262 this.hidingCover = false;
263 this.tweenCover = this.hud.imageCover.DOFade(dest, duration).OnComplete(delegate
264 {
265 Action onComplete2 = onComplete;
266 if (onComplete2 == null)
267 {
268 return;
269 }
270 onComplete2();
271 });
272 }
273
274 // Token: 0x060028E5 RID: 10469 RVA: 0x000E7060 File Offset: 0x000E5260
275 public void HideCover(float duration = 0f, Action onComplete = null)
276 {
277 if (this.hidingCover)
278 {
279 return;
280 }
281 this.hidingCover = true;
282 TweenUtil.KillTween(ref this.tweenCover, false);
283 this.tweenCover = this.hud.imageCover.DOFade(0f, duration).OnComplete(delegate
284 {
285 this.hud.imageCover.SetActive(false);
286 Action onComplete2 = onComplete;
287 if (onComplete2 != null)
288 {
289 onComplete2();
290 }
291 this.hidingCover = false;
292 });
293 }
294
295 // Token: 0x060028E6 RID: 10470 RVA: 0x000E70CB File Offset: 0x000E52CB
296 public bool IsCovered()
297 {
298 return !this.hidingCover;
299 }
300
301 // Token: 0x060028E7 RID: 10471 RVA: 0x000E70D6 File Offset: 0x000E52D6
302 public void ShowBalloon(bool enable)
303 {
304 ELayer.ui.rectDynamic.SetActive(enable);
305 WidgetSystemIndicator.Refresh();
306 }
307
308 // Token: 0x060028E8 RID: 10472 RVA: 0x000E70F0 File Offset: 0x000E52F0
309 public void Show(float duration = 1f)
310 {
311 ELayer.scene.elomapActor.selector.srHighlight.SetActive(true);
312 this.cg.DOKill(false);
313 if (duration == 0f)
314 {
315 this.cg.alpha = 1f;
316 return;
317 }
318 this.cg.DOFade(1f, duration);
319 }
320
321 // Token: 0x060028E9 RID: 10473 RVA: 0x000E7150 File Offset: 0x000E5350
322 public void Hide(float duration = 1f)
323 {
324 ELayer.scene.elomapActor.selector.srHighlight.SetActive(false);
325 if (duration == 0f)
326 {
327 this.cg.alpha = 0f;
328 return;
329 }
330 this.cg.DOFade(0f, duration);
331 }
332
333 // Token: 0x060028EA RID: 10474 RVA: 0x000E71A4 File Offset: 0x000E53A4
334 public void OnUpdate()
335 {
336 if (this.hud.imageDrag.gameObject.activeSelf)
337 {
338 this.hud.imageDrag.transform.position = EInput.mpos + (ELayer.game.UseGrid ? this.hud.imageDragFix2 : this.hud.imageDragFix2);
339 Util.ClampToScreen(this.hud.imageDrag.Rect(), this.hud.marginImageDrag);
340 }
341 if (ELayer.config.ui.blur && this.layers.Count > 0 && base.IsUseBlur())
342 {
343 UI.blurSize += Time.unscaledDeltaTime * this.blurSpeed;
344 if (UI.blurSize > ELayer.config.ui.blurSize)
345 {
346 UI.blurSize = ELayer.config.ui.blurSize;
347 }
348 if (!this.blur.activeSelf)
349 {
350 this.blur.SetActive(true);
351 }
352 int siblingIndex = this.blur.transform.GetSiblingIndex();
353 int num = 0;
354 for (int i = this.layers.Count - 1; i >= 0; i--)
355 {
356 if (this.layers[i].IsUseBlur())
357 {
358 num = this.layers[i].transform.GetSiblingIndex() - 1;
359 break;
360 }
361 }
362 if (siblingIndex != num)
363 {
364 this.blur.transform.SetSiblingIndex(num);
365 }
366 }
367 else
368 {
369 UI.blurSize -= Time.unscaledDeltaTime * this.blurSpeed;
370 if (UI.blurSize < 0f)
371 {
372 UI.blurSize = 0f;
373 }
374 if (this.blur.activeSelf && UI.blurSize == 0f)
375 {
376 this.blur.SetActive(false);
377 }
378 }
379 this.matBlur.SetFloat("_Size", UI.blurSize);
380 if (!EInput.isShiftDown)
381 {
382 LayerInventory.highlightInv = null;
383 }
384 this.ShowMouseHint();
385 }
386
387 // Token: 0x060028EB RID: 10475 RVA: 0x000E739C File Offset: 0x000E559C
388 public void ShowMouseHint()
389 {
390 if (this.durationHideMouseHint > 0f)
391 {
392 this.durationHideMouseHint -= Core.delta;
393 this.hud.textMouseHintLeft.SetActive(false);
394 this.hud.textMouseHintRight.SetActive(false);
395 return;
396 }
397 IMouseHint mouseHint = UIButton.currentHighlight as IMouseHint;
398 bool flag = mouseHint != null && !this.IsDragging && this.isPointerOverUI && UIButton.currentHighlight && InputModuleEX.IsPointerOver(UIButton.currentHighlight) && LayerAbility.hotElement == null;
399 bool flag2 = flag;
400 if (flag2)
401 {
402 if (mouseHint.ShowMouseHintLeft())
403 {
404 this.hud.textMouseHintLeft.text = mouseHint.GetTextMouseHintLeft();
405 if (this.hud.textMouseHintLeft.text == "")
406 {
407 flag2 = false;
408 }
409 }
410 else
411 {
412 flag2 = false;
413 }
414 }
415 if (flag)
416 {
417 if (mouseHint.ShowMouseHintRight())
418 {
419 this.hud.textMouseHintRight.text = mouseHint.GetTextMouseHintRight();
420 if (this.hud.textMouseHintRight.text == "")
421 {
422 flag = false;
423 }
424 }
425 else
426 {
427 flag = false;
428 }
429 }
430 this.hud.textMouseHintLeft.SetActive(flag2);
431 this.hud.textMouseHintRight.SetActive(flag);
432 if (flag || flag2)
433 {
434 this.hud.textMouseHintLeft.transform.position = UIButton.currentHighlight.transform.position + this.hud.textMouseHintFixLeft;
435 this.hud.textMouseHintRight.transform.position = UIButton.currentHighlight.transform.position + this.hud.textMouseHintFix;
436 Util.ClampToScreen(this.hud.textMouseHintRight.Rect(), 10);
437 }
438 }
439
440 // Token: 0x060028EC RID: 10476 RVA: 0x000E755E File Offset: 0x000E575E
441 public void HideMouseHint(float duration = 0.2f)
442 {
443 this.durationHideMouseHint = duration;
444 this.hud.textMouseHintLeft.SetActive(false);
445 this.hud.textMouseHintRight.SetActive(false);
446 }
447
448 // Token: 0x060028ED RID: 10477 RVA: 0x000E758C File Offset: 0x000E578C
449 public void CheckWindowOrder()
450 {
451 if (this.layers.Count > 0)
452 {
453 return;
454 }
455 foreach (GameObject gameObject in InputModuleEX.GetPointerEventData(-1).hovered)
456 {
457 if (gameObject)
458 {
459 Widget component = gameObject.GetComponent<Widget>();
460 if (component && !component.AlwaysBottom && this.widgets.transform.GetChild(this.widgets.transform.childCount - 1) != gameObject.transform)
461 {
462 gameObject.transform.SetAsLastSibling();
463 break;
464 }
465 }
466 }
467 if (WidgetFeed.Instance)
468 {
469 WidgetFeed.Instance.transform.SetAsLastSibling();
470 }
471 }
472
473 // Token: 0x060028EE RID: 10478 RVA: 0x000E7664 File Offset: 0x000E5864
474 public void ShowSceneSelector()
475 {
476 this.canvasScaler.scaleFactor = 1f;
477 Shader.SetGlobalFloat("_UIBrightness", 1f);
478 Shader.SetGlobalFloat("_UIContrast", 1f);
479 this.layoutLang.SetActive(true);
480 List<CoreDebug.StartScene> list = Util.EnumToList<CoreDebug.StartScene>();
481 Button t = this.layoutLang.CreateMold(null);
482 foreach (CoreDebug.StartScene l in list)
483 {
484 Button button = Util.Instantiate<Button>(t, this.layoutLang);
485 CoreDebug.StartScene _l = l;
486 button.GetComponentInChildren<Text>().text = l.ToString();
487 button.onClick.AddListener(delegate()
488 {
489 this.layoutLang.SetActive(false);
490 ELayer.debug.startScene = _l;
491 ELayer.core.Init();
492 });
493 }
494 this.layoutLang.RebuildLayout(false);
495 }
496
497 // Token: 0x060028EF RID: 10479 RVA: 0x000E7750 File Offset: 0x000E5950
498 public void ShowLang()
499 {
500 this.canvasScaler.scaleFactor = 1f;
501 Shader.SetGlobalFloat("_UIBrightness", 1f);
502 Shader.SetGlobalFloat("_UIContrast", 1f);
503 this.layoutLang.SetActive(true);
504 Button t = this.layoutLang.CreateMold(null);
505 foreach (LangSetting langSetting in MOD.langs.Values)
506 {
507 Button button = Util.Instantiate<Button>(t, this.layoutLang);
508 LangSetting _l = langSetting;
509 button.GetComponentInChildren<Text>().text = langSetting.name + " (" + langSetting.name_en + ")";
510 button.onClick.AddListener(delegate()
511 {
512 this.layoutLang.SetActive(false);
513 ELayer.core.langCode = _l.id;
514 if (ELayer.debug.showSceneSelector || (Input.GetKey(KeyCode.LeftShift) && ELayer.debug.enable))
515 {
516 this.ShowSceneSelector();
517 return;
518 }
519 ELayer.core.Init();
520 });
521 }
522 this.layoutLang.RebuildLayout(false);
523 }
524
525 // Token: 0x060028F0 RID: 10480 RVA: 0x000E7850 File Offset: 0x000E5A50
526 public void SetLight(bool enable)
527 {
528 }
529
530 // Token: 0x060028F1 RID: 10481 RVA: 0x000E7852 File Offset: 0x000E5A52
531 public UIContextMenu CreateContextMenu(string cid = "ContextMenu")
532 {
533 return this.contextMenu.Create(cid, true);
534 }
535
536 // Token: 0x060028F2 RID: 10482 RVA: 0x000E7861 File Offset: 0x000E5A61
537 public UIContextMenu CreateContextMenuInteraction()
538 {
539 return this.contextMenu.Create("ContextInteraction", true);
540 }
541
542 // Token: 0x060028F3 RID: 10483 RVA: 0x000E7874 File Offset: 0x000E5A74
543 public void Say(string text, Sprite sprite = null)
544 {
545 this.popSystem.PopText(text.lang(), sprite, "PopAchievement", default(Color), default(Vector3), 0f);
546 Debug.Log(text);
547 }
548
549 // Token: 0x060028F4 RID: 10484 RVA: 0x000E78B8 File Offset: 0x000E5AB8
550 public void FreezeScreen(float duration)
551 {
552 if (this.texFreeze)
553 {
554 UnityEngine.Object.Destroy(this.texFreeze);
555 }
556 this.texFreeze = ScreenCapture.CaptureScreenshotAsTexture();
557 this.imageFreeze.SetActive(true);
558 this.imageFreeze.texture = this.texFreeze;
559 if (duration != 0f)
560 {
561 TweenUtil.Tween(duration, null, delegate()
562 {
563 this.UnfreezeScreen();
564 });
565 }
566 }
567
568 // Token: 0x060028F5 RID: 10485 RVA: 0x000E7921 File Offset: 0x000E5B21
569 public void UnfreezeScreen()
570 {
571 if (this.texFreeze)
572 {
573 UnityEngine.Object.DestroyImmediate(this.texFreeze);
574 }
575 this.imageFreeze.SetActive(false);
576 }
577
578 // Token: 0x060028F6 RID: 10486 RVA: 0x000E7948 File Offset: 0x000E5B48
579 public void ToggleAbility(bool delay = false)
580 {
581 if (!ELayer.game.altAbility)
582 {
583 if (!ELayer.ui.RemoveLayer<LayerAbility>())
584 {
585 LayerAbility layerAbility = ELayer.ui.AddLayer<LayerAbility>();
586 if (delay)
587 {
588 layerAbility.windows[0].SetRect(ELayer.core.refs.rects.center, false);
589 layerAbility.Delay(0.05f);
590 }
591 }
592 return;
593 }
594 if (ELayer.ui.layerFloat.GetLayer<LayerAbility>(false))
595 {
596 ELayer.ui.layerFloat.RemoveLayer<LayerAbility>();
597 ELayer.player.pref.layerAbility = false;
598 SE.Play("pop_ability_deactivate");
599 return;
600 }
601 ELayer.ui.layerFloat.AddLayer<LayerAbility>("LayerAbility/LayerAbilityFloat");
602 ELayer.player.pref.layerAbility = true;
603 }
604
605 // Token: 0x060028F7 RID: 10487 RVA: 0x000E7A14 File Offset: 0x000E5C14
606 public void ToggleInventory(bool delay = false)
607 {
608 if (!this.IsInventoryOpen)
609 {
610 this.OpenFloatInv(false);
611 return;
612 }
613 if (InvOwner.HasTrader)
614 {
615 SE.Beep();
616 return;
617 }
618 List<Card> list = new List<Card>();
619 foreach (LayerInventory layerInventory in LayerInventory.listInv)
620 {
621 if (layerInventory.IsPlayerContainer(false))
622 {
623 list.Add(layerInventory.invs[0].owner.Container);
624 }
625 }
626 LayerInventory.listInv.ForeachReverse(delegate(LayerInventory l)
627 {
628 if (l.IsPlayerContainer(true))
629 {
630 ELayer.ui.layerFloat.RemoveLayer(l);
631 }
632 });
633 ELayer.ui.widgets.DeactivateWidget("Equip");
634 foreach (Card card in list)
635 {
636 card.c_windowSaveData.open = true;
637 }
638 SE.Play("pop_inventory_deactivate");
639 }
640
641 // Token: 0x060028F8 RID: 10488 RVA: 0x000E7B34 File Offset: 0x000E5D34
642 public void OpenFloatInv(bool ignoreSound = false)
643 {
644 if (ignoreSound)
645 {
646 SoundManager.ignoreSounds = true;
647 }
648 ELayer.ui.layerFloat.AddLayer(LayerInventory.CreatePCBackpack(false));
649 SoundManager.ignoreSounds = true;
650 ELayer.ui.widgets.Activate("Equip");
651 foreach (Thing thing in ELayer.pc.things.List((Thing a) => a.trait.IsContainer, false))
652 {
653 Window.SaveData c_windowSaveData = thing.c_windowSaveData;
654 if (!(thing.trait is TraitToolBelt) && c_windowSaveData != null && c_windowSaveData.open)
655 {
656 LayerInventory.CreateContainer(thing);
657 }
658 }
659 SoundManager.ignoreSounds = false;
660 }
661
662 // Token: 0x060028F9 RID: 10489 RVA: 0x000E7C10 File Offset: 0x000E5E10
663 public void ToggleFeedback()
664 {
665 if (ELayer.core.IsGameStarted && !ELayer.ui.GetLayer<LayerFeedback>(false) && ELayer.pc.HasCondition<ConHallucination>())
666 {
667 SE.Play("wow");
668 Msg.Say("bug_hal");
669 return;
670 }
671 ELayer.ui.ToggleLayer<LayerFeedback>(null);
672 SE.Tab();
673 }
674
675 // Token: 0x060028FA RID: 10490 RVA: 0x000E7C70 File Offset: 0x000E5E70
676 public void StartDrag(DragItem item)
677 {
678 this.dragDuration = 0f;
679 if (this.currentDrag != null)
680 {
681 this.EndDrag(true);
682 if (this.currentDrag != null)
683 {
684 return;
685 }
686 }
687 this.currentDrag = item;
688 item.OnStartDrag();
689 this.OnDrag();
690 ELayer.core.actionsNextFrame.Add(delegate
691 {
692 TooltipManager.Instance.HideTooltips(true);
693 });
694 }
695
696 // Token: 0x060028FB RID: 10491 RVA: 0x000E7CE1 File Offset: 0x000E5EE1
697 public void OnDrag()
698 {
699 this.dragDuration += Core.delta;
700 this.currentDrag.OnDrag(false, false);
701 }
702
703 // Token: 0x060028FC RID: 10492 RVA: 0x000E7D04 File Offset: 0x000E5F04
704 public void EndDrag(bool canceled = false)
705 {
706 if (this.currentDrag == null)
707 {
708 return;
709 }
710 bool flag = this.currentDrag.OnDrag(true, canceled);
711 EInput.Consume(false, 1);
712 EInput.dragHack = 0f;
713 if (flag)
714 {
715 ELayer.ui.RemoveLayer<LayerRegisterHotbar>();
716 this.currentDrag.OnEndDrag();
717 this.currentDrag = null;
718 if (this.nextDrag != null)
719 {
720 this.StartDrag(this.nextDrag);
721 this.nextDrag = null;
722 }
723 else
724 {
725 this.hud.SetDragImage(null, null, null);
726 }
727 UIButton.TryShowTip(null, true, true);
728 return;
729 }
730 SE.BeepSmall();
731 }
732
733 // Token: 0x040016F1 RID: 5873
734 private static float blurSize;
735
736 // Token: 0x040016F2 RID: 5874
737 public Canvas canvas;
738
739 // Token: 0x040016F3 RID: 5875
740 public HUD hud;
741
742 // Token: 0x040016F4 RID: 5876
743 public ExtraHint extraHint;
744
745 // Token: 0x040016F5 RID: 5877
746 public InputModuleEX inputModule;
747
748 // Token: 0x040016F6 RID: 5878
749 public UIContextMenuManager contextMenu;
750
751 // Token: 0x040016F7 RID: 5879
752 public WidgetManager widgets;
753
754 // Token: 0x040016F8 RID: 5880
755 public UIMouseInfo mouseInfo;
756
757 // Token: 0x040016F9 RID: 5881
758 public RectTransform rectDynamic;
759
760 // Token: 0x040016FA RID: 5882
761 public RectTransform rectDynamicEssential;
762
763 // Token: 0x040016FB RID: 5883
764 public RectTransform _rectLayers;
765
766 // Token: 0x040016FC RID: 5884
767 public ReflexConsole console;
768
769 // Token: 0x040016FD RID: 5885
770 public GameObject blur;
771
772 // Token: 0x040016FE RID: 5886
773 public Material matBlur;
774
775 // Token: 0x040016FF RID: 5887
776 public LayoutGroup layoutLang;
777
778 // Token: 0x04001700 RID: 5888
779 public CanvasScaler canvasScaler;
780
781 // Token: 0x04001701 RID: 5889
782 public Image light;
783
784 // Token: 0x04001702 RID: 5890
785 public CanvasGroup cg;
786
787 // Token: 0x04001703 RID: 5891
788 public int minWidth;
789
790 // Token: 0x04001704 RID: 5892
791 public Layer layerFloat;
792
793 // Token: 0x04001705 RID: 5893
794 public UIAutoTurn autoTurn;
795
796 // Token: 0x04001706 RID: 5894
797 public PopManager popGame;
798
799 // Token: 0x04001707 RID: 5895
800 public PopManager popSystem;
801
802 // Token: 0x04001708 RID: 5896
803 public float blurSpeed;
804
805 // Token: 0x04001709 RID: 5897
806 public Texture2D texFreeze;
807
808 // Token: 0x0400170A RID: 5898
809 public RawImage imageFreeze;
810
811 // Token: 0x0400170B RID: 5899
812 public DragItem currentDrag;
813
814 // Token: 0x0400170C RID: 5900
815 public DragItem nextDrag;
816
817 // Token: 0x0400170D RID: 5901
818 private bool hidingCover;
819
820 // Token: 0x0400170E RID: 5902
821 [NonSerialized]
822 public float lightContrast;
823
824 // Token: 0x0400170F RID: 5903
825 [NonSerialized]
826 public float dragDuration;
827
828 // Token: 0x04001710 RID: 5904
829 private Tween tweenCover;
830
831 // Token: 0x04001711 RID: 5905
832 [NonSerialized]
833 public bool wasActive;
834
835 // Token: 0x04001712 RID: 5906
836 [NonSerialized]
837 public bool isPointerOverUI;
838
839 // Token: 0x04001713 RID: 5907
840 private float durationHideMouseHint;
841}
Definition Card.cs:13
Definition HUD.cs:8
Definition Msg.cs:7
Definition Thing.cs:10