2using System.Collections.Generic;
57 public List<ButtonHotItem>
buttons =
new List<ButtonHotItem>();
75 extra.visible = value;
95 if ((
bool)componentOf && componentOf.item !=
null)
100 return base.CanShowContextMenu();
128 base.OnChangeActionMode();
131 hotbar.dirty =
false;
142 layout.constraint = (extra.vertical ? GridLayoutGroup.Constraint.FixedColumnCount : GridLayoutGroup.Constraint.FixedRowCount);
143 layout.startCorner = (extra.reverse ? GridLayoutGroup.Corner.LowerRight : GridLayoutGroup.Corner.UpperLeft);
155 int num4 = (extra.vertical ? num2 :
extra.
width);
156 imageGrid.uvRect =
new Rect(1f, 1f, num3, num4);
158 for (
int j = 0; j < num; j++)
161 buttonHotItem.index = j;
162 buttonHotItem.mainText.text = ((j > 10) ?
"" : ((j + 1).ToString() ??
""));
163 buttonHotItem.widget =
this;
167 buttonHotItem.gameObject.AddComponent<RectMask2D>();
171 this.RebuildLayout();
192 if ((
bool)widgetHotbar)
227 uIContextMenu.
Show();
236 _ = base.config.skin.Skin;
241 uIContextMenu.
AddSlider(
"numSlot", (
float n) => n.ToString() ??
"",
extra.
rows, delegate(
float a)
247 }, 1f, 20f, isInt:
true, hideOther:
false);
251 extra.iconSize = (int)a;
254 }, 0f, EMono.setting.ui.iconSizes.Count - 1, isInt:
true);
264 extra.width = ((!a) ? 1 : 2);
278 extra.alwaysShow = a;
373 type = HotItemToggle.Type.ToggleNoRoof
377 type = HotItemToggle.Type.muteBGM
381 type = HotItemToggle.Type.showBalloon
384 arg.
AddButton(
"hotActionWidgetSet".lang(), delegate
397 arg = m.
AddChild(
"uniqueShortcuts");
416 arg = m.
AddChild(
"specialShortcuts");
419 m.
AddButton(
"registerPos".lang(), delegate
428 m.
AddButton(
"hotActionEQSet".lang(), delegate
432 m.
AddButton(
"hotActionSleep".lang(), delegate
451 if ((
bool)widgetHotbar)
479 if (button.
item ==
null)
516 if (button.
item !=
null)
532 button.image.enabled = flag3;
533 button.mainText.enabled = flag3;
534 button.
icon.SetActive(flag3);
535 if (!flag2 && button != componentOf)
553 CancelInvoke(
"CheckAutoHide");
557 InvokeRepeating(
"CheckAutoHide", 0.1f, 0.2f);
561 image.enabled = flag4;
573 imageBG.transform.localScale =
new Vector3(0.6f, 0.6f, 1f);
574 imageBG.transform.DOScale(1f, 0.12f).SetEase(Ease.Linear);
575 imageGrid.transform.localScale =
new Vector3(0.6f, 0.6f, 1f);
576 imageGrid.transform.DOScale(1f, 0.12f).SetEase(Ease.Linear);
581 button.transform.localScale =
new Vector3(0.6f, 0.6f, 1f);
582 button.transform.DOScale(1f, 0.12f).SetEase(Ease.Linear);
603 if (Input.GetMouseButton(0) ||
EMono.
ui.contextMenu.currentMenu !=
null ||
registering)
633 text =
"hotitemSwap";
635 else if (!
EMono.
ui.isPointerOverUI)
637 text =
"hotitemTrash";
639 EMono.
ui.hud.SetDragText(text);
647 if (widgetHotbar ==
null)
664 EMono.
ui.hud.imageDrag.SetActive(enable:
false);
666 if ((
bool)swapButton)
678 hotItem.button = buttonHotItem;
679 hotItem.hotbar = hotbar2;
681 if (hotItem2 !=
null)
683 hotItem2.button = swapButton;
688 else if (
EMono.
ui.isPointerOverUI)
List< Action > actionsNextFrame
List< Sprite > spritesHighlight
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
static GameSetting setting
List< Vector2 > iconSizes
HotItem GetItem(int index, int pageIndex=-1)
HotItem SetItem(HotItem item, int index=-1, int pageIndex=-1, bool refreshActor=false)
void SetPage(int pageIndex)
static void RefreshAllList()