Documentation ¶
Index ¶
- Constants
- func AdjustImage(image *sdl.Surface, w, h int32) (*sdl.Surface, error)
- func AdjustMega(mega int32) string
- func FlashImage(surface *sdl.Surface, level uint32)
- func GetSurfacePixel(surface *sdl.Surface, x, y int32) (red, green, blue, alpha uint8)
- func GlowImage(spriteassetpath string, color uint32) *sdl.Surface
- func LoadImageAsset(filename string) (*sdl.Surface, error)
- func ParseMega(str string) int32
Constants ¶
View Source
const ( VPS_COLOR = 0xff8888ff PHYSICAL_COLOR = 0xffff8888 // moving rack server from inventory DRAG_RACK_SERVER = 1 // moving rack server from a rack tower DRAG_RACK_SERVER_FROM_TOWER = 2 // moving TOWER, AC, GENERATOR, RACK_TOWER DRAG_ELEMENT_PAYLOAD = 3 )
Variables ¶
This section is empty.
Functions ¶
func AdjustImage ¶
AdjustImage will resize an image to fit into w x h surface image
func AdjustMega ¶
AdjustMega get a number in megabyte, reduce it in GB, TB and return the string result
func FlashImage ¶
FlashImage will flash/brighten a surface depending on the 'level' - level=8 -> completely white - level=0 -> the normal image
func GetSurfacePixel ¶
helper function, to know which pixel is in (x.y)
It is mainly used to know if we are on a transparent pixel
func LoadImageAsset ¶
LoadImageAsset load an SDL (PNG) image directly from assets
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.