Skip to content

Commit 0bc6002

Browse files
committed
FIX: Adding table and web to the list of card names.
FIX: Color mixing was incorrect in certain cases. QoL: Adding shortcuts to shift the map. QoL: Possibly fixed subpage cards not taking screenshots properly? Internal: Updating web card to refresh whenever input is detected. Note that there's a bug where only one web card can work at a time, essentially. The fix is to do all chromedp calls from a single thread (main or otherwise). Internal: Adding mouse shortcuts for going forward and back (the X1 and X2 buttons in SDL). Internal: Updating web card screenshot capturing timing. Internal Fix: mouse inputs now are consumed when used on web cards. Internal: Browser path is now blank by default rather than being set to "Browser path". Internal: Adding table and web card icons to the hierarchy menu. Internal: Adding 20 FPS option for web card updating. Internal: If attempting to create a web card fails, it becomes a checkbox card.
1 parent 979dbae commit 0bc6002

File tree

13 files changed

+6766
-6563
lines changed

13 files changed

+6766
-6563
lines changed

card.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,10 @@ func (card *Card) Name() string {
946946
}
947947
case ContentTypeMap:
948948
text = "Map"
949+
case ContentTypeTable:
950+
text = "Table"
951+
case ContentTypeWeb:
952+
text = "Web"
949953
default:
950954
text = card.Properties.Get("description").AsString()
951955
}
@@ -2062,7 +2066,13 @@ func (card *Card) SetContents(contentType string) {
20622066
case ContentTypeTable:
20632067
card.Contents = NewTableContents(card)
20642068
case ContentTypeWeb:
2065-
card.Contents = NewWebContents(card)
2069+
webCard := NewWebContents(card)
2070+
if webCard == nil {
2071+
// Web card couldn't be created, probably because of browser shenanigans
2072+
card.Contents = NewCheckboxContents(card)
2073+
} else {
2074+
card.Contents = webCard
2075+
}
20662076
default:
20672077
panic("Creation of card contents that haven't been implemented: " + contentType)
20682078
}

0 commit comments

Comments
 (0)