| | 1 | | using Decentraland.Common; |
| | 2 | |
|
| | 3 | | namespace DCL.ECSComponents |
| | 4 | | { |
| | 5 | | public static class PBUiInput_Defaults |
| | 6 | | { |
| 1 | 7 | | private static readonly Color4 PLACEHOLDER_COLOR = new () { R = 0.3f, G = 0.3f, B = 0.3f, A = 1.0f }; |
| | 8 | |
|
| | 9 | | public static Color4 GetColor(this PBUiInput self) => |
| 4 | 10 | | self.Color ?? Color_Defaults.color4Black; |
| | 11 | |
|
| | 12 | | public static Color4 GetPlaceholderColor(this PBUiInput self) => |
| 4 | 13 | | self.PlaceholderColor ?? PLACEHOLDER_COLOR; |
| | 14 | |
|
| | 15 | | public static bool IsInteractable(this PBUiInput self) => |
| 4 | 16 | | !self.Disabled; |
| | 17 | |
|
| | 18 | | public static TextAlignMode GetTextAlign(this PBUiInput self) => |
| 4 | 19 | | self.HasTextAlign ? self.TextAlign : TextAlignMode.TamMiddleCenter; |
| | 20 | |
|
| | 21 | | public static Font GetFont(this PBUiInput self) => |
| 4 | 22 | | self.HasFont ? self.Font : Font.FSansSerif; |
| | 23 | |
|
| | 24 | | public static float GetFontSize(this PBUiInput self) => |
| 4 | 25 | | self.HasFontSize ? self.FontSize : 10; |
| | 26 | | } |
| | 27 | | } |