utils

package
v0.0.0-...-0518d83 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Failed = UpdateStatus(iota)
	Ignored
	UpToDate
	Snapshot
	UpdateAvailable
)

Variables

This section is empty.

Functions

func GetColorsSV

func GetColorsSV(baseHue, hueShift float64, times int, S, V, alpha float64) []color2.Color

func GetLatestVersionFromGitHub

func GetLatestVersionFromGitHub() (url string, tag string, err error)

GetLatestVersionFromGitHub makes a request to GitHub and returns url and tag of the latest version found

func Humanize

func Humanize[T constraints.Integer](number T) string

func LoadTexture

func LoadTexture(path string) (*texture.TextureSingle, error)

func LoadTextureToAtlas

func LoadTextureToAtlas(atlas *texture.TextureAtlas, path string) (*texture.TextureRegion, error)

func MakeScreenshot

func MakeScreenshot(w, h int, name string, async bool)

func QuickRestart

func QuickRestart()

func TransformVersion

func TransformVersion(version string) uint64

TransformVersion transfers version to a more comparable format.

  • 0.6.7 becomes 600079999
  • 0.6.7-s(napshot)12 becomes 600070012
  • 1.0.0 becomes 1000000009999

func Unzip

func Unzip(src string, dest string) ([]string, error)

Unzip will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2).

Types

type UpdateStatus

type UpdateStatus int

func CheckForUpdate

func CheckForUpdate() (UpdateStatus, string, error)

Jump to

Keyboard shortcuts

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