Documentation ¶
Index ¶
- Constants
- func GetBuildingIndex(building buildinglib.Building) int
- func SimplifiedView(cache *lbx.LbxCache, city *citylib.City, player *playerlib.Player) (func(coroutine.YieldFunc, func()), func(*ebiten.Image))
- type BuildScreen
- type BuildScreenState
- type BuildingSlot
- type CityScreen
- func (cityScreen *CityScreen) BuildingMaintenanceResources() []ResourceUsage
- func (cityScreen *CityScreen) CreateResourceIcons(ui *uilib.UI) []*uilib.UIElement
- func (cityScreen *CityScreen) Draw(screen *ebiten.Image, ...)
- func (cityScreen *CityScreen) FoodProducers() []ResourceUsage
- func (cityScreen *CityScreen) GoldProducers() []ResourceUsage
- func (cityScreen *CityScreen) MakeResourceDialog(title string, smallIcon *ebiten.Image, bigIcon *ebiten.Image, ui *uilib.UI, ...) *uilib.UIElement
- func (cityScreen *CityScreen) MakeUI(newBuilding buildinglib.Building) *uilib.UI
- func (cityScreen *CityScreen) PowerProducers() []ResourceUsage
- func (cityScreen *CityScreen) ResearchProducers() []ResourceUsage
- func (cityScreen *CityScreen) SellBuilding(building buildinglib.Building)
- func (cityScreen *CityScreen) Update() CityScreenState
- func (cityScreen *CityScreen) WorkProducers() []ResourceUsage
- type CityScreenState
- type Fonts
- type ResourceUsage
Constants ¶
View Source
const ( // not a real building, just something that shows up in the city view screen BuildingTree1 buildinglib.Building = iota + buildinglib.BuildingLast BuildingTree2 BuildingTree3 BuildingTreeHouse1 BuildingTreeHouse2 BuildingTreeHouse3 BuildingTreeHouse4 BuildingTreeHouse5 )
Variables ¶
This section is empty.
Functions ¶
func GetBuildingIndex ¶
func GetBuildingIndex(building buildinglib.Building) int
the index in cityscap.lbx for the picture of this building
Types ¶
type BuildScreen ¶
type BuildScreen struct { LbxCache *lbx.LbxCache ImageCache *util.ImageCache City *citylib.City UI *uilib.UI State BuildScreenState ProducingBuilding buildinglib.Building ProducingUnit units.Unit }
func MakeBuildScreen ¶
func MakeBuildScreen(cache *lbx.LbxCache, city *citylib.City) *BuildScreen
func (*BuildScreen) Cancel ¶
func (buildScreen *BuildScreen) Cancel()
func (*BuildScreen) Draw ¶
func (build *BuildScreen) Draw(screen *ebiten.Image)
func (*BuildScreen) Ok ¶
func (buildScreen *BuildScreen) Ok()
func (*BuildScreen) Update ¶
func (build *BuildScreen) Update() BuildScreenState
type BuildScreenState ¶
type BuildScreenState int
const ( BuildScreenRunning BuildScreenState = iota BuildScreenCanceled BuildScreenOk )
type BuildingSlot ¶
type CityScreen ¶
type CityScreen struct { LbxCache *lbx.LbxCache ImageCache util.ImageCache Fonts *Fonts City *citylib.City UI *uilib.UI Player *playerlib.Player Buildings []BuildingSlot BuildScreen *BuildScreen Counter uint64 State CityScreenState }
func MakeCityScreen ¶
func MakeCityScreen(cache *lbx.LbxCache, city *citylib.City, player *playerlib.Player, newBuilding buildinglib.Building) *CityScreen
func (*CityScreen) BuildingMaintenanceResources ¶
func (cityScreen *CityScreen) BuildingMaintenanceResources() []ResourceUsage
func (*CityScreen) CreateResourceIcons ¶
func (cityScreen *CityScreen) CreateResourceIcons(ui *uilib.UI) []*uilib.UIElement
func (*CityScreen) Draw ¶
func (cityScreen *CityScreen) Draw(screen *ebiten.Image, mapView func(screen *ebiten.Image, geom ebiten.GeoM, counter uint64), tileWidth int, tileHeight int)
func (*CityScreen) FoodProducers ¶
func (cityScreen *CityScreen) FoodProducers() []ResourceUsage
func (*CityScreen) GoldProducers ¶
func (cityScreen *CityScreen) GoldProducers() []ResourceUsage
func (*CityScreen) MakeResourceDialog ¶
func (cityScreen *CityScreen) MakeResourceDialog(title string, smallIcon *ebiten.Image, bigIcon *ebiten.Image, ui *uilib.UI, resources []ResourceUsage) *uilib.UIElement
copied heavily from ui/dialogs.go:MakeHelpElementWithLayer
func (*CityScreen) MakeUI ¶
func (cityScreen *CityScreen) MakeUI(newBuilding buildinglib.Building) *uilib.UI
func (*CityScreen) PowerProducers ¶
func (cityScreen *CityScreen) PowerProducers() []ResourceUsage
func (*CityScreen) ResearchProducers ¶
func (cityScreen *CityScreen) ResearchProducers() []ResourceUsage
func (*CityScreen) SellBuilding ¶
func (cityScreen *CityScreen) SellBuilding(building buildinglib.Building)
func (*CityScreen) Update ¶
func (cityScreen *CityScreen) Update() CityScreenState
func (*CityScreen) WorkProducers ¶
func (cityScreen *CityScreen) WorkProducers() []ResourceUsage
type CityScreenState ¶
type CityScreenState int
const ( CityScreenStateRunning CityScreenState = iota CityScreenStateDone )
type ResourceUsage ¶
represents how much of a resource is being used/produced, such as '2 granary' for 'the granary produces 2 food'
Click to show internal directories.
Click to hide internal directories.