2026-02-19 14:30:37 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
_ "embed"
|
|
|
|
|
"github.com/diamondburned/gotk4/pkg/gdk/v4"
|
2026-03-10 16:48:10 +00:00
|
|
|
"github.com/diamondburned/gotk4/pkg/gdkpixbuf/v2"
|
2026-02-19 14:30:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
//go:embed debug.png
|
|
|
|
|
var defaultAvatarBytes []byte
|
|
|
|
|
|
2026-03-12 16:09:22 +00:00
|
|
|
//go:embed failed_load.png
|
|
|
|
|
var failedBytes []byte
|
|
|
|
|
|
2026-02-19 14:30:37 +00:00
|
|
|
//go:embed assets/owner.png
|
|
|
|
|
var ownerMedalBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/admin.png
|
|
|
|
|
var adminMedalBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/member.png
|
|
|
|
|
var memberMedalBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/noaffiliation.png
|
|
|
|
|
var noneMedalBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/outcast.png
|
|
|
|
|
var outcastMedalBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/cancel.png
|
|
|
|
|
var cancelBytes []byte
|
|
|
|
|
|
2026-03-15 09:55:26 +00:00
|
|
|
//go:embed assets/status_away.png
|
|
|
|
|
var sABytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/status_busy.png
|
|
|
|
|
var sBBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/status_chatty.png
|
|
|
|
|
var sCBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/status_online.png
|
|
|
|
|
var sOBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/status_xa.png
|
|
|
|
|
var xaBytes []byte
|
|
|
|
|
|
2026-02-19 14:30:37 +00:00
|
|
|
//go:embed assets/tag.png
|
|
|
|
|
var tagBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/lambda-disabled.png
|
|
|
|
|
var logoDisabledBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/group.png
|
|
|
|
|
var groupBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/door_in.png
|
|
|
|
|
var doorInBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/door_out.png
|
|
|
|
|
var doorOutBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/large_group.png
|
|
|
|
|
var largeGroupBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/world.png
|
|
|
|
|
var worldBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/disconnect.png
|
|
|
|
|
var disconnectBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/chart_bar.png
|
|
|
|
|
var barBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/ok.png
|
|
|
|
|
var okBytes []byte
|
|
|
|
|
|
|
|
|
|
//go:embed assets/hourglass.png
|
|
|
|
|
var hourglassBytes []byte
|
|
|
|
|
|
2026-02-28 16:24:37 +00:00
|
|
|
//go:embed assets/connect_tls.png
|
2026-02-19 14:30:37 +00:00
|
|
|
var connectBytes []byte
|
|
|
|
|
|
2026-02-22 08:16:14 +00:00
|
|
|
//go:embed assets/comment.png
|
|
|
|
|
var commentBytes []byte
|
|
|
|
|
|
2026-03-10 16:35:56 +00:00
|
|
|
//go:embed assets/information.png
|
|
|
|
|
var informationBytes []byte
|
|
|
|
|
|
2026-04-18 10:29:07 +01:00
|
|
|
//go:embed assets/car.png
|
|
|
|
|
var carBytes []byte
|
|
|
|
|
|
2026-02-19 14:30:37 +00:00
|
|
|
func init() {
|
|
|
|
|
|
|
|
|
|
loader := gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(defaultAvatarBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
clientAssets["DefaultAvatar"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
2026-03-12 16:09:22 +00:00
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(failedBytes)
|
2026-03-12 16:09:22 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["FailedAvatar"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
2026-02-19 14:30:37 +00:00
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(ownerMedalBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["owner"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(cancelBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["cancel"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(tagBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["tag"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(adminMedalBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["admin"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(memberMedalBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["member"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(noneMedalBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["none"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(outcastMedalBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["outcast"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(logoDisabledBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["disabled_logo"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(groupBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["group"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(doorInBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["door_in"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(doorOutBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["door_out"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(largeGroupBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["large_group"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(worldBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["world"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(disconnectBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["disconnect"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(barBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["chart_bar"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(okBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["ok"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(hourglassBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["hourglass"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(connectBytes)
|
2026-02-19 14:30:37 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["connect"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
2026-02-22 08:16:14 +00:00
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(commentBytes)
|
2026-02-22 08:16:14 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["comment"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
2026-03-10 16:35:56 +00:00
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(informationBytes)
|
2026-03-10 16:35:56 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["information"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
2026-03-15 09:55:26 +00:00
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(sABytes)
|
2026-03-15 09:55:26 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["status_away"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(sBBytes)
|
2026-03-15 09:55:26 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["status_dnd"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(sCBytes)
|
2026-03-15 09:55:26 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["status_chat"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(xaBytes)
|
2026-03-15 09:55:26 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["status_xa"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
|
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(sOBytes)
|
2026-03-15 09:55:26 +00:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["status_"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
2026-04-18 10:29:07 +01:00
|
|
|
|
|
|
|
|
loader = gdkpixbuf.NewPixbufLoader()
|
|
|
|
|
|
2026-04-18 11:09:59 +01:00
|
|
|
loader.Write(carBytes)
|
2026-04-18 10:29:07 +01:00
|
|
|
loader.Close()
|
|
|
|
|
|
|
|
|
|
clientAssets["car"] = gdk.NewTextureForPixbuf(loader.Pixbuf())
|
2026-02-19 14:30:37 +00:00
|
|
|
}
|