Additional work on entities and themes
This commit is contained in:
parent
d186d4da6e
commit
e09da17c4e
@ -5,10 +5,11 @@ type stat struct {
|
||||
name string
|
||||
short string
|
||||
value int
|
||||
current int
|
||||
}
|
||||
|
||||
type attributes struct {
|
||||
health stat
|
||||
health stat
|
||||
strength stat
|
||||
endurance stat
|
||||
dexterity stat
|
||||
|
@ -13,6 +13,7 @@ func (p *Player) AdjustStats(which string, newvalue int) *Player {
|
||||
case "endurance","end":
|
||||
p.stats.endurance.value = newvalue
|
||||
p.stats.health.value = 5 + (5*newvalue)
|
||||
p.stats.health.current = 5 + (5*newvalue)
|
||||
case "wisdom","wis":
|
||||
p.stats.wisdom.value = newvalue
|
||||
case "intelligence","int":
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
bubbleadapter "github.com/BigJk/crt/bubbletea"
|
||||
"github.com/BigJk/crt/shader"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"git.vertinext.com/roryejinn/Ultralight/ui"
|
||||
)
|
||||
|
||||
type model struct {
|
||||
@ -38,12 +39,14 @@ func (m model) View() string {
|
||||
}
|
||||
|
||||
func main() {
|
||||
thisTheme := ui.MakeTheme()
|
||||
|
||||
fonts, err := crt.LoadFaces("assets/fonts/IosevkaTerm-Extended.ttf", "assets/fonts/IosevkaTerm-ExtendedBold.ttf", "assets/fonts/IosevkaTerm-ExtendedMedium.ttf", crt.GetFontDPI(), 16.0)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
win, _, err := bubbleadapter.Window(1000, 600, fonts, model{}, color.RGBA{R: 35, G: 33, B: 54, A: 255})
|
||||
win, _, err := bubbleadapter.Window(1000, 600, fonts, model{}, thisTheme.base)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user