Elin Modding Docs Doc
Loading...
Searching...
No Matches
WidgetHotbar.cs
1using System;
2using System.Collections.Generic;
3using DG.Tweening;
4using DG.Tweening.Core;
5using DG.Tweening.Plugins.Options;
6using UnityEngine;
7using UnityEngine.UI;
8
9// Token: 0x02000600 RID: 1536
10public class WidgetHotbar : Widget, IDragParent
11{
12 // Token: 0x06002A92 RID: 10898 RVA: 0x000EF87A File Offset: 0x000EDA7A
13 public override object CreateExtra()
14 {
15 return new WidgetHotbar.Extra();
16 }
17
18 // Token: 0x17000C28 RID: 3112
19 // (get) Token: 0x06002A93 RID: 10899 RVA: 0x000EF881 File Offset: 0x000EDA81
20 public WidgetHotbar.Extra extra
21 {
22 get
23 {
24 return base.config.extra as WidgetHotbar.Extra;
25 }
26 }
27
28 // Token: 0x17000C29 RID: 3113
29 // (get) Token: 0x06002A94 RID: 10900 RVA: 0x000EF893 File Offset: 0x000EDA93
30 public Hotbar hotbar
31 {
32 get
33 {
34 return EMono.player.hotbars.bars[this.idHotbar];
35 }
36 }
37
38 // Token: 0x17000C2A RID: 3114
39 // (get) Token: 0x06002A95 RID: 10901 RVA: 0x000EF8AB File Offset: 0x000EDAAB
40 // (set) Token: 0x06002A96 RID: 10902 RVA: 0x000EF8B8 File Offset: 0x000EDAB8
41 public bool Visible
42 {
43 get
44 {
45 return this.extra.visible;
46 }
47 set
48 {
49 this.extra.visible = value;
50 }
51 }
52
53 // Token: 0x17000C2B RID: 3115
54 // (get) Token: 0x06002A97 RID: 10903 RVA: 0x000EF8C6 File Offset: 0x000EDAC6
55 public override bool ShowInBuildMode
56 {
57 get
58 {
59 return this.extra.alwaysShow;
60 }
61 }
62
63 // Token: 0x17000C2C RID: 3116
64 // (get) Token: 0x06002A98 RID: 10904 RVA: 0x000EF8D3 File Offset: 0x000EDAD3
65 public bool IsHotbarSpeed
66 {
67 get
68 {
69 return this.idHotbar == 7;
70 }
71 }
72
73 // Token: 0x17000C2D RID: 3117
74 // (get) Token: 0x06002A99 RID: 10905 RVA: 0x000EF8DE File Offset: 0x000EDADE
75 public bool CanRegisterItem
76 {
77 get
78 {
79 return this.hotbar.IsUserHotbar;
80 }
81 }
82
83 // Token: 0x06002A9A RID: 10906 RVA: 0x000EF8EC File Offset: 0x000EDAEC
84 public override bool CanShowContextMenu()
85 {
86 if (this.hotbar.IsUserHotbar)
87 {
88 ButtonHotItem componentOf = InputModuleEX.GetComponentOf<ButtonHotItem>();
89 if (componentOf && componentOf.item != null)
90 {
91 return true;
92 }
93 }
94 return base.CanShowContextMenu();
95 }
96
97 // Token: 0x06002A9B RID: 10907 RVA: 0x000EF924 File Offset: 0x000EDB24
98 public override void OnActivate()
99 {
100 this.mold = this.layout.CreateMold(null);
101 if (this.idHotbar == 2)
102 {
103 WidgetHotbar.HotBarMainMenu = this;
104 }
105 if (this.idHotbar == 3)
106 {
107 WidgetHotbar.HotbarBuild = this;
108 }
109 if (this.idHotbar == 5)
110 {
111 WidgetHotbar.HotbarExtra = this;
112 }
113 if (this.extra.rows == 0)
114 {
115 this.extra.rows = this.hotbar.itemsPerPage;
116 }
117 this.hotbar.actor = this;
118 this.Rebuild();
119 }
120
121 // Token: 0x06002A9C RID: 10908 RVA: 0x000EF9A5 File Offset: 0x000EDBA5
122 public override void OnChangeActionMode()
123 {
124 base.OnChangeActionMode();
125 if (this.hotbar.dirty)
126 {
127 this.hotbar.dirty = false;
128 this.Rebuild();
129 }
130 this.RefreshHighlight();
131 }
132
133 // Token: 0x06002A9D RID: 10909 RVA: 0x000EF9D4 File Offset: 0x000EDBD4
134 public void Rebuild()
135 {
136 this.buttons.Clear();
137 this.layout.cellSize = EMono.setting.ui.iconSizes[this.extra.iconSize];
138 this.layout.constraintCount = this.extra.width;
139 this.layout.constraint = (this.extra.vertical ? GridLayoutGroup.Constraint.FixedColumnCount : GridLayoutGroup.Constraint.FixedRowCount);
140 this.layout.startCorner = (this.extra.reverse ? GridLayoutGroup.Corner.LowerRight : GridLayoutGroup.Corner.UpperLeft);
141 int num = this.extra.rows;
142 if (this.extra.autoSize)
143 {
144 num = 0;
145 int num2 = 0;
146 while (num2 < this.hotbar.CurrentPage.items.Count && this.hotbar.CurrentPage.items[num2] != null)
147 {
148 num++;
149 num2++;
150 }
151 }
152 int num3 = (num - 1) / this.extra.width + 1;
153 int num4 = this.extra.vertical ? this.extra.width : num3;
154 int num5 = this.extra.vertical ? num3 : this.extra.width;
155 this.imageGrid.uvRect = new Rect(1f, 1f, (float)num4, (float)num5);
156 this.layout.DestroyChildren(false, true);
157 for (int i = 0; i < num; i++)
158 {
159 ButtonHotItem buttonHotItem = Util.Instantiate<ButtonHotItem>(this.mold, this.layout);
160 buttonHotItem.index = i;
161 buttonHotItem.mainText.text = ((i > 10) ? "" : ((i + 1).ToString() ?? ""));
162 buttonHotItem.widget = this;
163 this.buttons.Add(buttonHotItem);
164 if (this.useMask)
165 {
166 buttonHotItem.gameObject.AddComponent<RectMask2D>();
167 }
168 }
169 this.layout.RebuildLayout(false);
170 this.RebuildLayout(false);
171 this.RebuildPage(-1);
172 }
173
174 // Token: 0x06002A9E RID: 10910 RVA: 0x000EFBD4 File Offset: 0x000EDDD4
175 public void RebuildPage(int page = -1)
176 {
177 this.hotbar.SetPage((page == -1) ? this.hotbar.currentPage : page);
178 foreach (ButtonHotItem buttonHotItem in this.buttons)
179 {
180 HotItem item = this.hotbar.GetItem(buttonHotItem.index, -1);
181 buttonHotItem.SetItem(item);
182 }
183 this.SetVisible();
184 this.RefreshHighlight();
185 }
186
187 // Token: 0x06002A9F RID: 10911 RVA: 0x000EFC64 File Offset: 0x000EDE64
188 public static void RebuildPages()
189 {
190 foreach (Widget widget in EMono.ui.widgets.list)
191 {
192 WidgetHotbar widgetHotbar = widget as WidgetHotbar;
193 if (widgetHotbar)
194 {
195 widgetHotbar.RebuildPage(-1);
196 }
197 }
198 }
199
200 // Token: 0x06002AA0 RID: 10912 RVA: 0x000EFCD0 File Offset: 0x000EDED0
201 public void SwitchPage()
202 {
203 SE.ClickGeneral();
204 this.RebuildPage((this.hotbar.currentPage == 0) ? 1 : 0);
205 }
206
207 // Token: 0x06002AA1 RID: 10913 RVA: 0x000EFCEE File Offset: 0x000EDEEE
208 public HotItem GetItem(int index)
209 {
210 return this.hotbar.CurrentPage.items.TryGet(index, true);
211 }
212
213 // Token: 0x06002AA2 RID: 10914 RVA: 0x000EFD08 File Offset: 0x000EDF08
214 public void TryUse(int index)
215 {
216 HotItem item = this.GetItem(index);
217 if (item == null)
218 {
219 SE.BeepSmall();
220 return;
221 }
222 item.OnClick(item.button, this.hotbar);
223 }
224
225 // Token: 0x06002AA3 RID: 10915 RVA: 0x000EFD38 File Offset: 0x000EDF38
226 public void OnClickEmptyItem(ButtonHotItem b)
227 {
228 UIContextMenu uicontextMenu = EMono.ui.CreateContextMenu("ContextMenu");
229 this.SetShortcutMenu(b, uicontextMenu);
230 uicontextMenu.Show();
231 }
232
233 // Token: 0x06002AA4 RID: 10916 RVA: 0x000EFD64 File Offset: 0x000EDF64
234 public override void OnSetContextMenu(UIContextMenu m)
235 {
236 ButtonHotItem b = InputModuleEX.GetComponentOf<ButtonHotItem>();
237 if (this.showThisWidget || !b || b.item == null || base.IsSealed || b.widget.hotbar.IsLocked)
238 {
239 this.showThisWidget = false;
240 SkinSet skin = base.config.skin.Skin;
241 UIContextMenu uicontextMenu = m.AddChild("setting");
242 UIContextMenu uicontextMenu2 = m.AddChild("style");
243 if (!base.IsSealed)
244 {
245 uicontextMenu.AddSlider("numSlot", (float n) => n.ToString() ?? "", (float)this.extra.rows, delegate(float a)
246 {
247 this.extra.rows = (int)a;
248 this.hotbar.SetSlotNum((int)a);
249 this.Rebuild();
250 this.ClampToScreen();
251 }, 1f, 20f, true, false, false);
252 }
253 uicontextMenu2.AddSlider("iconSize", (float n) => n.ToString() ?? "", (float)this.extra.iconSize, delegate(float a)
254 {
255 this.extra.iconSize = (int)a;
256 this.Rebuild();
257 this.ClampToScreen();
258 }, 0f, (float)(EMono.setting.ui.iconSizes.Count - 1), true, true, false);
259 base.SetGridContextMenu(uicontextMenu2);
260 uicontextMenu.AddToggle("vertical", this.extra.vertical, delegate(bool a)
261 {
262 this.extra.vertical = a;
263 this.Rebuild();
264 this.ClampToScreen();
265 });
266 uicontextMenu.AddToggle("doubleBar", this.extra.width == 2, delegate(bool a)
267 {
268 this.extra.width = (a ? 2 : 1);
269 this.Rebuild();
270 this.ClampToScreen();
271 });
272 uicontextMenu.AddToggle("reverseOrder", this.extra.reverse, delegate(bool a)
273 {
274 this.extra.reverse = a;
275 this.Rebuild();
276 this.ClampToScreen();
277 });
278 if (!base.IsSealed)
279 {
280 uicontextMenu.AddToggle("alwaysShow2", this.extra.alwaysShow, delegate(bool a)
281 {
282 this.extra.alwaysShow = a;
283 });
284 }
285 base.SetBaseContextMenu(m);
286 if (!base.IsSealed)
287 {
288 Action <>9__12;
289 m.AddButton("resetHotbar", delegate()
290 {
291 string langDetail = "dialogResetHotbar";
292 Action actionYes;
293 if ((actionYes = <>9__12) == null)
294 {
295 actionYes = (<>9__12 = delegate()
296 {
297 EMono.player.hotbars.ResetHotbar(this.hotbar.id);
298 SE.Trash();
299 });
300 }
301 Dialog.YesNo(langDetail, actionYes, null, "yes", "no");
302 }, true);
303 return;
304 }
305 }
306 else
307 {
308 m.AddButton("removeHotItem", delegate()
309 {
310 this.hotbar.SetItem(null, b.index, -1, false);
311 this.RebuildPage(-1);
312 }, true);
313 b.item.OnShowContextMenu(m);
314 m.AddToggle("alwaysShow", b.item.always, delegate(bool on)
315 {
316 b.item.always = on;
317 });
318 Action <>9__13;
319 m.AddButton("thisWidget", delegate()
320 {
321 this.showThisWidget = true;
322 List<Action> actionsNextFrame = EMono.core.actionsNextFrame;
323 Action item;
324 if ((item = <>9__13) == null)
325 {
326 item = (<>9__13 = delegate()
327 {
328 this.ShowContextMenu();
329 });
330 }
331 actionsNextFrame.Add(item);
332 }, true);
333 }
334 }
335
336 // Token: 0x06002AA5 RID: 10917 RVA: 0x000EFFEC File Offset: 0x000EE1EC
337 public void SetShortcutMenu(ButtonHotItem b, UIContextMenu m)
338 {
339 Action<UIContextMenu, HotItem> action = delegate(UIContextMenu _m, HotItem i)
340 {
341 _m.AddButton(i.Name, delegate()
342 {
343 this.SetItem(b, i);
344 }, true);
345 };
346 UIContextMenu arg = m.AddChild("layerShortcuts");
347 action(arg, new HotItemLayer
348 {
349 id = "LayerHelp"
350 });
351 action(arg, new HotItemLayer
352 {
353 id = "stash"
354 });
355 action(arg, new HotItemLayer
356 {
357 id = "LayerAbility"
358 });
359 action(arg, new HotItemLayer
360 {
361 id = "LayerChara"
362 });
363 action(arg, new HotItemLayer
364 {
365 id = "LayerJournal"
366 });
367 action(arg, new HotItemWidget
368 {
369 id = "Roster"
370 });
371 action(arg, new HotItemWidget
372 {
373 id = "Codex"
374 });
375 action(arg, new HotItemWidget
376 {
377 id = "Search"
378 });
379 action(arg, new HotItemWidget
380 {
381 id = "Tracker"
382 });
383 action(arg, new HotItemWidget
384 {
385 id = "Memo"
386 });
387 action(arg, new HotItemWidget
388 {
389 id = "QuestTracker"
390 });
391 arg = m.AddChild("utilShortcuts");
392 action(arg, new HotItemToggle
393 {
394 type = HotItemToggle.Type.ToggleNoRoof
395 });
396 action(arg, new HotItemToggle
397 {
398 type = HotItemToggle.Type.muteBGM
399 });
400 action(arg, new HotItemToggle
401 {
402 type = HotItemToggle.Type.showBalloon
403 });
404 action(arg, new HotItemActionAudoDump());
405 if (EMono.core.config.test.unsealWidgets)
406 {
407 arg = m.AddChild("menuShortcuts");
408 action(arg, new HotItemContext
409 {
410 id = "system"
411 });
412 if (this == this.IsHotbarSpeed)
413 {
414 arg = m.AddChild("uniqueShortcuts");
415 action(arg, new HotItemSpeed
416 {
417 id = 0
418 });
419 action(arg, new HotItemSpeed
420 {
421 id = 1
422 });
423 action(arg, new HotItemSpeed
424 {
425 id = 2
426 });
427 action(arg, new HotItemSpeed
428 {
429 id = 3
430 });
431 }
432 }
433 arg = m.AddChild("specialShortcuts");
434 action(arg, new HotItemTogglePage());
435 action(arg, new HotItemToggleVisible());
436 m.AddButton("registerPos".lang(), delegate()
437 {
438 this.SetItem(b, new HotItemFocusPos
439 {
440 zone = EMono.game.activeZone,
441 x = EMono.pc.pos.x,
442 y = EMono.pc.pos.z
443 });
444 }, true);
445 m.AddButton("hotActionEQSet".lang(), delegate()
446 {
447 this.SetItem(b, new HotItemEQSet().Register());
448 }, true);
449 m.AddButton("hotActionSleep".lang(), delegate()
450 {
451 this.SetItem(b, new HotItemActionSleep());
452 }, true);
453 }
454
455 // Token: 0x06002AA6 RID: 10918 RVA: 0x000F0295 File Offset: 0x000EE495
456 public void SetItem(ButtonHotItem b, HotItem item)
457 {
458 item = this.hotbar.SetItem(item, b.index, -1, false);
459 b.SetItem(item);
460 this.RefreshHighlight();
461 this.SetVisible();
462 }
463
464 // Token: 0x06002AA7 RID: 10919 RVA: 0x000F02C4 File Offset: 0x000EE4C4
465 public static void RefreshHighlights()
466 {
467 foreach (Widget widget in EMono.ui.widgets.list)
468 {
469 WidgetHotbar widgetHotbar = widget as WidgetHotbar;
470 if (widgetHotbar)
471 {
472 widgetHotbar.RefreshHighlight();
473 }
474 }
475 }
476
477 // Token: 0x06002AA8 RID: 10920 RVA: 0x000F0330 File Offset: 0x000EE530
478 public static void RefreshButtons()
479 {
480 foreach (Widget widget in EMono.ui.widgets.list)
481 {
482 WidgetHotbar widgetHotbar = widget as WidgetHotbar;
483 if (widgetHotbar)
484 {
485 foreach (ButtonHotItem buttonHotItem in widgetHotbar.buttons)
486 {
487 buttonHotItem.RefreshItem();
488 }
489 }
490 }
491 }
492
493 // Token: 0x06002AA9 RID: 10921 RVA: 0x000F03D4 File Offset: 0x000EE5D4
494 public bool RefreshHighlight()
495 {
496 bool result = false;
497 foreach (ButtonHotItem buttonHotItem in this.buttons)
498 {
499 if (buttonHotItem.item != null)
500 {
501 if (buttonHotItem.item.UseIconForHighlight)
502 {
503 if (buttonHotItem.item.ShouldHighlight())
504 {
505 result = true;
506 buttonHotItem.icon.sprite = buttonHotItem.item.GetSprite(true);
507 }
508 else
509 {
510 buttonHotItem.icon.sprite = buttonHotItem.item.GetSprite();
511 }
512 }
513 else if (buttonHotItem.item.ShouldHighlight())
514 {
515 result = true;
516 buttonHotItem.image.sprite = buttonHotItem.item.SpriteHighlight;
517 if (!this.Visible && buttonHotItem.item.KeepVisibleWhenHighlighted)
518 {
519 this.ToggleVisible();
520 }
521 }
522 else
523 {
524 buttonHotItem.image.sprite = EMono.core.refs.spritesHighlight[0];
525 }
526 }
527 }
528 return result;
529 }
530
531 // Token: 0x06002AAA RID: 10922 RVA: 0x000F04E4 File Offset: 0x000EE6E4
532 public void _OnDirtyInventory()
533 {
534 foreach (ButtonHotItem buttonHotItem in this.buttons)
535 {
536 if (buttonHotItem.item != null)
537 {
538 buttonHotItem.Refresh();
539 }
540 }
541 }
542
543 // Token: 0x06002AAB RID: 10923 RVA: 0x000F0540 File Offset: 0x000EE740
544 public void SetVisible()
545 {
546 UIButton componentOf = InputModuleEX.GetComponentOf<UIButton>();
547 int num = 0;
548 bool flag = false;
549 foreach (ButtonHotItem buttonHotItem in this.buttons)
550 {
551 bool flag2 = buttonHotItem.item is HotItemToggleVisible;
552 bool flag3 = this.Visible || flag2 || (buttonHotItem.item != null && buttonHotItem.item.always);
553 buttonHotItem.image.enabled = flag3;
554 buttonHotItem.mainText.enabled = flag3;
555 buttonHotItem.icon.SetActive(flag3);
556 if (!flag2 && buttonHotItem != componentOf)
557 {
558 buttonHotItem.DoNormalTransition(true);
559 }
560 if (flag3)
561 {
562 num++;
563 }
564 if (flag2)
565 {
566 flag = true;
567 }
568 }
569 if (num == 0 && !this.Visible)
570 {
571 this.Visible = true;
572 this.SetVisible();
573 }
574 base.CancelInvoke("CheckAutoHide");
575 if (flag)
576 {
577 this.timeSinceBecomeVisible = 0f;
578 base.InvokeRepeating("CheckAutoHide", 0.1f, 0.2f);
579 }
580 this.imageBG.enabled = (this.imageGrid.enabled = this.extra.visible);
581 this.dragPanel.SetActive(this.extra.visible);
582 }
583
584 // Token: 0x06002AAC RID: 10924 RVA: 0x000F06A8 File Offset: 0x000EE8A8
585 public void ToggleVisible()
586 {
587 this.extra.visible = !this.extra.visible;
588 this.SetVisible();
589 if (this.Visible)
590 {
591 this.imageBG.transform.localScale = new Vector3(0.6f, 0.6f, 1f);
592 this.imageBG.transform.DOScale(1f, 0.12f).SetEase(Ease.Linear);
593 this.imageGrid.transform.localScale = new Vector3(0.6f, 0.6f, 1f);
594 this.imageGrid.transform.DOScale(1f, 0.12f).SetEase(Ease.Linear);
595 foreach (ButtonHotItem buttonHotItem in this.buttons)
596 {
597 if (!(buttonHotItem.item is HotItemToggleVisible) && (buttonHotItem.item == null || !buttonHotItem.item.always))
598 {
599 buttonHotItem.transform.localScale = new Vector3(0.6f, 0.6f, 1f);
600 buttonHotItem.transform.DOScale(1f, 0.12f).SetEase(Ease.Linear);
601 }
602 }
603 this.imageBG.SetAlpha(0f);
604 this.imageGrid.SetAlpha(0f);
605 SkinConfig skin = base.config.skin;
606 this.imageBG.DOFade(skin.bgColor.a, 0.4f).SetEase(Ease.OutQuint);
607 this.imageGrid.DOFade(skin.gridColor.a, 0.4f).SetEase(Ease.OutQuint);
608 }
609 }
610
611 // Token: 0x06002AAD RID: 10925 RVA: 0x000F0878 File Offset: 0x000EEA78
612 public void CheckAutoHide()
613 {
614 if (!this.Visible)
615 {
616 return;
617 }
618 this.timeSinceBecomeVisible += 0.2f;
619 if (this.timeSinceBecomeVisible < 1f)
620 {
621 return;
622 }
623 if (Input.GetMouseButton(0) || EMono.ui.contextMenu.currentMenu != null || WidgetHotbar.registering)
624 {
625 this.timeSinceBecomeVisible = 0f;
626 return;
627 }
628 if (InputModuleEX.IsPointerOver(base.transform))
629 {
630 this.timeSinceBecomeVisible = 0f;
631 return;
632 }
633 foreach (ButtonHotItem buttonHotItem in this.buttons)
634 {
635 if (buttonHotItem.item != null && buttonHotItem.item.KeepVisibleWhenHighlighted && buttonHotItem.item.ShouldHighlight())
636 {
637 return;
638 }
639 }
640 this.ToggleVisible();
641 }
642
643 // Token: 0x06002AAE RID: 10926 RVA: 0x000F0964 File Offset: 0x000EEB64
644 public void OnStartDrag(UIButton b)
645 {
646 EMono.ui.hud.SetDragImage(b.icon, null, null);
647 }
648
649 // Token: 0x06002AAF RID: 10927 RVA: 0x000F0980 File Offset: 0x000EEB80
650 public void OnDrag(UIButton b)
651 {
652 string text = "";
653 if (this.GetSwapButton(b))
654 {
655 text = "hotitemSwap";
656 }
657 else if (!EMono.ui.isPointerOverUI)
658 {
659 text = "hotitemTrash";
660 }
661 EMono.ui.hud.SetDragText(text, null);
662 }
663
664 // Token: 0x06002AB0 RID: 10928 RVA: 0x000F09CC File Offset: 0x000EEBCC
665 public ButtonHotItem GetSwapButton(UIButton b)
666 {
667 foreach (Widget widget in EMono.ui.widgets.list)
668 {
669 WidgetHotbar widgetHotbar = widget as WidgetHotbar;
670 if (!(widgetHotbar == null))
671 {
672 foreach (ButtonHotItem buttonHotItem in widgetHotbar.buttons)
673 {
674 if (InputModuleEX.IsPointerOver(buttonHotItem) && b != buttonHotItem)
675 {
676 return buttonHotItem;
677 }
678 }
679 }
680 }
681 return null;
682 }
683
684 // Token: 0x06002AB1 RID: 10929 RVA: 0x000F0A84 File Offset: 0x000EEC84
685 public void OnEndDrag(UIButton b, bool cancel = false)
686 {
687 EMono.ui.hud.imageDrag.SetActive(false);
688 ButtonHotItem swapButton = this.GetSwapButton(b);
689 if (swapButton)
690 {
691 SE.SelectHotitem();
692 ButtonHotItem buttonHotItem = b as ButtonHotItem;
693 HotItem hotItem = (HotItem)swapButton.item;
694 HotItem hotItem2 = (HotItem)buttonHotItem.item;
695 Hotbar hotbar = swapButton.widget.hotbar;
696 Hotbar hotbar2 = buttonHotItem.widget.hotbar;
697 hotbar.actor.SetItem(swapButton, hotItem2);
698 hotbar2.actor.SetItem(buttonHotItem, hotItem);
699 if (hotItem != null)
700 {
701 hotItem.button = buttonHotItem;
702 hotItem.hotbar = hotbar2;
703 }
704 if (hotItem2 != null)
705 {
706 hotItem2.button = swapButton;
707 hotItem2.hotbar = hotbar;
708 }
709 UIInventory.RefreshAllList();
710 return;
711 }
712 if (EMono.ui.isPointerOverUI)
713 {
714 SE.Beep();
715 return;
716 }
717 SE.Trash();
718 this.SetItem(b as ButtonHotItem, null);
719 UIInventory.RefreshAllList();
720 }
721
722 // Token: 0x04001804 RID: 6148
723 public static bool registering;
724
725 // Token: 0x04001805 RID: 6149
726 public static bool dirtyCurrentItem;
727
728 // Token: 0x04001806 RID: 6150
729 public static HotItem registeringItem;
730
731 // Token: 0x04001807 RID: 6151
732 public static WidgetHotbar HotbarBuild;
733
734 // Token: 0x04001808 RID: 6152
735 public static WidgetHotbar HotBarMainMenu;
736
737 // Token: 0x04001809 RID: 6153
738 public static WidgetHotbar HotbarExtra;
739
740 // Token: 0x0400180A RID: 6154
741 public int idHotbar;
742
743 // Token: 0x0400180B RID: 6155
744 public GridLayoutGroup layout;
745
746 // Token: 0x0400180C RID: 6156
747 public ButtonHotItem mold;
748
749 // Token: 0x0400180D RID: 6157
750 public RawImage imageGrid;
751
752 // Token: 0x0400180E RID: 6158
753 public Image imageSelect;
754
755 // Token: 0x0400180F RID: 6159
756 public Hotbar.Type type;
757
758 // Token: 0x04001810 RID: 6160
759 public bool useMask;
760
761 // Token: 0x04001811 RID: 6161
762 [NonSerialized]
763 public List<ButtonHotItem> buttons = new List<ButtonHotItem>();
764
765 // Token: 0x04001812 RID: 6162
766 private bool showThisWidget;
767
768 // Token: 0x04001813 RID: 6163
769 private float timeSinceBecomeVisible;
770
771 // Token: 0x02000B6F RID: 2927
772 public class Extra
773 {
774 // Token: 0x04002DE6 RID: 11750
775 public int iconSize = 2;
776
777 // Token: 0x04002DE7 RID: 11751
778 public int width = 1;
779
780 // Token: 0x04002DE8 RID: 11752
781 public int rows;
782
783 // Token: 0x04002DE9 RID: 11753
784 public bool showShortcut;
785
786 // Token: 0x04002DEA RID: 11754
787 public bool vertical;
788
789 // Token: 0x04002DEB RID: 11755
790 public bool visible;
791
792 // Token: 0x04002DEC RID: 11756
793 public bool alwaysShow;
794
795 // Token: 0x04002DED RID: 11757
796 public bool reverse;
797
798 // Token: 0x04002DEE RID: 11758
799 public bool autoSize;
800 }
801}
Definition EMono.cs:6