...

Source file src/code.rocket9labs.com/tslocum/etk/style.go

Documentation: code.rocket9labs.com/tslocum/etk

     1  package etk
     2  
     3  import (
     4  	"image/color"
     5  
     6  	"github.com/hajimehoshi/ebiten/v2/text/v2"
     7  )
     8  
     9  var transparent = color.RGBA{0, 0, 0, 0}
    10  
    11  // Attributes represents a default attribute configuration. Integer values will be scaled.
    12  type Attributes struct {
    13  	TextFont *text.GoTextFaceSource
    14  	TextSize int
    15  
    16  	TextColorLight color.RGBA
    17  	TextColorDark  color.RGBA
    18  
    19  	TextBgColor color.RGBA
    20  
    21  	InputBorderSize      int
    22  	InputBorderFocused   color.RGBA
    23  	InputBorderUnfocused color.RGBA
    24  
    25  	ScrollAreaColor   color.RGBA
    26  	ScrollHandleColor color.RGBA
    27  
    28  	ScrollBorderSize   int
    29  	ScrollBorderTop    color.RGBA
    30  	ScrollBorderRight  color.RGBA
    31  	ScrollBorderBottom color.RGBA
    32  	ScrollBorderLeft   color.RGBA
    33  
    34  	InputBgColor color.RGBA
    35  
    36  	ButtonTextColor       color.RGBA
    37  	ButtonBgColor         color.RGBA
    38  	ButtonBgColorDisabled color.RGBA
    39  
    40  	ButtonBorderSize   int
    41  	ButtonBorderTop    color.RGBA
    42  	ButtonBorderRight  color.RGBA
    43  	ButtonBorderBottom color.RGBA
    44  	ButtonBorderLeft   color.RGBA
    45  
    46  	CheckboxBgColor color.RGBA
    47  }
    48  
    49  // Style is the current default attribute configuration. Integer values will be scaled.
    50  var Style = &Attributes{
    51  	TextSize: 32,
    52  
    53  	TextColorLight: color.RGBA{255, 255, 255, 255},
    54  	TextColorDark:  color.RGBA{0, 0, 0, 255},
    55  
    56  	TextBgColor: transparent,
    57  
    58  	InputBorderSize:      2,
    59  	InputBorderFocused:   color.RGBA{220, 220, 220, 255},
    60  	InputBorderUnfocused: color.RGBA{0, 0, 0, 255},
    61  
    62  	ScrollAreaColor:   color.RGBA{200, 200, 200, 255},
    63  	ScrollHandleColor: color.RGBA{108, 108, 108, 255},
    64  
    65  	ScrollBorderSize:   2,
    66  	ScrollBorderTop:    color.RGBA{240, 240, 240, 255},
    67  	ScrollBorderRight:  color.RGBA{0, 0, 0, 255},
    68  	ScrollBorderBottom: color.RGBA{0, 0, 0, 255},
    69  	ScrollBorderLeft:   color.RGBA{240, 240, 240, 255},
    70  
    71  	InputBgColor: color.RGBA{0, 64, 0, 255},
    72  
    73  	ButtonBgColor:         color.RGBA{255, 255, 255, 255},
    74  	ButtonBgColorDisabled: color.RGBA{110, 110, 110, 255},
    75  
    76  	ButtonBorderSize:   4,
    77  	ButtonBorderTop:    color.RGBA{220, 220, 220, 255},
    78  	ButtonBorderRight:  color.RGBA{0, 0, 0, 255},
    79  	ButtonBorderBottom: color.RGBA{0, 0, 0, 255},
    80  	ButtonBorderLeft:   color.RGBA{220, 220, 220, 255},
    81  
    82  	CheckboxBgColor: color.RGBA{255, 255, 255, 255},
    83  }
    84  

View as plain text