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

Public Member Functions

override void OnActivate ()
 
void _SayPick (Thing t, int num)
 
void _SayValue (string name, int a, bool negative=false, Sprite sprite=null)
 
void _Say (string text, FontColor fontColor=FontColor.Default, Sprite sprite=null)
 
- 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 ()
 

Static Public Member Functions

static void SayPick (Thing t, int num)
 
static void SayValue (string name, int a, bool negative=false, Sprite sprite=null)
 
static void Say (string text, FontColor fontColor=FontColor.Default, Sprite sprite=null)
 
- Static Public Member Functions inherited from EMono
static int rnd (int a)
 

Public Attributes

PopManager pop
 
Sprite[] icons
 
- Public Attributes inherited from Widget
Image imageBG
 
SoundData soundActivate
 
UIDragPanel dragPanel
 
RectTransform tipPivotLeft
 
RectTransform tipPivotRight
 

Static Public Attributes

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

Additional Inherited Members

- Public Types inherited from Widget
enum  WidgetType { Default , ZoomMenu }
 
enum  State { Active , Inactive }
 
- 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 3 of file WidgetPopText.cs.

Member Function Documentation

◆ _Say()

void WidgetPopText._Say ( string  text,
FontColor  fontColor = FontColor::Default,
Sprite  sprite = null 
)
inline

Definition at line 52 of file WidgetPopText.cs.

53 {
54 PopItemText popItemText = pop.PopText(text, sprite ?? icons[0], "PopNotification");
55 if (fontColor != FontColor.Default)
56 {
57 popItemText.text.color = SkinManager.Instance.skinDark.Colors.GetTextColor(fontColor);
58 }
59 }
FontColor
Definition: FontColor.cs:2
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
Color GetTextColor(FontColor fontColor)
SkinRootStatic skinDark
Definition: SkinManager.cs:59
static SkinManager Instance
Definition: SkinManager.cs:78
override SkinColorProfile Colors
Sprite[] icons
Definition: WidgetPopText.cs:9
PopManager pop
Definition: WidgetPopText.cs:7

References SkinRootStatic.Colors, SkinColorProfile.GetTextColor(), icons, SkinManager.Instance, pop, PopManager.PopText(), and SkinManager.skinDark.

Referenced by Say().

◆ _SayPick()

void WidgetPopText._SayPick ( Thing  t,
int  num 
)
inline

Definition at line 40 of file WidgetPopText.cs.

41 {
42 PopItemText popItemText = pop.PopText("notifyAddThing".lang(t.GetName(NameStyle.Full, num), t.Num.ToString() ?? ""), null, "PopNotification");
43 t.SetImage(popItemText.image);
44 popItemText.image.SetActive(enable: true);
45 }
NameStyle
Definition: NameStyle.cs:2
void SetImage(Image image, int dir, int idSkin=0)
Definition: Card.cs:5355
int Num
Definition: Card.cs:154
Image image
Definition: PopItemText.cs:8
override string GetName(NameStyle style, int _num=-1)
Definition: Thing.cs:494

References Thing.GetName(), PopItemText.image, Card.Num, pop, PopManager.PopText(), and Card.SetImage().

Referenced by SayPick().

◆ _SayValue()

void WidgetPopText._SayValue ( string  name,
int  a,
bool  negative = false,
Sprite  sprite = null 
)
inline

Definition at line 47 of file WidgetPopText.cs.

48 {
49 Say(name + " " + ((a > 0) ? "+" : "") + a, (!negative) ? FontColor.Default : FontColor.Bad, sprite);
50 }
static void Say(string text, FontColor fontColor=FontColor.Default, Sprite sprite=null)

References Say().

Referenced by SayValue().

◆ OnActivate()

override void WidgetPopText.OnActivate ( )
inlinevirtual

Reimplemented from Widget.

Definition at line 11 of file WidgetPopText.cs.

12 {
13 Instance = this;
14 }
static WidgetPopText Instance
Definition: WidgetPopText.cs:5

References Instance.

◆ Say()

static void WidgetPopText.Say ( string  text,
FontColor  fontColor = FontColor::Default,
Sprite  sprite = null 
)
inlinestatic

◆ SayPick()

static void WidgetPopText.SayPick ( Thing  t,
int  num 
)
inlinestatic

Definition at line 16 of file WidgetPopText.cs.

17 {
18 if ((bool)Instance)
19 {
20 Instance._SayPick(t, num);
21 }
22 }
void _SayPick(Thing t, int num)

References _SayPick(), and Instance.

◆ SayValue()

static void WidgetPopText.SayValue ( string  name,
int  a,
bool  negative = false,
Sprite  sprite = null 
)
inlinestatic

Definition at line 24 of file WidgetPopText.cs.

25 {
26 if ((bool)Instance)
27 {
28 Instance._SayValue(name, a, negative, sprite);
29 }
30 }
void _SayValue(string name, int a, bool negative=false, Sprite sprite=null)

References _SayValue(), and Instance.

Referenced by HomeResource.Mod().

Member Data Documentation

◆ icons

Sprite [] WidgetPopText.icons

Definition at line 9 of file WidgetPopText.cs.

Referenced by _Say().

◆ Instance

WidgetPopText WidgetPopText.Instance
static

Definition at line 5 of file WidgetPopText.cs.

Referenced by OnActivate(), Say(), SayPick(), and SayValue().

◆ pop

PopManager WidgetPopText.pop

Definition at line 7 of file WidgetPopText.cs.

Referenced by _Say(), and _SayPick().


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