gg/ox/feats.go
2024-06-01 18:07:28 +05:00

55 lines
861 B
Go

package ox
import "surdeus.su/core/gg"
type Drawity struct {
Visibility
Colority
Shaderity
Floatity
Layerity
}
// Feat to emded for turning antialias on and off.
type Antialiasity struct {
Antialias bool
}
// Feat to embed for turning visibility on and off.
type Visibility struct {
Visible bool
}
func (v Visibility) IsVisible() bool {
return v.Visible
}
func (v Visibility) ToggleVisibility() bool {
v.Visible = !v.Visible
return v.IsVisible()
}
// Feat to embed to make colorful objects.
type Colority struct {
Color gg.Color
}
// The structure to embed into shaderable
// objects.
type Shaderity struct {
gg.ShaderOptions
}
func (s Shaderity) GetShaderOptions(
) *gg.ShaderOptions {
return &s.ShaderOptions
}
type Floatity struct {
Floating bool
}
func (s Floatity) IsFloating() bool {
return s.Floating
}
type Layerity = gg.Layer