| | 1 | | namespace DCL.ECSComponents |
| | 2 | | { |
| | 3 | | public static class PBTextShape_Defaults |
| | 4 | | { |
| | 5 | | public static bool GetVisible(this PBTextShape self) |
| | 6 | | { |
| 0 | 7 | | return !self.HasVisible || self.Visible; |
| | 8 | | } |
| | 9 | |
|
| | 10 | | public static float GetOpacity(this PBTextShape self) |
| | 11 | | { |
| 0 | 12 | | return self.HasOpacity ? self.Opacity : 1.0f; |
| | 13 | | } |
| | 14 | |
|
| | 15 | | public static float GetFontSize(this PBTextShape self) |
| | 16 | | { |
| 51 | 17 | | return self.HasFontSize ? self.FontSize : 10.0f; |
| | 18 | | } |
| | 19 | |
|
| | 20 | | public static string GetHTextAlign(this PBTextShape self) |
| | 21 | | { |
| 51 | 22 | | return self.HasHTextAlign ? self.HTextAlign : "center"; |
| | 23 | | } |
| | 24 | |
|
| | 25 | | public static string GetVTextAlign(this PBTextShape self) |
| | 26 | | { |
| 51 | 27 | | return self.HasVTextAlign ? self.VTextAlign : "center"; |
| | 28 | | } |
| | 29 | |
|
| | 30 | | public static float GetWidth(this PBTextShape self) |
| | 31 | | { |
| 4 | 32 | | return self.HasWidth ? self.Width : 1.0f; |
| | 33 | | } |
| | 34 | |
|
| | 35 | | public static float GetHeight(this PBTextShape self) |
| | 36 | | { |
| 4 | 37 | | return self.HasHeight ? self.Height : 1.0f; |
| | 38 | | } |
| | 39 | |
|
| | 40 | | public static Color3 GetShadowColor(this PBTextShape self) |
| | 41 | | { |
| 0 | 42 | | return self.ShadowColor ?? new Color3() { R = 1.0f, G = 1.0f, B = 1.0f }; |
| | 43 | | } |
| | 44 | |
|
| | 45 | | public static Color3 GetOutlineColor(this PBTextShape self) |
| | 46 | | { |
| 0 | 47 | | return self.OutlineColor ?? new Color3() { R = 1.0f, G = 1.0f, B = 1.0f }; |
| | 48 | | } |
| | 49 | |
|
| | 50 | | public static Color3 GetTextColor(this PBTextShape self) |
| | 51 | | { |
| 0 | 52 | | return self.TextColor ?? new Color3() { R = 1.0f, G = 1.0f, B = 1.0f }; |
| | 53 | | } |
| | 54 | | } |
| | 55 | | } |