feat: controls styling from gesture info
This commit is contained in:
@@ -230,7 +230,7 @@ const (
|
||||
Meta
|
||||
)
|
||||
|
||||
var GesturesHighToLow = [...]HandGesture{Meta, ClarifyingQ, Expand, ProbingQ, ChangeTopic}
|
||||
var GesturesHighToLow = [...]HandGesture{4, 3, 2, 1, 0}
|
||||
|
||||
func GestureFromInt(num int) (HandGesture, bool) {
|
||||
if num >= int(ChangeTopic) && num <= int(Meta) {
|
||||
@@ -245,9 +245,9 @@ func (g HandGesture) String() string {
|
||||
}
|
||||
|
||||
type GestureInfo struct {
|
||||
Name string
|
||||
Color, BgColor template.CSS
|
||||
IconUrl template.URL
|
||||
Name string
|
||||
Color, ColorDark template.CSS
|
||||
IconUrl template.URL
|
||||
}
|
||||
|
||||
func (g HandGesture) GetGestureInfo() GestureInfo {
|
||||
@@ -255,28 +255,28 @@ func (g HandGesture) GetGestureInfo() GestureInfo {
|
||||
switch g {
|
||||
case ChangeTopic:
|
||||
result = GestureInfo{
|
||||
Color: "--change-topic-color",
|
||||
BgColor: "--change-topic-dark",
|
||||
Color: "--change-topic-color",
|
||||
ColorDark: "--change-topic-dark",
|
||||
}
|
||||
case ProbingQ:
|
||||
result = GestureInfo{
|
||||
Color: "--probing-q-color",
|
||||
BgColor: "--probing-q-dark",
|
||||
Color: "--probing-q-color",
|
||||
ColorDark: "--probing-q-dark",
|
||||
}
|
||||
case Expand:
|
||||
result = GestureInfo{
|
||||
Color: "--expand-color",
|
||||
BgColor: "--expand-dark",
|
||||
Color: "--expand-color",
|
||||
ColorDark: "--expand-dark",
|
||||
}
|
||||
case ClarifyingQ:
|
||||
result = GestureInfo{
|
||||
Color: "--clarifying-q-color",
|
||||
BgColor: "--clarifying-q-dark",
|
||||
Color: "--clarifying-q-color",
|
||||
ColorDark: "--clarifying-q-dark",
|
||||
}
|
||||
case Meta:
|
||||
result = GestureInfo{
|
||||
Color: "--meta-color",
|
||||
BgColor: "--meta-dark",
|
||||
Color: "--meta-color",
|
||||
ColorDark: "--meta-dark",
|
||||
}
|
||||
}
|
||||
result.Name = g.String()
|
||||
|
||||
Reference in New Issue
Block a user