| 34 | } |
| 35 | |
| 36 | public string ToCode() |
| 37 | { |
| 38 | Color primary = UI.GetThemeColor(UIColor.Primary); |
| 39 | Color background = UI.GetThemeColor(UIColor.Background); |
| 40 | Color common = UI.GetThemeColor(UIColor.Common); |
| 41 | Color complement = UI.GetThemeColor(UIColor.Complement); |
| 42 | Color text = UI.GetThemeColor(UIColor.Text); |
| 43 | return @$"// Theme code generated by theme editor! |
| 44 | UI.Settings = new UISettings |
| 45 | {{ |
| 46 | margin = {settings.margin:0.000}f, |
| 47 | padding = {settings.padding:0.000}f, |
| 48 | gutter = {settings.gutter:0.000}f, |
| 49 | depth = {settings.depth:0.000}f, |
| 50 | rounding = {settings.rounding:0.000}f |
| 51 | }}; |
| 52 | UI.SetThemeColor(UIColor.Primary, new Color({primary.r :0.000}f,{primary.g :0.000}f,{primary.b :0.000}f)); |
| 53 | UI.SetThemeColor(UIColor.Background, new Color({background.r:0.000}f,{background.g:0.000}f,{background.b:0.000}f)); |
| 54 | UI.SetThemeColor(UIColor.Common, new Color({common.r :0.000}f,{common.g :0.000}f,{common.b :0.000}f)); |
| 55 | UI.SetThemeColor(UIColor.Complement, new Color({complement.r:0.000}f,{complement.g:0.000}f,{complement.b:0.000}f)); |
| 56 | UI.SetThemeColor(UIColor.Text, new Color({text.r :0.000}f,{text.g :0.000}f,{text.b :0.000}f)); |
| 57 | "; |
| 58 | } |
| 59 | |
| 60 | public static Theme FromCurrent() |
| 61 | { |