unitview

package
v0.0.0-...-94f88f4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeGenericContextMenu

func MakeGenericContextMenu(cache *lbx.LbxCache, ui *uilib.UI, unit UnitView, disbandMessage string, doDisband func()) []*uilib.UIElement

func MakeSmallListView

func MakeSmallListView(cache *lbx.LbxCache, ui *uilib.UI, stack []UnitView, title string, clicked func()) []*uilib.UIElement

list of units that shows up when you right click on an enemy unit stack

func MakeUnitAbilitiesElements

func MakeUnitAbilitiesElements(imageCache *util.ImageCache, unit UnitView, mediumFont *font.Font, x int, y int, layer uilib.UILayer, getAlpha *util.AlphaFadeFunc, pureAbilities bool) []*uilib.UIElement

func MakeUnitContextMenu

func MakeUnitContextMenu(cache *lbx.LbxCache, ui *uilib.UI, unit UnitView, doDisband func()) []*uilib.UIElement

func RenderCombatImage

func RenderCombatImage(screen *ebiten.Image, imageCache *util.ImageCache, unit UnitView, options ebiten.DrawImageOptions, counter uint64)

func RenderUnitInfoBuild

func RenderUnitInfoBuild(screen *ebiten.Image, imageCache *util.ImageCache, unit UnitView, descriptionFont *font.Font, smallFont *font.Font, defaultOptions ebiten.DrawImageOptions)

func RenderUnitInfoNormal

func RenderUnitInfoNormal(screen *ebiten.Image, imageCache *util.ImageCache, unit UnitView, extraTitle string, descriptionFont *font.Font, smallFont *font.Font, defaultOptions ebiten.DrawImageOptions)

func RenderUnitInfoStats

func RenderUnitInfoStats(screen *ebiten.Image, imageCache *util.ImageCache, unit UnitView, maxIconsPerLine int, descriptionFont *font.Font, smallFont *font.Font, defaultOptions ebiten.DrawImageOptions)

func UnitDisbandMessage

func UnitDisbandMessage(unit UnitView) string

Types

type PortraitUnit

type PortraitUnit interface {
	// returns the lbx file and index that the portrait is in
	GetPortraitLbxInfo() (string, int)
}

type UnitView

type UnitView interface {
	GetName() string
	GetTitle() string // for heroes. normal units will not have a title
	GetBanner() data.BannerType
	GetCombatLbxFile() string
	GetCombatIndex(units.Facing) int
	GetLbxFile() string
	GetLbxIndex() int
	GetCount() int
	GetUpkeepGold() int
	GetUpkeepFood() int
	GetUpkeepMana() int
	GetMovementSpeed() int
	GetProductionCost() int
	GetEnchantments() []data.UnitEnchantment
	GetWeaponBonus() data.WeaponBonus
	GetExperience() int
	GetExperienceData() units.ExperienceData
	GetBaseMeleeAttackPower() int
	GetMeleeAttackPower() int
	GetBaseRangedAttackPower() int
	GetRangedAttackPower() int
	GetRangedAttackDamageType() units.Damage
	GetBaseDefense() int
	GetDefense() int
	GetResistance() int
	GetBaseResistance() int
	GetHitPoints() int
	GetBaseHitPoints() int
	GetAbilities() []units.Ability
	GetArtifactSlots() []artifact.ArtifactSlot
	GetArtifacts() []*artifact.Artifact
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL