mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-19 02:46:35 -05:00
Removed improper ebiten dependency in d2interface.
This commit is contained in:
parent
ad1decc813
commit
92989d6d7a
@ -1,7 +1,5 @@
|
||||
package d2interface
|
||||
|
||||
import "github.com/hajimehoshi/ebiten/v2"
|
||||
|
||||
type renderCallback = func(Surface) error
|
||||
|
||||
type updateCallback = func() error
|
||||
@ -21,6 +19,6 @@ type Renderer interface {
|
||||
GetCursorPos() (int, int)
|
||||
CurrentFPS() float64
|
||||
ShowPanicScreen(message string)
|
||||
Print(target *ebiten.Image, str string) error
|
||||
PrintAt(target *ebiten.Image, str string, x, y int)
|
||||
Print(target interface{}, str string) error
|
||||
PrintAt(target interface{}, str string, x, y int)
|
||||
}
|
||||
|
@ -37,16 +37,16 @@ type GlyphPrinter struct {
|
||||
// Basic Latin and C1 Controls and Latin-1 Supplement.
|
||||
//
|
||||
// DebugPrint always returns nil as of 1.5.0-alpha.
|
||||
func (p *GlyphPrinter) Print(target *ebiten.Image, str string) error {
|
||||
p.PrintAt(target, str, 0, 0)
|
||||
func (p *GlyphPrinter) Print(target interface{}, str string) error {
|
||||
p.PrintAt(target.(*ebiten.Image), str, 0, 0)
|
||||
return nil
|
||||
}
|
||||
|
||||
// PrintAt draws the string str on the image at (x, y) position.
|
||||
// The available runes are in U+0000 to U+00FF, which is C0 Controls and
|
||||
// Basic Latin and C1 Controls and Latin-1 Supplement.
|
||||
func (p *GlyphPrinter) PrintAt(target *ebiten.Image, str string, x, y int) {
|
||||
p.drawDebugText(target, str, x, y, false)
|
||||
func (p *GlyphPrinter) PrintAt(target interface{}, str string, x, y int) {
|
||||
p.drawDebugText(target.(*ebiten.Image), str, x, y, false)
|
||||
}
|
||||
|
||||
func (p *GlyphPrinter) drawDebugText(target *ebiten.Image, str string, ox, oy int, shadow bool) {
|
||||
|
Loading…
Reference in New Issue
Block a user