File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -291,3 +291,27 @@ func (l *ListView) Count() int {
291
291
func (panel * Panel ) Bounds () * Rect {
292
292
return (* Rect )(& panel .bounds )
293
293
}
294
+
295
+ func (t * StyleText ) Color () * Color {
296
+ return (* Color )(& t .color )
297
+ }
298
+
299
+ func (s * Style ) Text () * StyleText {
300
+ return (* StyleText )(& s .text )
301
+ }
302
+
303
+ func (s * Style ) Window () * StyleWindow {
304
+ return (* StyleWindow )(& s .window )
305
+ }
306
+
307
+ func (w * StyleWindow ) Background () * Color {
308
+ return (* Color )(& w .background )
309
+ }
310
+
311
+ func SetTextColor (ctx * Context , color Color ) {
312
+ * ctx .Style ().Text ().Color () = color
313
+ }
314
+
315
+ func SetBackgroundColor (ctx * Context , color Color ) {
316
+ ctx .Style ().Window ().fixed_background = C .struct_nk_style_item (NkStyleItemColor (color ))
317
+ }
You can’t perform that action at this time.
0 commit comments