Documentation ¶
Overview ¶
Package ebimgui contains a renderer of ImGui for Ebitengine
Index ¶
- func BeginFrame()
- func ClipMask() bool
- func Draw(screen *ebiten.Image)
- func EndFrame()
- func Render(target *ebiten.Image, drawData *imgui.DrawData, txcache TextureCache, ...)
- func RenderMasked(target *ebiten.Image, mask *ebiten.Image, drawData *imgui.DrawData, ...)
- func SetClipMask(value bool)
- func SetDisplaySize(width, height float32)
- func Update(delta float32)
- type GetCursorFn
- type Manager
- type TextureCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginFrame ¶
func BeginFrame()
BeginFrame needs to be called on every frame, before cimgui-go calls. This is usually called inside the game's Update() function.
func Draw ¶
func Draw(screen *ebiten.Image)
Draw draws the generated imgui frame to the screen. This is usually called inside the game's Draw() function.
func EndFrame ¶
func EndFrame()
EndFrame needs to be called on every frame, after cimgui-go calls. This is usually called inside the game's Update() function.
func Render ¶
func Render(target *ebiten.Image, drawData *imgui.DrawData, txcache TextureCache, dfilter ebiten.Filter)
Render the ImGui drawData into the target *ebiten.Image
func RenderMasked ¶
func RenderMasked(target *ebiten.Image, mask *ebiten.Image, drawData *imgui.DrawData, txcache TextureCache, dfilter ebiten.Filter)
RenderMasked renders the ImGui drawData into the target *ebiten.Image with ebiten.CompositeModeCopy for masking
func SetClipMask ¶
func SetClipMask(value bool)
SetClipMask sets if clipmask is enabled or not. This is usually called for debugging purposes.
func SetDisplaySize ¶
func SetDisplaySize(width, height float32)
SetDisplaySize sets the display size for imgui. This is usually called inside the game's Layout() function.
Types ¶
type GetCursorFn ¶
type GetCursorFn func() (x, y float32)
type Manager ¶
type Manager struct { Filter ebiten.Filter Cache TextureCache GetCursor GetCursorFn SyncInputsFn func() SyncCursor bool SyncInputs bool ControlCursorShape bool ClipMask bool // contains filtered or unexported fields }
func GlobalManager ¶
func GlobalManager() *Manager
GlobalManager returns the global manager instance.
func NewManager ¶
func NewManagerWithContext ¶
func (*Manager) BeginFrame ¶
func (m *Manager) BeginFrame()
func (*Manager) SetDisplaySize ¶
type TextureCache ¶
type TextureCache interface { FontAtlasTextureID() imgui.TextureID SetFontAtlasTextureID(id imgui.TextureID) GetTexture(id imgui.TextureID) *ebiten.Image SetTexture(id imgui.TextureID, img *ebiten.Image) RemoveTexture(id imgui.TextureID) ResetFontAtlasCache(filter ebiten.Filter) }
func NewCache ¶
func NewCache() TextureCache