Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UI Class Reference
Inheritance diagram for UI:
ELayer Layer IUISkin

Public Member Functions

void OnCoreStart ()
 
void OnActivateZone ()
 
void ShowFloats ()
 
void HideFloats ()
 
void OnKillGame ()
 
void OnClickAction (string _mode)
 
void RefreshActiveState ()
 
override void OnChangeLayer ()
 
void FlashCover (float durationOut=1f, float duration=1f, float durationIn=1f, Action onFadeOut=null, Action onComplete=null, Color color=default(Color))
 
void ShowCover (float duration=0f, float dest=1f, Action onComplete=null, Color color=default(Color))
 
void HideCover (float duration=0f, Action onComplete=null)
 
bool IsCovered ()
 
void ShowBalloon (bool enable)
 
void Show (float duration=1f)
 
void Hide (float duration=1f)
 
void ToggleCanvas ()
 
void OnUpdate ()
 
void ShowMouseHint ()
 
void HideMouseHint (float duration=0.2f)
 
void CheckWindowOrder ()
 
void ShowSceneSelector ()
 
void ShowLang ()
 
void SetLight (bool enable)
 
UIContextMenu CreateContextMenu (string cid="ContextMenu")
 
UIContextMenu CreateContextMenuInteraction ()
 
void Say (string text, Sprite sprite=null)
 
void FreezeScreen (float duration, bool highlight=true)
 
void UnfreezeScreen ()
 
void ToggleAbility (bool delay=false)
 
void ToggleInventory (bool delay=false)
 
void OpenFloatInv (bool ignoreSound=false)
 
void ToggleFeedback ()
 
void StartDrag (DragItem item)
 
void OnDrag ()
 
void OnDragSpecial ()
 
void EndDrag (bool canceled=false)
 
- Public Member Functions inherited from ELayer
override void OnBeforeAddLayer ()
 
void InitInspector ()
 
sealed override void Init ()
 
override void OnAfterAddLayer ()
 
void TryShowHelp ()
 
void AddLayerToUI (string id)
 
void TryShowHint (string _langHint=null)
 
void TalkHomeMemeber (string id)
 
void TalkMaid (string id)
 
override void OnRightClick ()
 
- Public Member Functions inherited from Layer
virtual string GetTextHeader (Window window)
 
virtual bool HeaderIsListOf (int id)
 
virtual void Init ()
 
virtual void OnInit ()
 
virtual void OnAfterInit ()
 
virtual void ApplySkin ()
 
void ShowScreenLock (string id)
 
void UpdateInput ()
 
virtual void OnUpdateInput ()
 
virtual void OnRightClick ()
 
virtual bool OnBack ()
 
virtual void OnChangeLayer ()
 
virtual void OnCreate ()
 
void _AddLayer (string id)
 
Layer AddLayer (string id)
 
AddLayer< T > ()
 
AddLayer< T > (string id)
 
AddLayerDontCloseOthers< T > ()
 
Layer AddLayerDontCloseOthers (Layer l)
 
GetOrAddLayer< T > ()
 
virtual void OnBeforeAddLayer ()
 
virtual void OnAfterAddLayer ()
 
Layer AddLayer (Layer l)
 
void ToggleLayer (string id)
 
ToggleLayer< T > (string id=null)
 
void WaitAndClose ()
 
void OnClickClose ()
 
virtual void Close ()
 
void CloseLayers ()
 
void RemoveLayers (bool removeImportant=false)
 
bool RemoveLayer< T > ()
 
void RemoveLayer (Layer l)
 
virtual void OnKill ()
 
Layer SetOnKill (Action action)
 
void DisableClose ()
 
void Delay (float duration=0.05f)
 
Layer SetDelay (float d)
 
Layer GetLayer (string id)
 
GetLayer< T > (bool fromTop=false)
 
Layer GetTopLayer ()
 
void SwitchContent (int idWindow, int i)
 
virtual void OnSwitchContent (Window window)
 
Layer SetTitles (string langList, string idHeaderRow=null)
 
bool IsBlockWidgetClick ()
 
bool IsHideHud ()
 
bool IsAllowGeneralInput ()
 
bool IsUseBlur ()
 
bool IsPointerOnLayer ()
 
void ApplySkin ()
 

Public Attributes

Canvas canvas
 
HUD hud
 
ExtraHint extraHint
 
InputModuleEX inputModule
 
UIContextMenuManager contextMenu
 
WidgetManager widgets
 
UIMouseInfo mouseInfo
 
RectTransform rectDynamic
 
RectTransform rectDynamicEssential
 
RectTransform _rectLayers
 
ReflexConsole console
 
GameObject blur
 
Material matBlur
 
LayoutGroup layoutLang
 
CanvasScaler canvasScaler
 
Image light
 
CanvasGroup cg
 
int minWidth
 
Layer layerFloat
 
UIAutoTurn autoTurn
 
PopManager popGame
 
PopManager popSystem
 
float blurSpeed
 
Texture2D texFreeze
 
RawImage imageFreeze
 
DragItem currentDrag
 
DragItem nextDrag
 
float lightContrast
 
float dragDuration
 
bool wasActive
 
bool isPointerOverUI
 
- Public Attributes inherited from Layer
Option option
 
UnityEvent onKill
 
Anime animeIn
 
Anime animeOut
 
bool closeOthers
 
bool defaultActionMode = true
 
Button screenLock
 
Layer parent
 
string idLayer
 
List< Layerlayers = new List<Layer>()
 
Vector2 lastParentPos
 
List< Windowwindows = new List<Window>()
 
string langHint
 

Protected Member Functions

override void Awake ()
 
- Protected Member Functions inherited from ELayer
sealed override void _Close ()
 
sealed override void Kill ()
 
virtual void Awake ()
 
virtual void _Close ()
 
virtual void Kill ()
 

Properties

SkinManager skins [get]
 
bool IsActive [get]
 
bool AllowInventoryInteractions [get]
 
bool BlockActions [get]
 
bool BlockMouseOverUpdate [get]
 
bool BlockInput [get]
 
bool IsPauseGame [get]
 
bool IsInventoryOpen [get]
 
bool IsAbilityOpen [get]
 
override bool blockWidgetClick [get]
 
override RectTransform rectLayers [get]
 
bool IsDragging [get]
 
- Properties inherited from ELayer
static Core core [get]
 
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static FactionBranch Branch [get]
 
static Faction Home [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static CoreConfig config [get]
 
static GameSetting setting [get]
 
static ColorProfile Colors [get]
 
static SourceManager sources [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 
bool IsFloat [get]
 
virtual string IdHelp [get]
 
- Properties inherited from Layer
Layer TopLayer [get]
 
string uid [get]
 
virtual RectTransform rectLayers [get]
 
virtual bool blockWidgetClick [get]
 

Private Attributes

bool hidingCover
 
Tween tweenCover
 
float durationHideMouseHint
 

Static Private Attributes

static float blurSize
 

Additional Inherited Members

- Static Public Member Functions inherited from ELayer
static int rnd (int a)
 
- Static Public Member Functions inherited from Layer
static T Create< T > ()
 
static T Create< T > (string path)
 
static Layer Create (string path)
 
- Static Public Attributes inherited from Layer
static int skipInput
 
static bool closeOnRightClick
 
static bool rightClicked
 
static bool cancelKeyDown
 
static bool ignoreSounds
 
static Transform blurStopInstance
 
static string[] searchPath = new string[3] { "Layer", "Layer/Dialog", "Layer/LayerHome" }
 
- Protected Attributes inherited from Layer
RectTransform _rect
 
bool isDestroyed
 

Detailed Description

Definition at line 9 of file UI.cs.

Member Function Documentation

◆ Awake()

override void UI.Awake ( )
inlineprotectedvirtual

Reimplemented from Layer.

Definition at line 163 of file UI.cs.

164 {
165 base.Awake();
166 InvokeRepeating("CheckWindowOrder", 1f, 0.5f);
167 }

◆ CheckWindowOrder()

void UI.CheckWindowOrder ( )
inline

Definition at line 457 of file UI.cs.

458 {
459 if (layers.Count > 0)
460 {
461 return;
462 }
463 foreach (GameObject item in InputModuleEX.GetPointerEventData().hovered)
464 {
465 if ((bool)item)
466 {
467 Widget component = item.GetComponent<Widget>();
468 if ((bool)component && !component.AlwaysBottom && widgets.transform.GetChild(widgets.transform.childCount - 1) != item.transform)
469 {
470 item.transform.SetAsLastSibling();
471 break;
472 }
473 }
474 }
475 if ((bool)WidgetFeed.Instance)
476 {
477 WidgetFeed.Instance.transform.SetAsLastSibling();
478 }
479 }
static PointerEventData GetPointerEventData(int pointerId=-1)
List< Layer > layers
Definition: Layer.cs:110
WidgetManager widgets
Definition: UI.cs:23
static WidgetFeed Instance
Definition: WidgetFeed.cs:14
Definition: Widget.cs:7

References InputModuleEX.GetPointerEventData(), WidgetFeed.Instance, item, and Layer.layers.

◆ CreateContextMenu()

UIContextMenu UI.CreateContextMenu ( string  cid = "ContextMenu")
inline

Definition at line 537 of file UI.cs.

538 {
539 return contextMenu.Create(cid);
540 }
UIContextMenu Create(string menuName="ContextMenu", bool destroyOnHide=true)
UIContextMenuManager contextMenu
Definition: UI.cs:21

References UIContextMenuManager.Create().

◆ CreateContextMenuInteraction()

UIContextMenu UI.CreateContextMenuInteraction ( )
inline

Definition at line 542 of file UI.cs.

543 {
544 return contextMenu.Create("ContextInteraction");
545 }

References UIContextMenuManager.Create().

Referenced by AM_EditArea.OnProcessTiles().

◆ EndDrag()

void UI.EndDrag ( bool  canceled = false)
inline

Definition at line 794 of file UI.cs.

795 {
796 if (currentDrag == null)
797 {
798 return;
799 }
800 bool num = currentDrag.OnDrag(execute: true, canceled);
801 EInput.Consume();
802 EInput.dragHack = 0f;
803 if (num)
804 {
805 ELayer.ui.RemoveLayer<LayerRegisterHotbar>();
807 currentDrag = null;
808 if (nextDrag != null)
809 {
810 StartDrag(nextDrag);
811 nextDrag = null;
812 }
813 else
814 {
815 hud.SetDragImage(null);
816 }
818 }
819 else
820 {
821 SE.BeepSmall();
822 }
823 }
virtual void OnEndDrag()
Definition: DragItem.cs:16
virtual bool OnDrag(bool execute, bool cancel=false)
Definition: DragItem.cs:20
Definition: EInput.cs:8
static void Consume(int _skipFrame)
Definition: EInput.cs:656
Definition: ELayer.cs:4
static UI ui
Definition: ELayer.cs:21
void SetDragImage(Image i, string text=null, UIText uiText=null)
Definition: HUD.cs:65
static void TryShowTip(Transform root=null, bool highlight=true, bool ignoreWhenRightClick=true)
Definition: UIButton.cs:778
HUD hud
Definition: UI.cs:15
DragItem currentDrag
Definition: UI.cs:63
DragItem nextDrag
Definition: UI.cs:65
void StartDrag(DragItem item)
Definition: UI.cs:760

References EInput.Consume(), DragItem.OnDrag(), DragItem.OnEndDrag(), HUD.SetDragImage(), UIButton.TryShowTip(), and ELayer.ui.

◆ FlashCover()

void UI.FlashCover ( float  durationOut = 1f,
float  duration = 1f,
float  durationIn = 1f,
Action  onFadeOut = null,
Action  onComplete = null,
Color  color = default(Color) 
)
inline

Definition at line 257 of file UI.cs.

258 {
259 ShowCover(durationOut, 1f, null, color);
260 TweenUtil.Tween(durationOut + duration, null, delegate
261 {
262 if (onFadeOut != null)
263 {
264 onFadeOut();
265 }
266 HideCover(durationIn, onComplete);
267 });
268 }
void HideCover(float duration=0f, Action onComplete=null)
Definition: UI.cs:283
void ShowCover(float duration=0f, float dest=1f, Action onComplete=null, Color color=default(Color))
Definition: UI.cs:270

References HideCover(), and ShowCover().

◆ FreezeScreen()

void UI.FreezeScreen ( float  duration,
bool  highlight = true 
)
inline

Definition at line 553 of file UI.cs.

554 {
555 if ((bool)texFreeze)
556 {
557 UnityEngine.Object.Destroy(texFreeze);
558 }
559 texFreeze = ScreenCapture.CaptureScreenshotAsTexture();
560 imageFreeze.SetActive(enable: true);
561 imageFreeze.texture = texFreeze;
562 if (duration == 0f)
563 {
564 return;
565 }
566 TweenUtil.Tween(duration, null, delegate
567 {
569 if (highlight)
570 {
572 }
573 });
574 }
static void TryHihlight()
Definition: UIButton.cs:768
void UnfreezeScreen()
Definition: UI.cs:576
RawImage imageFreeze
Definition: UI.cs:61

References UIButton.TryHihlight().

◆ Hide()

void UI.Hide ( float  duration = 1f)
inline

Definition at line 323 of file UI.cs.

324 {
325 ELayer.scene.elomapActor.selector.srHighlight.SetActive(enable: false);
326 if (duration == 0f)
327 {
328 cg.alpha = 0f;
329 }
330 else
331 {
332 cg.DOFade(0f, duration);
333 }
334 }
static Scene scene
Definition: ELayer.cs:27
EloMapTileSelector selector
Definition: EloMapActor.cs:17
SpriteRenderer srHighlight
EloMapActor elomapActor
Definition: Scene.cs:97
CanvasGroup cg
Definition: UI.cs:45

References Scene.elomapActor, ELayer.scene, EloMapActor.selector, and EloMapTileSelector.srHighlight.

◆ HideCover()

void UI.HideCover ( float  duration = 0f,
Action  onComplete = null 
)
inline

Definition at line 283 of file UI.cs.

284 {
285 if (!hidingCover)
286 {
287 hidingCover = true;
288 TweenUtil.KillTween(ref tweenCover);
289 tweenCover = hud.imageCover.DOFade(0f, duration).OnComplete(delegate
290 {
291 hud.imageCover.SetActive(enable: false);
292 onComplete?.Invoke();
293 hidingCover = false;
294 });
295 }
296 }
Image imageCover
Definition: HUD.cs:16
bool hidingCover
Definition: UI.cs:67

References HUD.imageCover.

Referenced by LayerSleep.Advance(), FlashCover(), and LayerSleep.Wait().

◆ HideFloats()

void UI.HideFloats ( )
inline

Definition at line 189 of file UI.cs.

190 {
191 layerFloat.SetActive(enable: false);
192 }
Layer layerFloat
Definition: UI.cs:49

Referenced by OnChangeLayer().

◆ HideMouseHint()

void UI.HideMouseHint ( float  duration = 0::2f)
inline

Definition at line 450 of file UI.cs.

451 {
452 durationHideMouseHint = duration;
453 hud.textMouseHintLeft.SetActive(enable: false);
454 hud.textMouseHintRight.SetActive(enable: false);
455 }
UIText textMouseHintRight
Definition: HUD.cs:24
UIText textMouseHintLeft
Definition: HUD.cs:26
float durationHideMouseHint
Definition: UI.cs:83

References HUD.textMouseHintLeft, and HUD.textMouseHintRight.

◆ IsCovered()

bool UI.IsCovered ( )
inline

Definition at line 298 of file UI.cs.

299 {
300 return !hidingCover;
301 }

◆ OnActivateZone()

void UI.OnActivateZone ( )
inline

Definition at line 174 of file UI.cs.

175 {
178 if ((bool)hud.hangCorner && hud.hangCorner.isActiveAndEnabled)
179 {
181 }
182 }
static Chara pc
Definition: ELayer.cs:15
static Player player
Definition: ELayer.cs:13
UIHangIcon hangCorner
Definition: HUD.cs:12
QueueManager queues
Definition: Player.cs:1010
void SetOwner(Chara _owner)
Definition: QueueManager.cs:80
void Refresh()
Definition: UIHangIcon.cs:68
void OnActivateZone()

References HUD.hangCorner, WidgetManager.OnActivateZone(), ELayer.pc, ELayer.player, Player.queues, UIHangIcon.Refresh(), and QueueManager.SetOwner().

◆ OnChangeLayer()

override void UI.OnChangeLayer ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 226 of file UI.cs.

227 {
232 {
234 }
236 Layer topLayer = base.TopLayer;
237 if ((object)topLayer != null && topLayer.option.dontShowHint)
238 {
239 return;
240 }
241 if (layers.Count == 0)
242 {
243 hud.hint.Refresh();
244 return;
245 }
246 if (base.TopLayer.option.hideFloatUI)
247 {
248 HideFloats();
249 }
250 if (base.TopLayer.option.hideWidgets)
251 {
252 widgets.Hide();
253 }
254 (base.TopLayer as ELayer)?.TryShowHint();
255 }
void Refresh()
Definition: ActionHint.cs:50
virtual void OnUpdateCursor()
Definition: ActionMode.cs:554
bool IsGameStarted
Definition: Core.cs:84
static void SetCursor(CursorInfo info=null, int _priority=0)
static CursorSystem Instance
Definition: CursorSystem.cs:6
static Core core
Definition: ELayer.cs:7
void TryShowHint(string _langHint=null)
Definition: ELayer.cs:152
void HideMouseInfo()
Definition: HUD.cs:60
ActionHint hint
Definition: HUD.cs:8
bool dontShowHint
Definition: Layer.cs:63
Definition: Layer.cs:9
Option option
Definition: Layer.cs:84
Layer TopLayer
Definition: Layer.cs:123
ActionMode actionMode
Definition: Scene.cs:77
void RefreshActiveState()
Definition: UI.cs:208
void HideFloats()
Definition: UI.cs:189

References Scene.actionMode, ELayer.core, Layer.Option.dontShowHint, CursorSystem.Draw(), WidgetManager.Hide(), HideFloats(), HUD.HideMouseInfo(), HUD.hint, CursorSystem.Instance, Core.IsGameStarted, Layer.layers, ActionMode.OnUpdateCursor(), Layer.option, ActionHint.Refresh(), RefreshActiveState(), ELayer.scene, CursorSystem.SetCursor(), Layer.TopLayer, and ELayer.TryShowHint().

◆ OnClickAction()

void UI.OnClickAction ( string  _mode)
inline

Definition at line 202 of file UI.cs.

203 {
204 RemoveLayers();
205 ((ActionMode)typeof(ActionMode).GetField(_mode, BindingFlags.Static | BindingFlags.Public).GetValue(null)).Activate();
206 }
void RemoveLayers(bool removeImportant=false)
Definition: Layer.cs:496

References Layer.RemoveLayers().

◆ OnCoreStart()

void UI.OnCoreStart ( )
inline

Definition at line 169 of file UI.cs.

170 {
171 mouseInfo.SetActive(enable: false);
172 }
UIMouseInfo mouseInfo
Definition: UI.cs:25

◆ OnDrag()

void UI.OnDrag ( )
inline

Definition at line 780 of file UI.cs.

781 {
783 currentDrag.OnDrag(execute: false);
784 }
Definition: Core.cs:14
static float delta
Definition: Core.cs:17
float dragDuration
Definition: UI.cs:73

References Core.delta, and DragItem.OnDrag().

◆ OnDragSpecial()

void UI.OnDragSpecial ( )
inline

Definition at line 786 of file UI.cs.

787 {
788 if (currentDrag != null && !currentDrag.OnDragSpecial())
789 {
790 EndDrag(canceled: true);
791 }
792 }
virtual bool OnDragSpecial()
Definition: DragItem.cs:25
void EndDrag(bool canceled=false)
Definition: UI.cs:794

References DragItem.OnDragSpecial().

◆ OnKillGame()

void UI.OnKillGame ( )
inline

Definition at line 194 of file UI.cs.

195 {
197 ShowBalloon(enable: true);
198 layerFloat.RemoveLayers(removeImportant: true);
199 currentDrag = null;
200 }
void ShowBalloon(bool enable)
Definition: UI.cs:303

References WidgetManager.OnKillGame(), Layer.RemoveLayers(), and ShowBalloon().

◆ OnUpdate()

void UI.OnUpdate ( )
inline

Definition at line 345 of file UI.cs.

346 {
347 if (hud.imageDrag.gameObject.activeSelf)
348 {
349 hud.imageDrag.transform.position = EInput.mpos + (ELayer.game.UseGrid ? hud.imageDragFix2 : hud.imageDragFix2);
351 }
352 if (ELayer.config.ui.blur && layers.Count > 0 && IsUseBlur())
353 {
354 blurSize += Time.unscaledDeltaTime * blurSpeed;
355 if (blurSize > ELayer.config.ui.blurSize)
356 {
358 }
359 if (!blur.activeSelf)
360 {
361 blur.SetActive(value: true);
362 }
363 int siblingIndex = blur.transform.GetSiblingIndex();
364 int num = 0;
365 for (int num2 = layers.Count - 1; num2 >= 0; num2--)
366 {
367 if (layers[num2].IsUseBlur())
368 {
369 num = layers[num2].transform.GetSiblingIndex() - 1;
370 break;
371 }
372 }
373 if (siblingIndex != num)
374 {
375 blur.transform.SetSiblingIndex(num);
376 }
377 }
378 else
379 {
380 blurSize -= Time.unscaledDeltaTime * blurSpeed;
381 if (blurSize < 0f)
382 {
383 blurSize = 0f;
384 }
385 if (blur.activeSelf && blurSize == 0f)
386 {
387 blur.SetActive(value: false);
388 }
389 }
390 matBlur.SetFloat("_Size", blurSize);
391 if (!EInput.isShiftDown)
392 {
393 LayerInventory.highlightInv = null;
394 }
396 }
new UISetting ui
Definition: CoreConfig.cs:588
static bool isShiftDown
Definition: EInput.cs:261
static CoreConfig config
Definition: ELayer.cs:31
Image imageDrag
Definition: HUD.cs:14
int marginImageDrag
Definition: HUD.cs:36
Vector3 imageDragFix2
Definition: HUD.cs:30
bool IsUseBlur()
Definition: Layer.cs:730
GameObject blur
Definition: UI.cs:35
static float blurSize
Definition: UI.cs:11
float blurSpeed
Definition: UI.cs:57
void ShowMouseHint()
Definition: UI.cs:398
Material matBlur
Definition: UI.cs:37
Definition: Util.cs:10
static void ClampToScreen(RectTransform rect, int margin=0)
Definition: Util.cs:110

References CoreConfig.UISetting.blur, CoreConfig.UISetting.blurSize, ELayer.config, HUD.imageDrag, HUD.imageDragFix2, EInput.isShiftDown, Layer.IsUseBlur(), Layer.layers, HUD.marginImageDrag, ShowMouseHint(), CoreConfig.ui, and Util.

◆ OpenFloatInv()

void UI.OpenFloatInv ( bool  ignoreSound = false)
inline

Definition at line 649 of file UI.cs.

650 {
651 TooltipManager.Instance.disableTimer = 0.1f;
652 if (ignoreSound)
653 {
654 SoundManager.ignoreSounds = true;
655 }
656 ELayer.ui.layerFloat.AddLayer(LayerInventory.CreatePCBackpack());
657 SoundManager.ignoreSounds = true;
658 ELayer.ui.widgets.Activate("Equip");
659 foreach (Thing item in ELayer.pc.things.List((Thing a) => a.trait.IsContainer))
660 {
661 Window.SaveData c_windowSaveData = item.c_windowSaveData;
662 if (!(item.trait is TraitToolBelt) && c_windowSaveData != null && c_windowSaveData.open)
663 {
665 }
666 }
667 SoundManager.ignoreSounds = false;
668 TooltipManager.Instance.disableTimer = 0f;
669 }
Trait trait
Definition: Card.cs:49
ThingContainer things
Definition: Card.cs:34
static LayerInventory CreateContainer(Card owner)
static LayerInventory CreatePCBackpack(bool mousePos=false)
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)
Definition: Thing.cs:8
virtual bool IsContainer
Definition: Trait.cs:205

References LayerInventory.CreateContainer(), LayerInventory.CreatePCBackpack(), Trait.IsContainer, item, ThingContainer.List(), Window.SaveData.open, ELayer.pc, Card.things, Card.trait, and ELayer.ui.

◆ RefreshActiveState()

void UI.RefreshActiveState ( )
inline

Definition at line 208 of file UI.cs.

209 {
210 isPointerOverUI = false;
211 foreach (GameObject item in InputModuleEX.GetPointerEventData().hovered)
212 {
213 if ((bool)item && item.layer == 5)
214 {
215 isPointerOverUI = true;
216 break;
217 }
218 }
220 if (wasActive)
221 {
223 }
224 }
bool wasActive
Definition: UI.cs:78
bool IsActive
Definition: UI.cs:88
bool isPointerOverUI
Definition: UI.cs:81

References InputModuleEX.GetPointerEventData(), IsActive, item, and CursorSystem.SetCursor().

Referenced by OnChangeLayer().

◆ Say()

void UI.Say ( string  text,
Sprite  sprite = null 
)
inline

Definition at line 547 of file UI.cs.

548 {
549 popSystem.PopText(text.lang(), sprite, "PopAchievement");
550 Debug.Log(text);
551 }
PopItemText PopText(string text, Sprite sprite=null, string id="PopText", Color c=default(Color), Vector3 destPos=default(Vector3), float duration=0f)
Definition: PopManager.cs:41
PopManager popSystem
Definition: UI.cs:55

References Debug, and PopManager.PopText().

◆ SetLight()

void UI.SetLight ( bool  enable)
inline

Definition at line 533 of file UI.cs.

534 {
535 }

◆ Show()

void UI.Show ( float  duration = 1f)
inline

Definition at line 309 of file UI.cs.

310 {
311 ELayer.scene.elomapActor.selector.srHighlight.SetActive(enable: true);
312 cg.DOKill();
313 if (duration == 0f)
314 {
315 cg.alpha = 1f;
316 }
317 else
318 {
319 cg.DOFade(1f, duration);
320 }
321 }

References Scene.elomapActor, ELayer.scene, EloMapActor.selector, and EloMapTileSelector.srHighlight.

◆ ShowBalloon()

void UI.ShowBalloon ( bool  enable)
inline

Definition at line 303 of file UI.cs.

304 {
305 ELayer.ui.rectDynamic.SetActive(enable);
307 }

References WidgetSystemIndicator.Refresh(), and ELayer.ui.

Referenced by OnKillGame().

◆ ShowCover()

void UI.ShowCover ( float  duration = 0f,
float  dest = 1f,
Action  onComplete = null,
Color  color = default(Color) 
)
inline

Definition at line 270 of file UI.cs.

271 {
272 TweenUtil.KillTween(ref tweenCover);
273 float a = hud.imageCover.color.a;
274 hud.imageCover.color = ((color == default(Color)) ? Color.black : color).SetAlpha(a);
275 hud.imageCover.SetActive(enable: true);
276 hidingCover = false;
277 tweenCover = hud.imageCover.DOFade(dest, duration).OnComplete(delegate
278 {
279 onComplete?.Invoke();
280 });
281 }

References Color, and HUD.imageCover.

Referenced by LayerSleep.Advance(), FlashCover(), and LayerSleep.OnAfterInit().

◆ ShowFloats()

void UI.ShowFloats ( )
inline

Definition at line 184 of file UI.cs.

185 {
186 layerFloat.SetActive(enable: true);
187 }

◆ ShowLang()

void UI.ShowLang ( )
inline

Definition at line 504 of file UI.cs.

505 {
506 canvasScaler.scaleFactor = 1f;
507 Shader.SetGlobalFloat("_UIBrightness", 1f);
508 Shader.SetGlobalFloat("_UIContrast", 1f);
509 layoutLang.SetActive(enable: true);
510 Button t = layoutLang.CreateMold<Button>();
511 foreach (LangSetting value in MOD.langs.Values)
512 {
513 Button button = Util.Instantiate(t, layoutLang);
514 LangSetting _l = value;
515 button.GetComponentInChildren<Text>().text = value.name + " (" + value.name_en + ")";
516 button.onClick.AddListener(delegate
517 {
518 layoutLang.SetActive(enable: false);
519 ELayer.core.langCode = _l.id;
520 if (ELayer.debug.showSceneSelector || (Input.GetKey(KeyCode.LeftShift) && ELayer.debug.enable))
521 {
523 }
524 else
525 {
526 ELayer.core.Init();
527 }
528 });
529 }
530 layoutLang.RebuildLayout();
531 }
bool showSceneSelector
Definition: CoreDebug.cs:108
bool enable
Definition: CoreDebug.cs:285
void Init()
Definition: Core.cs:523
static CoreDebug debug
Definition: ELayer.cs:43
string name
Definition: LangSetting.cs:24
string id
Definition: LangSetting.cs:22
string name_en
Definition: LangSetting.cs:26
Definition: MOD.cs:7
static Dictionary< string, LangSetting > langs
Definition: MOD.cs:8
void ShowSceneSelector()
Definition: UI.cs:481
LayoutGroup layoutLang
Definition: UI.cs:39
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67

References Button, ELayer.core, ELayer.debug, CoreDebug.enable, LangSetting.id, Core.Init(), MOD.langs, LangSetting.name, LangSetting.name_en, CoreDebug.showSceneSelector, ShowSceneSelector(), and Util.

◆ ShowMouseHint()

void UI.ShowMouseHint ( )
inline

Definition at line 398 of file UI.cs.

399 {
400 if (durationHideMouseHint > 0f)
401 {
403 hud.textMouseHintLeft.SetActive(enable: false);
404 hud.textMouseHintRight.SetActive(enable: false);
405 return;
406 }
407 IMouseHint mouseHint = UIButton.currentHighlight as IMouseHint;
408 bool flag = mouseHint != null && !IsDragging && isPointerOverUI && (bool)UIButton.currentHighlight && InputModuleEX.IsPointerOver(UIButton.currentHighlight) && LayerAbility.hotElement == null;
409 bool flag2 = flag;
410 if (flag2)
411 {
412 if (mouseHint.ShowMouseHintLeft())
413 {
414 hud.textMouseHintLeft.text = mouseHint.GetTextMouseHintLeft();
415 if (hud.textMouseHintLeft.text == "")
416 {
417 flag2 = false;
418 }
419 }
420 else
421 {
422 flag2 = false;
423 }
424 }
425 if (flag)
426 {
427 if (mouseHint.ShowMouseHintRight())
428 {
429 hud.textMouseHintRight.text = mouseHint.GetTextMouseHintRight();
430 if (hud.textMouseHintRight.text == "")
431 {
432 flag = false;
433 }
434 }
435 else
436 {
437 flag = false;
438 }
439 }
440 hud.textMouseHintLeft.SetActive(flag2);
441 hud.textMouseHintRight.SetActive(flag);
442 if (flag || flag2)
443 {
444 hud.textMouseHintLeft.transform.position = UIButton.currentHighlight.transform.position + hud.textMouseHintFixLeft;
445 hud.textMouseHintRight.transform.position = UIButton.currentHighlight.transform.position + hud.textMouseHintFix;
447 }
448 }
Vector3 textMouseHintFix
Definition: HUD.cs:32
Vector3 textMouseHintFixLeft
Definition: HUD.cs:34
static bool IsPointerOver(Component c)
static UIButton currentHighlight
Definition: UIButton.cs:90
bool IsDragging
Definition: UI.cs:161
bool ShowMouseHintLeft()
string GetTextMouseHintLeft()
bool ShowMouseHintRight()
string GetTextMouseHintRight()

References UIButton.currentHighlight, Core.delta, IMouseHint.GetTextMouseHintLeft(), IMouseHint.GetTextMouseHintRight(), InputModuleEX.IsPointerOver(), IMouseHint.ShowMouseHintLeft(), IMouseHint.ShowMouseHintRight(), HUD.textMouseHintFix, HUD.textMouseHintFixLeft, HUD.textMouseHintLeft, HUD.textMouseHintRight, and Util.

Referenced by OnUpdate().

◆ ShowSceneSelector()

void UI.ShowSceneSelector ( )
inline

Definition at line 481 of file UI.cs.

482 {
483 canvasScaler.scaleFactor = 1f;
484 Shader.SetGlobalFloat("_UIBrightness", 1f);
485 Shader.SetGlobalFloat("_UIContrast", 1f);
486 layoutLang.SetActive(enable: true);
487 List<CoreDebug.StartScene> list = Util.EnumToList<CoreDebug.StartScene>();
488 Button t = layoutLang.CreateMold<Button>();
489 foreach (CoreDebug.StartScene item in list)
490 {
491 Button button = Util.Instantiate(t, layoutLang);
493 button.GetComponentInChildren<Text>().text = item.ToString();
494 button.onClick.AddListener(delegate
495 {
496 layoutLang.SetActive(enable: false);
497 ELayer.debug.startScene = _l;
498 ELayer.core.Init();
499 });
500 }
501 layoutLang.RebuildLayout();
502 }

References Button, ELayer.core, Core.Init(), item, and Util.

Referenced by ShowLang().

◆ StartDrag()

void UI.StartDrag ( DragItem  item)
inline

Definition at line 760 of file UI.cs.

761 {
762 dragDuration = 0f;
763 if (currentDrag != null)
764 {
765 EndDrag(canceled: true);
766 if (currentDrag != null)
767 {
768 return;
769 }
770 }
772 item.OnStartDrag();
773 OnDrag();
774 ELayer.core.actionsNextFrame.Add(delegate
775 {
776 TooltipManager.Instance.HideTooltips(immediate: true);
777 });
778 }
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
static TooltipManager Instance
void HideTooltips(bool immediate=false)
void OnDrag()
Definition: UI.cs:780

References BaseCore.actionsNextFrame, ELayer.core, TooltipManager.HideTooltips(), TooltipManager.Instance, and item.

◆ ToggleAbility()

void UI.ToggleAbility ( bool  delay = false)
inline

Definition at line 585 of file UI.cs.

586 {
588 {
589 if ((bool)ELayer.ui.layerFloat.GetLayer<LayerAbility>())
590 {
591 ELayer.ui.layerFloat.RemoveLayer<LayerAbility>();
592 ELayer.player.pref.layerAbility = false;
593 SE.Play("pop_ability_deactivate");
594 }
595 else
596 {
597 ELayer.ui.layerFloat.AddLayer<LayerAbility>("LayerAbility/LayerAbilityFloat");
598 ELayer.player.pref.layerAbility = true;
599 }
600 }
601 else if (!ELayer.ui.RemoveLayer<LayerAbility>())
602 {
603 LayerAbility layerAbility = ELayer.ui.AddLayer<LayerAbility>();
604 if (delay)
605 {
606 layerAbility.windows[0].SetRect(ELayer.core.refs.rects.center);
607 layerAbility.Delay();
608 }
609 }
610 }
RectData center
Definition: CoreRef.cs:162
Rects rects
Definition: CoreRef.cs:345
CoreRef refs
Definition: Core.cs:51
static Game game
Definition: ELayer.cs:9
bool altAbility
Definition: Game.cs:267
List< Window > windows
Definition: Layer.cs:116
void Delay(float duration=0.05f)
Definition: Layer.cs:597

References Game.altAbility, CoreRef.Rects.center, ELayer.core, Layer.Delay(), ELayer.game, CoreRef.rects, Core.refs, ELayer.ui, and Layer.windows.

◆ ToggleCanvas()

void UI.ToggleCanvas ( )
inline

Definition at line 336 of file UI.cs.

337 {
338 canvas.enabled = !canvas.enabled;
339 if ((bool)WidgetSideScreen.Instance)
340 {
341 WidgetSideScreen.Instance.SetActive(canvas.enabled);
342 }
343 }
Canvas canvas
Definition: UI.cs:13
static WidgetSideScreen Instance

References WidgetSideScreen.Instance.

◆ ToggleFeedback()

void UI.ToggleFeedback ( )
inline

Definition at line 671 of file UI.cs.

672 {
673 string text = "";
674 if (Application.isEditor)
675 {
676 text = "Debug";
677 }
678 else
679 {
680 try
681 {
682 if (SteamAPI.IsSteamRunning())
683 {
684 text = SteamFriends.GetPersonaName();
685 if (text.IsEmpty())
686 {
687 text = "NULL";
688 }
689 }
690 }
691 catch
692 {
693 }
694 }
695 if (text.IsEmpty())
696 {
697 Dialog.Ok("dialog_needToLogOn");
698 return;
699 }
700 string backerId = "";
701 try
702 {
703 if (!ELayer.config.rewardCode.IsEmpty())
704 {
705 backerId = "backer";
707 }
708 }
709 catch (Exception message)
710 {
711 backerId = "";
712 Debug.Log(message);
713 }
714 bool flag = false;
715 if (!Application.isEditor)
716 {
717 string pchName = "public";
718 try
719 {
720 if (!SteamApps.GetCurrentBetaName(out pchName, 128) || !(pchName == "nightly"))
721 {
722 Dialog.Ok("dialog_feedbackTooMany");
723 return;
724 }
725 flag = true;
726 Debug.Log(pchName);
727 }
728 catch
729 {
730 Dialog.Ok("dialog_feedbackTooMany");
731 return;
732 }
733 }
735 {
736 SE.Play("wow");
737 Msg.Say("bug_hal");
738 return;
739 }
740 if (!Application.isEditor && (ELayer.debug.enable || ELayer.core.version.demo || (ELayer.core.IsGameStarted && ELayer.player.flags.debugEnabled)))
741 {
742 Dialog.Ok("dialog_debugFeedback");
743 return;
744 }
745 string userName = "Unknown";
746 string[] array = Application.persistentDataPath.Split('/');
747 if (array.Length > 2)
748 {
749 userName = array[2];
750 }
751 LayerFeedback.header = (flag ? "" : "(!?)");
752 LayerFeedback.userName = userName;
753 LayerFeedback.playedHours = ELayer.config.maxPlayedHours;
754 LayerFeedback.backerId = backerId;
755 LayerFeedback.steamName = text;
756 ELayer.ui.ToggleLayer<LayerFeedback>();
757 SE.Tab();
758 }
Version version
Definition: BaseCore.cs:17
bool HasCondition(string alias)
Definition: Chara.cs:8568
int maxPlayedHours
Definition: CoreConfig.cs:578
string rewardCode
Definition: CoreConfig.cs:576
Definition: Dialog.cs:7
static Dialog Ok(string langDetail, Action action=null)
Definition: Dialog.cs:222
static string GetID(string code)
Definition: ElinEncoder.cs:43
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
bool debugEnabled
Definition: Player.cs:390
Flags flags
Definition: Player.cs:895
bool demo
Definition: Version.cs:14

References ELayer.config, ELayer.core, ELayer.debug, Debug, Player.Flags.debugEnabled, Version.demo, CoreDebug.enable, Player.flags, ElinEncoder.GetID(), Chara.HasCondition(), Core.IsGameStarted, CoreConfig.maxPlayedHours, Dialog.Ok(), ELayer.pc, ELayer.player, CoreConfig.rewardCode, Msg.Say(), ELayer.ui, and BaseCore.version.

◆ ToggleInventory()

void UI.ToggleInventory ( bool  delay = false)
inline

Definition at line 612 of file UI.cs.

613 {
614 if (IsInventoryOpen)
615 {
617 {
618 SE.Beep();
619 return;
620 }
621 List<Card> list = new List<Card>();
623 {
624 if (item.IsPlayerContainer())
625 {
626 list.Add(item.invs[0].owner.Container);
627 }
628 }
629 LayerInventory.listInv.ForeachReverse(delegate(LayerInventory l)
630 {
631 if (l.IsPlayerContainer(includePlayer: true))
632 {
633 ELayer.ui.layerFloat.RemoveLayer(l);
634 }
635 });
636 ELayer.ui.widgets.DeactivateWidget("Equip");
637 foreach (Card item2 in list)
638 {
639 item2.c_windowSaveData.open = true;
640 }
641 SE.Play("pop_inventory_deactivate");
642 }
643 else
644 {
645 OpenFloatInv();
646 }
647 }
Definition: Card.cs:11
static bool HasTrader
Definition: InvOwner.cs:544
static List< LayerInventory > listInv
bool IsPlayerContainer(bool includePlayer=false)
void OpenFloatInv(bool ignoreSound=false)
Definition: UI.cs:649

References InvOwner.HasTrader, LayerInventory.IsPlayerContainer(), item, LayerInventory.listInv, and ELayer.ui.

◆ UnfreezeScreen()

void UI.UnfreezeScreen ( )
inline

Definition at line 576 of file UI.cs.

577 {
578 if ((bool)texFreeze)
579 {
580 UnityEngine.Object.DestroyImmediate(texFreeze);
581 }
582 imageFreeze.SetActive(enable: false);
583 }

Member Data Documentation

◆ _rectLayers

RectTransform UI._rectLayers

Definition at line 31 of file UI.cs.

◆ autoTurn

UIAutoTurn UI.autoTurn

Definition at line 51 of file UI.cs.

◆ blur

GameObject UI.blur

Definition at line 35 of file UI.cs.

◆ blurSize

float UI.blurSize
staticprivate

Definition at line 11 of file UI.cs.

◆ blurSpeed

float UI.blurSpeed

Definition at line 57 of file UI.cs.

◆ canvas

Canvas UI.canvas

Definition at line 13 of file UI.cs.

◆ canvasScaler

CanvasScaler UI.canvasScaler

Definition at line 41 of file UI.cs.

◆ cg

CanvasGroup UI.cg

Definition at line 45 of file UI.cs.

◆ console

ReflexConsole UI.console

Definition at line 33 of file UI.cs.

◆ contextMenu

UIContextMenuManager UI.contextMenu

Definition at line 21 of file UI.cs.

◆ currentDrag

DragItem UI.currentDrag

Definition at line 63 of file UI.cs.

◆ dragDuration

float UI.dragDuration

Definition at line 73 of file UI.cs.

◆ durationHideMouseHint

float UI.durationHideMouseHint
private

Definition at line 83 of file UI.cs.

◆ extraHint

ExtraHint UI.extraHint

Definition at line 17 of file UI.cs.

◆ hidingCover

bool UI.hidingCover
private

Definition at line 67 of file UI.cs.

◆ hud

HUD UI.hud

Definition at line 15 of file UI.cs.

Referenced by AM_Dig.OnSelectEnd(), and AM_Dig.OnSelectStart().

◆ imageFreeze

RawImage UI.imageFreeze

Definition at line 61 of file UI.cs.

◆ inputModule

InputModuleEX UI.inputModule

Definition at line 19 of file UI.cs.

◆ isPointerOverUI

bool UI.isPointerOverUI

Definition at line 81 of file UI.cs.

Referenced by AM_BaseGameMode.OnUpdateInput().

◆ layerFloat

◆ layoutLang

LayoutGroup UI.layoutLang

Definition at line 39 of file UI.cs.

◆ light

Image UI.light

Definition at line 43 of file UI.cs.

◆ lightContrast

float UI.lightContrast

Definition at line 70 of file UI.cs.

◆ matBlur

Material UI.matBlur

Definition at line 37 of file UI.cs.

◆ minWidth

int UI.minWidth

Definition at line 47 of file UI.cs.

◆ mouseInfo

UIMouseInfo UI.mouseInfo

Definition at line 25 of file UI.cs.

◆ nextDrag

DragItem UI.nextDrag

Definition at line 65 of file UI.cs.

◆ popGame

PopManager UI.popGame

Definition at line 53 of file UI.cs.

◆ popSystem

PopManager UI.popSystem

Definition at line 55 of file UI.cs.

◆ rectDynamic

RectTransform UI.rectDynamic

Definition at line 27 of file UI.cs.

◆ rectDynamicEssential

RectTransform UI.rectDynamicEssential

Definition at line 29 of file UI.cs.

◆ texFreeze

Texture2D UI.texFreeze

Definition at line 59 of file UI.cs.

◆ tweenCover

Tween UI.tweenCover
private

Definition at line 75 of file UI.cs.

◆ wasActive

bool UI.wasActive

Definition at line 78 of file UI.cs.

Referenced by AM_Sim._OnUpdateInput().

◆ widgets

WidgetManager UI.widgets

Definition at line 23 of file UI.cs.

Referenced by HotItemToggleWidget.OnClick().

Property Documentation

◆ AllowInventoryInteractions

bool UI.AllowInventoryInteractions
get

Definition at line 99 of file UI.cs.

100 {
101 get
102 {
104 {
105 if (layers.Count != 0)
106 {
107 return base.TopLayer.option.allowInventoryInteraction;
108 }
109 return true;
110 }
111 return false;
112 }
113 }

◆ BlockActions

bool UI.BlockActions
get

Definition at line 115 of file UI.cs.

116 {
117 get
118 {
119 if (!wasActive || ((bool)base.TopLayer && base.TopLayer.option.passive))
120 {
122 }
123 return true;
124 }
125 }
static bool isInputFieldActive
Definition: EInput.cs:277

◆ BlockInput

bool UI.BlockInput
get

Definition at line 129 of file UI.cs.

130 {
131 get
132 {
133 if (!IsDragging && !IsBlockWidgetClick() && !(LayerAbility.hotElement != null) && !EInput.isInputFieldActive)
134 {
135 return contextMenu.isActive;
136 }
137 return true;
138 }
139 }
static ButtonAbility hotElement
Definition: LayerAbility.cs:23
bool IsBlockWidgetClick()
Definition: Layer.cs:694

◆ BlockMouseOverUpdate

bool UI.BlockMouseOverUpdate
get

Definition at line 127 of file UI.cs.

◆ blockWidgetClick

override bool UI.blockWidgetClick
get

Definition at line 157 of file UI.cs.

◆ IsAbilityOpen

bool UI.IsAbilityOpen
get

Definition at line 155 of file UI.cs.

◆ IsActive

bool UI.IsActive
get

Definition at line 87 of file UI.cs.

88 {
89 get
90 {
91 if (layers.Count <= 0)
92 {
93 return contextMenu.isActive;
94 }
95 return true;
96 }
97 }

Referenced by RefreshActiveState().

◆ IsDragging

bool UI.IsDragging
get

Definition at line 161 of file UI.cs.

◆ IsInventoryOpen

bool UI.IsInventoryOpen
get

Definition at line 153 of file UI.cs.

◆ IsPauseGame

bool UI.IsPauseGame
get

Definition at line 141 of file UI.cs.

142 {
143 get
144 {
145 if (layers.Count > 0)
146 {
147 return base.TopLayer.option.pauseGame;
148 }
149 return false;
150 }
151 }

◆ rectLayers

override RectTransform UI.rectLayers
get

Definition at line 159 of file UI.cs.

◆ skins

SkinManager UI.skins
get

Definition at line 85 of file UI.cs.


The documentation for this class was generated from the following file: