rating

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

ebiten-rating

This package show the rating value with your specified image.

sample image

Usage

// Initialize with your image
g.rating = rating.NewRating(StarImage, 15, 20, 10)

// Set the current rating value
g.rating.SetValue(5.7)

// Draw
func (g *Game) Draw(screen *ebiten.Image) {
	g.rating.Draw(screen)
}

License

Apache-2.0 License

Auther

kemokemo

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rating

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

func NewRating

func NewRating(img image.Image, x, y int, max int) *Rating

func (*Rating) Draw

func (r *Rating) Draw(screen *ebiten.Image)

func (*Rating) SetValue

func (r *Rating) SetValue(val float64)

Directories

Path Synopsis
cmd module

Jump to

Keyboard shortcuts

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