app

package
v0.0.0-...-a57605c Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: GPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PTPNG = "png"
	PTJPG = "jpg"
	PTGIF = "gif"

	RTMP4 = "mp4"
	RTAVI = "avi"
)

Variables

View Source
var (
	ImgCamera, _, _ = ebitenutil.NewImageFromFileSystem(res.Img, "camera.png")
	ImgRecord, _, _ = ebitenutil.NewImageFromFileSystem(res.Img, "record.png")
	ImgStop, _, _   = ebitenutil.NewImageFromFileSystem(res.Img, "stop.png")
	//ImgPause  = emoji.Image("⏸8️")
	ImgFolder, _, _ = ebitenutil.NewImageFromFileSystem(res.Img, "folder.png")
	ImgX, _, _      = ebitenutil.NewImageFromFileSystem(res.Img, "x.png")
	ImgInfo, _, _   = ebitenutil.NewImageFromFileSystem(res.Img, "info.png")
	ImgSite, _, _   = ebitenutil.NewImageFromFileSystem(res.Img, "website.png")
)

Functions

func Rectest

func Rectest() error

func ScreenNumber

func ScreenNumber() int

func ShotTest

func ShotTest()

Types

type Game

type Game struct {
	WW int
	WH int

	WX int
	WY int

	ConfigFile []byte

	PicType       string
	RecType       string
	FPath         string
	Defaultscreen int8
}

func NewGame

func NewGame() *Game

func (*Game) Draw

func (g *Game) Draw(screen *ebiten.Image)

func (*Game) Exit

func (g *Game) Exit()

func (*Game) Layout

func (g *Game) Layout(_, _ int) (screenWidth, screenHeight int)

func (*Game) PressButton

func (g *Game) PressButton(x, _ int)

func (*Game) Update

func (g *Game) Update() error

type ScreenShot

type ScreenShot struct {
	Path      string
	PicType   string
	ScreenNum int8
}

type Translation

type Translation struct {
	TranslationConfig
	// contains filtered or unexported fields
}

func NewTranslation

func NewTranslation(conf TranslationConfig) *Translation

NewTranslation New returns a new Translation.

func (*Translation) Detect

func (tr *Translation) Detect(text string) (float32, string, error)

Detect the language of the text Return: confidence, language, error

func (*Translation) T

func (tr *Translation) T(source, sourceLang, targetLang string) (string, error)

func (*Translation) Translate

func (tr *Translation) Translate(source, sourceLang, targetLang string) (string, error)

Translate text from a language to another

type TranslationConfig

type TranslationConfig struct {
	Url string
	Key string
	// Debug is an optional writer which will be used for debug output.
	Debug io.Writer
}

TranslationConfig is the configuration struct you should pass to New().

Jump to

Keyboard shortcuts

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