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

Public Member Functions

void SetImage (Sprite sprite)
 
override void OnUpdateInput ()
 
void Zoom (float a)
 
override void OnKill ()
 
- 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

Image image
 
Vector2 margin
 
- 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
 

Private Attributes

float zoom = 1f
 

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 Member Functions inherited from ELayer
sealed override void _Close ()
 
sealed override void Kill ()
 
- Protected Member Functions inherited from Layer
virtual void Awake ()
 
virtual void _Close ()
 
virtual void Kill ()
 
- Protected Attributes inherited from Layer
RectTransform _rect
 
bool isDestroyed
 
- 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]
 

Detailed Description

Definition at line 4 of file LayerImage.cs.

Member Function Documentation

◆ OnKill()

override void LayerImage.OnKill ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 55 of file LayerImage.cs.

56 {
57 EInput.Consume(2);
58 }
Definition: EInput.cs:8
static void Consume(int _skipFrame)
Definition: EInput.cs:656

References EInput.Consume().

◆ OnUpdateInput()

override void LayerImage.OnUpdateInput ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 27 of file LayerImage.cs.

28 {
29 if (EInput.wheel != 0)
30 {
31 Zoom((EInput.wheel > 0) ? 0.25f : (-0.25f));
32 }
34 {
35 image.SetNativeSize();
36 zoom = 1f;
37 Zoom(0f);
38 }
39 }
bool clicked
Definition: ButtonState.cs:37
static int wheel
Definition: EInput.cs:289
static ButtonState middleMouse
Definition: EInput.cs:353
Image image
Definition: LayerImage.cs:6
float zoom
Definition: LayerImage.cs:10
void Zoom(float a)
Definition: LayerImage.cs:41

References ButtonState.clicked, image, EInput.middleMouse, EInput.wheel, zoom, and Zoom().

◆ SetImage()

void LayerImage.SetImage ( Sprite  sprite)
inline

Definition at line 12 of file LayerImage.cs.

13 {
14 image.sprite = sprite;
15 image.SetNativeSize();
16 float num = ((float)Screen.height - margin.y) / ELayer.core.uiScale;
17 RectTransform rectTransform = image.rectTransform;
18 float num2 = rectTransform.sizeDelta.y;
19 if (num2 > num)
20 {
21 num2 = num;
22 }
23 rectTransform.sizeDelta = new Vector2(rectTransform.sizeDelta.x, num2);
24 Zoom(0f);
25 }
override float uiScale
Definition: Core.cs:95
Definition: ELayer.cs:4
static Core core
Definition: ELayer.cs:7
Vector2 margin
Definition: LayerImage.cs:8

References ELayer.core, image, margin, Core.uiScale, and Zoom().

◆ Zoom()

void LayerImage.Zoom ( float  a)
inline

Definition at line 41 of file LayerImage.cs.

42 {
43 zoom += a;
44 if (zoom < 0.5f)
45 {
46 zoom = 0.5f;
47 }
48 if (zoom > 2f)
49 {
50 zoom = 2f;
51 }
52 image.rectTransform.localScale = new Vector3(zoom, zoom, zoom);
53 }

References zoom.

Referenced by OnUpdateInput(), and SetImage().

Member Data Documentation

◆ image

Image LayerImage.image

Definition at line 6 of file LayerImage.cs.

Referenced by OnUpdateInput(), and SetImage().

◆ margin

Vector2 LayerImage.margin

Definition at line 8 of file LayerImage.cs.

Referenced by SetImage().

◆ zoom

float LayerImage.zoom = 1f
private

Definition at line 10 of file LayerImage.cs.

Referenced by OnUpdateInput(), and Zoom().


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