2using System.Collections.Generic;
3using System.Reflection;
45 public CanvasGroup
cg;
107 return base.TopLayer.option.allowInventoryInteraction;
119 if (!wasActive || ((
bool)base.TopLayer && base.TopLayer.option.passive))
147 return base.TopLayer.option.pauseGame;
166 InvokeRepeating(
"CheckWindowOrder", 1f, 0.5f);
171 mouseInfo.SetActive(enable:
false);
186 layerFloat.SetActive(enable:
true);
191 layerFloat.SetActive(enable:
false);
205 ((
ActionMode)typeof(
ActionMode).GetField(_mode, BindingFlags.Static | BindingFlags.Public).GetValue(
null)).Activate();
210 isPointerOverUI =
false;
215 isPointerOverUI =
true;
246 if (base.TopLayer.option.hideFloatUI)
250 if (base.TopLayer.option.hideWidgets)
257 public void FlashCover(
float durationOut = 1f,
float duration = 1f,
float durationIn = 1f, Action onFadeOut =
null, Action onComplete =
null,
Color color =
default(
Color))
260 TweenUtil.Tween(durationOut + duration,
null, delegate
262 if (onFadeOut !=
null)
270 public void ShowCover(
float duration = 0f,
float dest = 1f, Action onComplete =
null,
Color color =
default(
Color))
272 TweenUtil.KillTween(ref tweenCover);
274 hud.imageCover.color = ((color ==
default(
Color)) ?
Color.black : color).SetAlpha(a);
277 tweenCover = hud.
imageCover.DOFade(dest, duration).OnComplete(delegate
279 onComplete?.Invoke();
283 public void HideCover(
float duration = 0f, Action onComplete =
null)
288 TweenUtil.KillTween(ref tweenCover);
289 tweenCover = hud.
imageCover.DOFade(0f, duration).OnComplete(delegate
292 onComplete?.Invoke();
305 ELayer.
ui.rectDynamic.SetActive(enable);
309 public void Show(
float duration = 1f)
319 cg.DOFade(1f, duration);
323 public void Hide(
float duration = 1f)
332 cg.DOFade(0f, duration);
338 canvas.enabled = !canvas.enabled;
349 hud.imageDrag.transform.position = EInput.mpos + (ELayer.game.UseGrid ? hud.imageDragFix2 : hud.
imageDragFix2);
354 blurSize += Time.unscaledDeltaTime * blurSpeed;
359 if (!blur.activeSelf)
361 blur.SetActive(value:
true);
363 int siblingIndex = blur.transform.GetSiblingIndex();
365 for (
int num2 =
layers.Count - 1; num2 >= 0; num2--)
369 num =
layers[num2].transform.GetSiblingIndex() - 1;
373 if (siblingIndex != num)
375 blur.transform.SetSiblingIndex(num);
380 blurSize -= Time.unscaledDeltaTime * blurSpeed;
385 if (blur.activeSelf && blurSize == 0f)
387 blur.SetActive(value:
false);
390 matBlur.SetFloat(
"_Size", blurSize);
393 LayerInventory.highlightInv =
null;
400 if (durationHideMouseHint > 0f)
444 hud.textMouseHintLeft.transform.position = UIButton.currentHighlight.transform.position + hud.
textMouseHintFixLeft;
445 hud.textMouseHintRight.transform.position = UIButton.currentHighlight.transform.position + hud.
textMouseHintFix;
452 durationHideMouseHint = duration;
468 if ((
bool)component && !component.AlwaysBottom && widgets.transform.GetChild(widgets.transform.childCount - 1) !=
item.transform)
470 item.transform.SetAsLastSibling();
483 canvasScaler.scaleFactor = 1f;
484 Shader.SetGlobalFloat(
"_UIBrightness", 1f);
485 Shader.SetGlobalFloat(
"_UIContrast", 1f);
486 layoutLang.SetActive(enable:
true);
491 Button button =
Util.Instantiate(t, layoutLang);
493 button.GetComponentInChildren<Text>().text =
item.ToString();
494 button.onClick.AddListener(delegate
496 layoutLang.SetActive(enable:
false);
497 ELayer.debug.startScene = _l;
501 layoutLang.RebuildLayout();
506 canvasScaler.scaleFactor = 1f;
507 Shader.SetGlobalFloat(
"_UIBrightness", 1f);
508 Shader.SetGlobalFloat(
"_UIContrast", 1f);
509 layoutLang.SetActive(enable:
true);
513 Button button =
Util.Instantiate(t, layoutLang);
515 button.GetComponentInChildren<Text>().text = value.
name +
" (" + value.
name_en +
")";
516 button.onClick.AddListener(delegate
518 layoutLang.SetActive(enable:
false);
519 ELayer.core.langCode = _l.
id;
530 layoutLang.RebuildLayout();
539 return contextMenu.
Create(cid);
544 return contextMenu.
Create(
"ContextInteraction");
547 public void Say(
string text, Sprite sprite =
null)
549 popSystem.
PopText(text.lang(), sprite,
"PopAchievement");
557 UnityEngine.Object.Destroy(texFreeze);
559 texFreeze = ScreenCapture.CaptureScreenshotAsTexture();
560 imageFreeze.SetActive(enable:
true);
561 imageFreeze.texture = texFreeze;
566 TweenUtil.Tween(duration,
null, delegate
580 UnityEngine.Object.DestroyImmediate(texFreeze);
582 imageFreeze.SetActive(enable:
false);
592 ELayer.player.pref.layerAbility =
false;
593 SE.Play(
"pop_ability_deactivate");
598 ELayer.player.pref.layerAbility =
true;
607 layerAbility.
Delay();
621 List<Card> list =
new List<Card>();
624 if (
item.IsPlayerContainer())
626 list.Add(
item.invs[0].owner.Container);
633 ELayer.ui.layerFloat.RemoveLayer(l);
636 ELayer.
ui.widgets.DeactivateWidget(
"Equip");
637 foreach (
Card item2
in list)
639 item2.c_windowSaveData.open =
true;
641 SE.Play(
"pop_inventory_deactivate");
651 TooltipManager.Instance.disableTimer = 0.1f;
654 SoundManager.ignoreSounds =
true;
657 SoundManager.ignoreSounds =
true;
658 ELayer.
ui.widgets.Activate(
"Equip");
667 SoundManager.ignoreSounds =
false;
668 TooltipManager.Instance.disableTimer = 0f;
674 if (Application.isEditor)
682 if (SteamAPI.IsSteamRunning())
684 text = SteamFriends.GetPersonaName();
700 string backerId =
"";
709 catch (Exception message)
715 if (!Application.isEditor)
717 string pchName =
"public";
720 if (!SteamApps.GetCurrentBetaName(out pchName, 128) || !(pchName ==
"nightly"))
722 Dialog.
Ok(
"dialog_feedbackTooMany");
730 Dialog.
Ok(
"dialog_feedbackTooMany");
745 string userName =
"Unknown";
746 string[] array = Application.persistentDataPath.Split(
'/');
747 if (array.Length > 2)
751 LayerFeedback.header = (flag ?
"" :
"(!?)");
752 LayerFeedback.userName = userName;
754 LayerFeedback.backerId = backerId;
755 LayerFeedback.steamName = text;
763 if (currentDrag !=
null)
765 EndDrag(canceled:
true);
766 if (currentDrag !=
null)
783 currentDrag.
OnDrag(execute:
false);
790 EndDrag(canceled:
true);
796 if (currentDrag ==
null)
800 bool num = currentDrag.
OnDrag(execute:
true, canceled);
802 EInput.dragHack = 0f;
808 if (nextDrag !=
null)
virtual void OnUpdateCursor()
List< Action > actionsNextFrame
bool HasCondition(string alias)
static void SetCursor(CursorInfo info=null, int _priority=0)
static CursorSystem Instance
static Dialog Ok(string langDetail, Action action=null)
virtual bool OnDragSpecial()
virtual bool OnDrag(bool execute, bool cancel=false)
void TryShowHint(string _langHint=null)
static string GetID(string code)
EloMapTileSelector selector
SpriteRenderer srHighlight
UIText textMouseHintRight
void SetDragImage(Image i, string text=null, UIText uiText=null)
Vector3 textMouseHintFixLeft
static ButtonAbility hotElement
static LayerInventory CreateContainer(Card owner)
static LayerInventory CreatePCBackpack(bool mousePos=false)
static List< LayerInventory > listInv
bool IsPlayerContainer(bool includePlayer=false)
Layer GetLayer(string id)
bool IsBlockWidgetClick()
void RemoveLayers(bool removeImportant=false)
void Delay(float duration=0.05f)
static Dictionary< string, LangSetting > langs
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
PopItemText PopText(string text, Sprite sprite=null, string id="PopText", Color c=default(Color), Vector3 destPos=default(Vector3), float duration=0f)
void SetOwner(Chara _owner)
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)
InputModuleEX inputModule
UIContextMenu CreateContextMenuInteraction()
bool BlockMouseOverUpdate
RectTransform _rectLayers
override bool blockWidgetClick
RectTransform rectDynamicEssential
void OpenFloatInv(bool ignoreSound=false)
RectTransform rectDynamic
void ToggleAbility(bool delay=false)
void EndDrag(bool canceled=false)
void FlashCover(float durationOut=1f, float duration=1f, float durationIn=1f, Action onFadeOut=null, Action onComplete=null, Color color=default(Color))
void ToggleInventory(bool delay=false)
void RefreshActiveState()
void HideCover(float duration=0f, Action onComplete=null)
void HideMouseHint(float duration=0.2f)
void SetLight(bool enable)
CanvasScaler canvasScaler
void ShowBalloon(bool enable)
UIContextMenuManager contextMenu
override RectTransform rectLayers
void OnClickAction(string _mode)
UIContextMenu CreateContextMenu(string cid="ContextMenu")
float durationHideMouseHint
bool AllowInventoryInteractions
void Hide(float duration=1f)
void FreezeScreen(float duration, bool highlight=true)
void Say(string text, Sprite sprite=null)
void ShowCover(float duration=0f, float dest=1f, Action onComplete=null, Color color=default(Color))
void StartDrag(DragItem item)
override void OnChangeLayer()
void Show(float duration=1f)
string GetTextMouseHintLeft()
bool ShowMouseHintRight()
string GetTextMouseHintRight()