ui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MercAvatarPositionX = 36
	MercAvatarPositionY = 39

	CubeTransmuteBtnX = 273
	CubeTransmuteBtnY = 411

	AnvilCenterX = 272
	AnvilCenterY = 333
	AnvilBtnX    = 272
	AnvilBtnY    = 450

	QuestFirstTabX    = 138
	QuestFirstTabY    = 130
	QuestTabXInterval = 68

	MainSkillButtonX = 596
	MainSkillButtonY = 693

	SecondarySkillButtonX = 686
	SecondarySkillButtonY = 693

	GambleRefreshButtonX = 390
	GambleRefreshButtonY = 515
)

Variables

This section is empty.

Functions

func GetScreenCoordsForItem

func GetScreenCoordsForItem(itm data.Item) data.Position

Types

type Template

type Template struct {
	RGB       gocv.Mat
	GrayScale gocv.Mat
	Mask      gocv.Mat
}

type TemplateFinder

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

func NewTemplateFinder

func NewTemplateFinder(logger *zap.Logger, templatesPath string) (*TemplateFinder, error)

func (*TemplateFinder) Find

func (tf *TemplateFinder) Find(tplName string, img image.Image) TemplateMatch

func (*TemplateFinder) FindInArea

func (tf *TemplateFinder) FindInArea(tplName string, img image.Image, x0, y0, x1, y1 int) TemplateMatch

func (*TemplateFinder) MatchColorInArea

func (tf *TemplateFinder) MatchColorInArea(img image.Image, lowerColor, upperColor gocv.Scalar, x0, y0, x1, y1 int) TemplateMatch

type TemplateMatch

type TemplateMatch struct {
	Score     float32
	PositionX int
	PositionY int
	Found     bool
}

Jump to

Keyboard shortcuts

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