collection

package
v0.0.0-...-dbcd403 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectionUI

type CollectionUI struct {
	// contains filtered or unexported fields
}

CollectionUI 管理图鉴的整套交互状态。 它同时持有筛选条件、飞机首项位置、当前选中对象和本帧重建标记。 这样做的目的,是让页面切换只替换根容器,而不是销毁共享 EbitenUI 实例。

func NewCollectionUI

func NewCollectionUI(drawers ...*Drawer) *CollectionUI

NewCollectionUI 创建图鉴界面。 drawer 参数允许测试注入更轻量的绘制器;生产代码通常不需要传参。

func (*CollectionUI) Container

func (c *CollectionUI) Container() widget.Containerer

Container 返回由游戏共享 EbitenUI 主实例承载的图鉴容器。

func (*CollectionUI) Draw

func (c *CollectionUI) Draw(screen *ebiten.Image)

func (*CollectionUI) DrawOverlay

func (c *CollectionUI) DrawOverlay(screen *ebiten.Image)

func (*CollectionUI) ReloadLanguage

func (c *CollectionUI) ReloadLanguage()

ReloadLanguage 标记图鉴控件在下次更新时按当前语言重建。

func (*CollectionUI) Update

func (c *CollectionUI) Update()

type Drawer

type Drawer struct{}

Drawer 封装图鉴专用绘制逻辑。 把文本、图片和卡片样式集中在这里,能减少 UI 代码里重复的绘制参数。

func NewDrawer

func NewDrawer() *Drawer

type UI

type UI = CollectionUI

UI 是游戏图鉴界面的对外别名,保留给 game 包直接持有。

func New

func New() *UI

New 创建图鉴界面,供上层以默认绘制器初始化使用。

Jump to

Keyboard shortcuts

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