Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
WidgetMouseover Class Reference
Inheritance diagram for WidgetMouseover:
Widget EMono IChangeResolution ISkinRoot

Public Member Functions

override void OnActivate ()
 
void Refresh ()
 
void Show (string s)
 
void Hide (bool immediate=false)
 
override void OnManagerActivate ()
 
override void OnManagerDeactivate ()
 
- Public Member Functions inherited from Widget
void Test ()
 
bool IsInRightMode ()
 
void Activate ()
 
void RefreshOrder ()
 
virtual void OnActivate ()
 
virtual object CreateExtra ()
 
void Deactivate ()
 
virtual void OnDeactivate ()
 
void Close ()
 
void Reactivate ()
 
virtual void OnManagerActivate ()
 
virtual void OnManagerDeactivate ()
 
void SetAnchor (RectPosition p)
 
void SetPivot (RectPosition p)
 
virtual void OnChangePivot ()
 
void UpdateConfig ()
 
virtual void OnUpdateConfig ()
 
void ClampToScreen ()
 
virtual void OnChangeResolution ()
 
void OnChangePosition ()
 
virtual void OnChangeActionMode ()
 
virtual void OnFlip ()
 
bool IsAlignTop ()
 
Layer AddLayer (Layer l, Transform trans)
 
void RefreshTipPivotPosition ()
 
SkinSet GetSkin ()
 
SkinConfig GetSkinConfig ()
 
void SetSkin (int id, int v=0)
 
void TestSkin ()
 
virtual void ApplySkin ()
 
virtual void OnApplySkin ()
 
void InstantiateDeco (SkinDeco deco)
 
void AddDeco (SkinDeco deco)
 
void RemoveDeco (SkinDeco deco)
 
virtual bool CanShowContextMenu ()
 
void ShowContextMenu ()
 
void SetBaseContextMenu (UIContextMenu m)
 
virtual void OnSetContextMenu (UIContextMenu m)
 
void SetGridContextMenu (UIContextMenu m)
 
void SoundActivate ()
 
void OnChangeResolution ()
 
SkinSet GetSkin ()
 
SkinConfig GetSkinConfig ()
 

Public Attributes

Chara roster
 
UIText textName
 
LayoutGroup layout
 
CanvasGroup cg
 
Tween tween
 
- Public Attributes inherited from Widget
Image imageBG
 
SoundData soundActivate
 
UIDragPanel dragPanel
 
RectTransform tipPivotLeft
 
RectTransform tipPivotRight
 

Static Public Attributes

static WidgetMouseover Instance
 
- Static Public Attributes inherited from EMono
static Core core
 

Private Attributes

float timer
 

Additional Inherited Members

- Public Types inherited from Widget
enum  WidgetType { Default , ZoomMenu }
 
enum  State { Active , Inactive }
 
- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Protected Member Functions inherited from Widget
void ClampToScreenEnsured (Component c, Vector2 anchoredPos)
 
void ClampToScreen (RectTransform rect, float margin=10f)
 
- Protected Attributes inherited from Widget
bool flip
 
- Properties inherited from Widget
string ID [get]
 
Config config [get]
 
SkinRoot skinRoot [get]
 
bool IsSealed [get]
 
virtual bool ShowStyleMenu [get]
 
virtual bool AlwaysTop [get]
 
virtual bool IsStaticPosition [get]
 
virtual bool AlwaysBottom [get]
 
virtual Type SetSiblingAfter [get]
 
virtual bool ShowInBuildMode [get]
 
virtual bool RightClickToClose [get]
 
virtual bool AllowRightClickToClose [get]
 
- Properties inherited from EMono
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Detailed Description

Definition at line 6 of file WidgetMouseover.cs.

Member Function Documentation

◆ Hide()

void WidgetMouseover.Hide ( bool  immediate = false)
inline

Definition at line 114 of file WidgetMouseover.cs.

115 {
116 imageBG.raycastTarget = false;
117 if (immediate)
118 {
119 layout.SetActive(enable: false);
120 return;
121 }
122 TweenUtil.KillTween(ref tween);
123 tween = cg.DOFade(0f, 0.3f).OnComplete(delegate
124 {
125 if ((bool)layout)
126 {
127 layout.SetActive(enable: false);
128 }
129 }).SetEase(Ease.InQuad);
130 }
CanvasGroup cg
LayoutGroup layout

References cg, layout, and tween.

Referenced by AM_Adv.OnActivate(), and AM_ViewZone.OnActivate().

◆ OnActivate()

override void WidgetMouseover.OnActivate ( )
inlinevirtual

Reimplemented from Widget.

Definition at line 22 of file WidgetMouseover.cs.

23 {
24 Instance = this;
25 Hide(immediate: true);
26 }
Definition: Hide.cs:4
static WidgetMouseover Instance

References Instance.

◆ OnManagerActivate()

override void WidgetMouseover.OnManagerActivate ( )
inlinevirtual

Reimplemented from Widget.

Definition at line 132 of file WidgetMouseover.cs.

133 {
134 base.OnManagerActivate();
135 imageBG.raycastTarget = true;
136 Show("[" + Lang.Get("WidgetMouseover") + "]");
137 }
Definition: Lang.cs:6
static string Get(string id)
Definition: Lang.cs:91
void Show(string s)

References Lang.Get(), and Show().

◆ OnManagerDeactivate()

override void WidgetMouseover.OnManagerDeactivate ( )
inlinevirtual

Reimplemented from Widget.

Definition at line 139 of file WidgetMouseover.cs.

140 {
141 base.OnManagerDeactivate();
142 Hide(immediate: true);
143 }

◆ Refresh()

void WidgetMouseover.Refresh ( )
inline

Definition at line 28 of file WidgetMouseover.cs.

29 {
30 timer += Core.delta;
31 PointTarget mouseTarget = EMono.scene.mouseTarget;
32 if (!mouseTarget.hasTargetChanged && timer < 0.1f)
33 {
34 return;
35 }
36 timer = 0f;
37 bool flag = EInput.isShiftDown && mouseTarget.pos.Equals(EMono.pc.pos) && (EMono.pc.ride != null || EMono.pc.parasite != null);
38 if (((!flag && mouseTarget.target == null) || (ActionMode.IsAdv && Input.GetMouseButton(0))) && roster == null)
39 {
40 Hide();
41 return;
42 }
43 string text = "";
44 Card card = mouseTarget.card;
45 if (roster != null && roster.ExistsOnMap)
46 {
47 flag = false;
48 card = roster;
49 }
50 if (flag)
51 {
52 if (EMono.pc.ride != null)
53 {
54 text += EMono.pc.ride.GetHoverText();
55 text += EMono.pc.ride.GetHoverText2();
56 }
57 if (EMono.pc.parasite != null)
58 {
59 if (EMono.pc.ride != null)
60 {
61 text += Environment.NewLine;
62 }
63 text += EMono.pc.parasite.GetHoverText();
65 }
66 }
67 else if (card != null)
68 {
69 text = card.GetHoverText();
70 if (roster == null)
71 {
72 int count = EMono.scene.mouseTarget.cards.Count;
73 if (count > 1)
74 {
75 text += "otherCards".lang((count - 1).ToString() ?? "");
76 }
77 }
78 text += card.GetHoverText2();
79 if (roster == null && mouseTarget.target != card)
80 {
81 text = text + Environment.NewLine + mouseTarget.target.InspectName;
82 }
83 }
84 else if (mouseTarget.target != null)
85 {
86 text = mouseTarget.target.InspectName;
87 }
88 Show(text);
89 }
static bool IsAdv
Definition: ActionMode.cs:117
Definition: Card.cs:11
bool ExistsOnMap
Definition: Card.cs:1961
Point pos
Definition: Card.cs:55
override string GetHoverText()
Definition: Chara.cs:6118
Chara parasite
Definition: Chara.cs:30
Chara ride
Definition: Chara.cs:27
override string GetHoverText2()
Definition: Chara.cs:6186
Definition: Core.cs:14
static float delta
Definition: Core.cs:17
Definition: EMono.cs:4
static Chara pc
Definition: EMono.cs:13
static Scene scene
Definition: EMono.cs:27
bool hasTargetChanged
Definition: PointTarget.cs:20
IInspect target
Definition: PointTarget.cs:16
List< Card > cards
Definition: PointTarget.cs:38
bool Equals(int _x, int _z)
Definition: Point.cs:924
PointTarget mouseTarget
Definition: Scene.cs:129
string InspectName
Definition: IInspect.cs:16

References card, PointTarget.card, PointTarget.cards, Core.delta, Point.Equals(), Card.ExistsOnMap, Chara.GetHoverText(), Chara.GetHoverText2(), PointTarget.hasTargetChanged, IInspect.InspectName, ActionMode.IsAdv, Scene.mouseTarget, Chara.parasite, EMono.pc, Card.pos, PointTarget.pos, Chara.ride, roster, EMono.scene, Show(), PointTarget.target, and timer.

Referenced by PointTarget.CycleTarget(), and ActionMode.UpdateInput().

◆ Show()

void WidgetMouseover.Show ( string  s)
inline

Definition at line 91 of file WidgetMouseover.cs.

92 {
93 layout.SetActive(enable: true);
94 cg.alpha = 1f;
95 TweenUtil.KillTween(ref tween);
96 textName.text = s;
97 switch (this.Rect().GetAnchor())
98 {
99 case RectPosition.TopLEFT:
100 case RectPosition.BottomLEFT:
101 layout.childAlignment = TextAnchor.MiddleLeft;
102 break;
103 case RectPosition.TopRIGHT:
104 case RectPosition.BottomRIGHT:
105 layout.childAlignment = TextAnchor.MiddleRight;
106 break;
107 default:
108 layout.childAlignment = TextAnchor.MiddleCenter;
109 break;
110 }
111 layout.RebuildLayout();
112 }
RectPosition
Definition: RectPosition.cs:2

References layout, and tween.

Referenced by OnManagerActivate(), and Refresh().

Member Data Documentation

◆ cg

CanvasGroup WidgetMouseover.cg

Definition at line 16 of file WidgetMouseover.cs.

Referenced by Hide().

◆ Instance

◆ layout

LayoutGroup WidgetMouseover.layout

Definition at line 14 of file WidgetMouseover.cs.

Referenced by Hide(), and Show().

◆ roster

Chara WidgetMouseover.roster

Definition at line 10 of file WidgetMouseover.cs.

Referenced by Refresh().

◆ textName

UIText WidgetMouseover.textName

Definition at line 12 of file WidgetMouseover.cs.

◆ timer

float WidgetMouseover.timer
private

Definition at line 20 of file WidgetMouseover.cs.

Referenced by Refresh().

◆ tween

Tween WidgetMouseover.tween

Definition at line 18 of file WidgetMouseover.cs.

Referenced by Hide(), and Show().


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