@@ -49,5 +49,125 @@ private void DrawScales()
4949 }
5050
5151 private void DrawColors ( )
52- { }
52+ {
53+ using var colors = Im . Tree . Node ( "Colors"u8 ) ;
54+ if ( ! colors )
55+ return ;
56+
57+ using var table = Im . Table . Begin ( "t"u8 , 1 + 5 + 32 ,
58+ TableFlags . Borders | TableFlags . SizingFixedFit | TableFlags . RowBackground | TableFlags . ScrollX | TableFlags . ScrollY ,
59+ Im . ContentRegion . Available with { Y = Im . Style . FrameHeightWithSpacing * 10 } ) ;
60+ if ( ! table )
61+ return ;
62+
63+ table . SetupScrollFreeze ( 1 , 1 ) ;
64+ Im . Table . NextRow ( TableRowFlags . Headers ) ;
65+ table . NextColumn ( ) ;
66+ ImEx . TextCentered ( "#Color"u8 ) ;
67+
68+ table . NextColumn ( ) ;
69+ ImEx . TextCentered ( "Eyes"u8 ) ;
70+ ImEx . TextCentered ( "Global"u8 ) ;
71+
72+ table . NextColumn ( ) ;
73+ ImEx . TextCentered ( "Highlights"u8 ) ;
74+ ImEx . TextCentered ( "Global"u8 ) ;
75+
76+ table . NextColumn ( ) ;
77+ ImEx . TextCentered ( "Features"u8 ) ;
78+ ImEx . TextCentered ( "Global"u8 ) ;
79+
80+ table . NextColumn ( ) ;
81+ ImEx . TextCentered ( "Lips"u8 ) ;
82+ ImEx . TextCentered ( "Global"u8 ) ;
83+
84+ table . NextColumn ( ) ;
85+ ImEx . TextCentered ( "FacePaint"u8 ) ;
86+ ImEx . TextCentered ( "Global"u8 ) ;
87+
88+ foreach ( var name in SubRace . Values . Skip ( 1 ) )
89+ {
90+ table . NextColumn ( ) ;
91+ ImEx . TextCentered ( "Skin"u8 ) ;
92+ ImEx . TextCentered ( $ "{ name . ToShortNameU8 ( ) } ") ;
93+
94+ table . NextColumn ( ) ;
95+ ImEx . TextCentered ( "Hair"u8 ) ;
96+ ImEx . TextCentered ( $ "{ name . ToShortNameU8 ( ) } ") ;
97+ }
98+
99+ ref var eyesUi = ref _ptr ->Interface . Eyes ;
100+ ref var highlightsUi = ref _ptr ->Interface . HairHighlights ;
101+ ref var featuresUi = ref _ptr ->Interface . Features ;
102+ var lipsUi = new CmpData . ColorsPair ( ref _ptr ->Interface . LipsDark , ref _ptr ->Interface . LipsLight ) ;
103+ var facePaintUi = new CmpData . ColorsPair ( ref _ptr ->Interface . FacePaintDark , ref _ptr ->Interface . FacePaintLight ) ;
104+
105+ ref var eyes = ref _ptr ->Parameters . Eyes ;
106+ ref var highlights = ref _ptr ->Parameters . HairHighlights ;
107+ ref var features = ref _ptr ->Parameters . Features ;
108+ var lips = new CmpData . ColorsPair ( ref _ptr ->Parameters . LipsDark , ref _ptr ->Parameters . LipsLight ) ;
109+ var facePaint = new CmpData . ColorsPair ( ref _ptr ->Parameters . FacePaintDark , ref _ptr ->Parameters . FacePaintLight ) ;
110+
111+ using var clip = new Im . ListClipper ( 256 , Im . Style . FrameHeightWithSpacing ) ;
112+ foreach ( var index in clip )
113+ {
114+ using var id = Im . Id . Push ( index ) ;
115+ table . DrawFrameColumn ( $ "#{ index + 1 : D3} ") ;
116+
117+ table . NextColumn ( ) ;
118+ Im . Color . Button ( "Eye UI Color"u8 , eyesUi [ index ] ) ;
119+ Im . Line . SameInner ( ) ;
120+ Im . Color . Button ( "Eye Color"u8 , eyes [ index ] ) ;
121+
122+ table . NextColumn ( ) ;
123+ Im . Color . Button ( "Highlights UI Color"u8 , highlightsUi [ index ] ) ;
124+ Im . Line . SameInner ( ) ;
125+ Im . Color . Button ( "Highlights Color"u8 , highlights [ index ] ) ;
126+
127+ table . NextColumn ( ) ;
128+ Im . Color . Button ( "Features UI Color"u8 , featuresUi [ index ] ) ;
129+ Im . Line . SameInner ( ) ;
130+ Im . Color . Button ( "Features Color"u8 , features [ index ] ) ;
131+
132+ table . NextColumn ( ) ;
133+ Im . Color . Button ( "Lips UI Color"u8 , lipsUi [ index ] ) ;
134+ Im . Line . SameInner ( ) ;
135+ Im . Color . Button ( "Lips Color"u8 , lips [ index ] ) ;
136+
137+ table . NextColumn ( ) ;
138+ Im . Color . Button ( "Face Paint UI Color"u8 , facePaintUi [ index ] ) ;
139+ Im . Line . SameInner ( ) ;
140+ Im . Color . Button ( "Face Paint Color"u8 , facePaint [ index ] ) ;
141+
142+ foreach ( var race in SubRace . Values . Skip ( 1 ) )
143+ {
144+ var name = race . ToNameU8 ( ) ;
145+ table . NextColumn ( ) ;
146+ ImEx . TextFramed ( "♂"u8 , default , Rgba32 . Transparent ) ;
147+ Im . Line . SameInner ( ) ;
148+ Im . Color . Button ( $ "Skin UI Color ({ name } Male)", _ptr ->GetSkin ( race , Gender . Male , true ) [ index ] ) ;
149+ Im . Line . SameInner ( ) ;
150+ Im . Color . Button ( $ "Skin Color ({ name } Male)", _ptr ->GetSkin ( race , Gender . Male , false ) [ index ] ) ;
151+ Im . Line . Same ( ) ;
152+ ImEx . TextFramed ( "♀"u8 , default , Rgba32 . Transparent ) ;
153+ Im . Line . SameInner ( ) ;
154+ Im . Color . Button ( $ "Skin UI Color ({ name } Female)", _ptr ->GetSkin ( race , Gender . Female , true ) [ index ] ) ;
155+ Im . Line . SameInner ( ) ;
156+ Im . Color . Button ( $ "Skin Color ({ name } Female)", _ptr ->GetSkin ( race , Gender . Female , false ) [ index ] ) ;
157+
158+ table . NextColumn ( ) ;
159+ ImEx . TextFramed ( "♂"u8 , default , Rgba32 . Transparent ) ;
160+ Im . Line . SameInner ( ) ;
161+ Im . Color . Button ( $ "Hair UI Color ({ name } Male)", _ptr ->GetHairUi ( race , Gender . Male ) [ index ] ) ;
162+ Im . Line . SameInner ( ) ;
163+ Im . Color . Button ( $ "Hair Color ({ name } Male)", _ptr ->GetHair ( race , Gender . Male ) [ index ] . Main ) ;
164+ Im . Line . Same ( ) ;
165+ ImEx . TextFramed ( "♀"u8 , default , Rgba32 . Transparent ) ;
166+ Im . Line . SameInner ( ) ;
167+ Im . Color . Button ( $ "Hair UI Color ({ name } Female)", _ptr ->GetHairUi ( race , Gender . Female ) [ index ] ) ;
168+ Im . Line . SameInner ( ) ;
169+ Im . Color . Button ( $ "Hair Color ({ name } Female)", _ptr ->GetHair ( race , Gender . Female ) [ index ] . Main ) ;
170+ }
171+ }
172+ }
53173}
0 commit comments