Documentation
¶
Overview ¶
Package ray is the managers.Device implementation using raylib
Index ¶
- type DeviceManagerImpl
- func (dmi DeviceManagerImpl) BeginFrame()
- func (dmi DeviceManagerImpl) DrawGradientBox(pos geometry.Point, box shapes.Box, gradient color.Gradient)
- func (dmi DeviceManagerImpl) DrawSolidBox(pos geometry.Point, box shapes.Box, solid color.Solid)
- func (dmi DeviceManagerImpl) DrawSprite(def components.SpriteDef, sprite sprite.Sprite, pos geometry.Point, ...) error
- func (dmi DeviceManagerImpl) DrawText(ftd components.FontDef, txt ui.Text, pos geometry.Point, color color.Solid)
- func (dmi DeviceManagerImpl) End()
- func (dmi DeviceManagerImpl) EndFrame()
- func (dmi DeviceManagerImpl) GetFrameTime() float32
- func (dmi DeviceManagerImpl) GetKeyStatus(key device.Key) device.KeyStatus
- func (dmi DeviceManagerImpl) GetMousePoint() geometry.Point
- func (dmi DeviceManagerImpl) GetScreenSize() geometry.Size
- func (dmi *DeviceManagerImpl) Init(opt options.Options)
- func (dmi DeviceManagerImpl) IsMouseRelease(button device.MouseButton) bool
- func (dmi DeviceManagerImpl) LoadFont(fileName string) (components.FontDef, error)
- func (dmi DeviceManagerImpl) LoadMusic(fileName string) (components.MusicDef, error)
- func (dmi *DeviceManagerImpl) LoadSound(fileName string) (components.SoundDef, error)
- func (dmi DeviceManagerImpl) LoadTexture(fileName string) (components.TextureDef, error)
- func (dmi *DeviceManagerImpl) MeasureText(fnt components.FontDef, str string, size float32) geometry.Size
- func (dmi DeviceManagerImpl) PauseMusic(musicDef components.MusicDef)
- func (dmi DeviceManagerImpl) PlayMusic(musicDef components.MusicDef)
- func (dmi *DeviceManagerImpl) PlaySound(soundDef components.SoundDef)
- func (dmi DeviceManagerImpl) ResumeMusic(musicDef components.MusicDef)
- func (dmi *DeviceManagerImpl) SetBackgroundColor(color color.Solid)
- func (dmi DeviceManagerImpl) ShouldClose() bool
- func (dmi *DeviceManagerImpl) StopAllSounds()
- func (dmi DeviceManagerImpl) StopMusic(musicDef components.MusicDef)
- func (dmi DeviceManagerImpl) UnloadFont(textureDef components.FontDef)
- func (dmi DeviceManagerImpl) UnloadMusic(musicDef components.MusicDef)
- func (dmi *DeviceManagerImpl) UnloadSound(soundDef components.SoundDef)
- func (dmi DeviceManagerImpl) UnloadTexture(textureDef components.TextureDef)
- func (dmi DeviceManagerImpl) UpdateMusic(musicDef components.MusicDef)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceManagerImpl ¶
type DeviceManagerImpl struct {
// contains filtered or unexported fields
}
DeviceManagerImpl is our managers.DeviceManager based on raylib
func (DeviceManagerImpl) BeginFrame ¶
func (dmi DeviceManagerImpl) BeginFrame()
BeginFrame for rendering
func (DeviceManagerImpl) DrawGradientBox ¶
func (dmi DeviceManagerImpl) DrawGradientBox(pos geometry.Point, box shapes.Box, gradient color.Gradient)
DrawGradientBox draws a solid box with an color.Solid and a scale
func (DeviceManagerImpl) DrawSolidBox ¶
DrawSolidBox draws a solid box with an color.Solid and a scale
func (DeviceManagerImpl) DrawSprite ¶
func (dmi DeviceManagerImpl) DrawSprite(def components.SpriteDef, sprite sprite.Sprite, pos geometry.Point, tint color.Solid) error
DrawSprite draws a sprite.Sprite in the given geometry.Point with the tint color.Color
func (DeviceManagerImpl) DrawText ¶
func (dmi DeviceManagerImpl) DrawText(ftd components.FontDef, txt ui.Text, pos geometry.Point, color color.Solid)
DrawText will draw a text.Text in the given geometry.Point with the correspondent color.Color
func (DeviceManagerImpl) GetFrameTime ¶
func (dmi DeviceManagerImpl) GetFrameTime() float32
GetFrameTime returns the time from the delta time for current frame
func (DeviceManagerImpl) GetKeyStatus ¶
func (dmi DeviceManagerImpl) GetKeyStatus(key device.Key) device.KeyStatus
GetKeyStatus returns the device.KeyStatus for a given device.Key
func (DeviceManagerImpl) GetMousePoint ¶
func (dmi DeviceManagerImpl) GetMousePoint() geometry.Point
GetMousePoint returns the current Point of the mouse
func (DeviceManagerImpl) GetScreenSize ¶
func (dmi DeviceManagerImpl) GetScreenSize() geometry.Size
GetScreenSize get the current screen size
func (*DeviceManagerImpl) Init ¶
func (dmi *DeviceManagerImpl) Init(opt options.Options)
Init the rendering device
func (DeviceManagerImpl) IsMouseRelease ¶
func (dmi DeviceManagerImpl) IsMouseRelease(button device.MouseButton) bool
IsMouseRelease check if the given MouseButton has been release
func (DeviceManagerImpl) LoadFont ¶
func (dmi DeviceManagerImpl) LoadFont(fileName string) (components.FontDef, error)
LoadFont giving it file name into VRAM
func (DeviceManagerImpl) LoadMusic ¶
func (dmi DeviceManagerImpl) LoadMusic(fileName string) (components.MusicDef, error)
LoadMusic giving it file name into memory
func (*DeviceManagerImpl) LoadSound ¶
func (dmi *DeviceManagerImpl) LoadSound(fileName string) (components.SoundDef, error)
LoadSound giving it file name into memory
func (DeviceManagerImpl) LoadTexture ¶
func (dmi DeviceManagerImpl) LoadTexture(fileName string) (components.TextureDef, error)
LoadTexture giving it file name into VRAM
func (*DeviceManagerImpl) MeasureText ¶
func (dmi *DeviceManagerImpl) MeasureText(fnt components.FontDef, str string, size float32) geometry.Size
MeasureText return the geometry.Size of a string with a defined size and spacing
func (DeviceManagerImpl) PauseMusic ¶
func (dmi DeviceManagerImpl) PauseMusic(musicDef components.MusicDef)
PauseMusic pauses the given components.MusicDef
func (DeviceManagerImpl) PlayMusic ¶
func (dmi DeviceManagerImpl) PlayMusic(musicDef components.MusicDef)
PlayMusic plays the given components.MusicDef
func (*DeviceManagerImpl) PlaySound ¶
func (dmi *DeviceManagerImpl) PlaySound(soundDef components.SoundDef)
PlaySound plays the given components.SoundDef
func (DeviceManagerImpl) ResumeMusic ¶
func (dmi DeviceManagerImpl) ResumeMusic(musicDef components.MusicDef)
ResumeMusic resumes the given components.MusicDef
func (*DeviceManagerImpl) SetBackgroundColor ¶
func (dmi *DeviceManagerImpl) SetBackgroundColor(color color.Solid)
SetBackgroundColor changes the current background color.Solid
func (DeviceManagerImpl) ShouldClose ¶
func (dmi DeviceManagerImpl) ShouldClose() bool
ShouldClose returns if th engine should close
func (*DeviceManagerImpl) StopAllSounds ¶
func (dmi *DeviceManagerImpl) StopAllSounds()
StopAllSounds currently playing
func (DeviceManagerImpl) StopMusic ¶
func (dmi DeviceManagerImpl) StopMusic(musicDef components.MusicDef)
StopMusic stop the given components.MusicDef
func (DeviceManagerImpl) UnloadFont ¶
func (dmi DeviceManagerImpl) UnloadFont(textureDef components.FontDef)
UnloadFont from VRAM
func (DeviceManagerImpl) UnloadMusic ¶
func (dmi DeviceManagerImpl) UnloadMusic(musicDef components.MusicDef)
UnloadMusic giving it file from memory
func (*DeviceManagerImpl) UnloadSound ¶
func (dmi *DeviceManagerImpl) UnloadSound(soundDef components.SoundDef)
UnloadSound giving it file from memory
func (DeviceManagerImpl) UnloadTexture ¶
func (dmi DeviceManagerImpl) UnloadTexture(textureDef components.TextureDef)
UnloadTexture from VRAM
func (DeviceManagerImpl) UpdateMusic ¶
func (dmi DeviceManagerImpl) UpdateMusic(musicDef components.MusicDef)
UpdateMusic update the stream of the given components.MusicDef