widgets
This commit is contained in:
+7
-2
@@ -1,5 +1,8 @@
|
||||
package pncdsl
|
||||
|
||||
// Verb is a registered "action word" (Look, Use, Talk, Take, …). The
|
||||
// VerbBar / RadialVerbs widgets read the VerbManager to know which verbs
|
||||
// to render; Hotspot.handler(name) looks up the bound action by Verb.Name.
|
||||
type Verb struct {
|
||||
Name string
|
||||
Label string
|
||||
@@ -9,8 +12,10 @@ type Verb struct {
|
||||
func (v Verb) GetName() string { return v.Name }
|
||||
func (v Verb) TypeLabel() string { return "verb" }
|
||||
|
||||
// defaultVerbs returns the built-in SCUMM-style verb set. A game can replace
|
||||
// or extend these by registering its own Verbs after NewGame.
|
||||
type VerbManager = Manager[Verb]
|
||||
|
||||
// defaultVerbs returns the built-in SCUMM-style verb set. NewGame
|
||||
// registers them so the demo works out of the box.
|
||||
func defaultVerbs() []Verb {
|
||||
return []Verb{
|
||||
{Name: "look", Label: "Nézd"},
|
||||
|
||||
Reference in New Issue
Block a user