diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7447f89 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bin \ No newline at end of file diff --git a/OmnissiahBlessing.exe b/OmnissiahBlessing.exe deleted file mode 100644 index bf21365..0000000 Binary files a/OmnissiahBlessing.exe and /dev/null differ diff --git a/datafont.ttf b/datafont.ttf new file mode 100644 index 0000000..e4161b5 Binary files /dev/null and b/datafont.ttf differ diff --git a/main.go b/main.go index 1133114..37e275f 100644 --- a/main.go +++ b/main.go @@ -15,16 +15,23 @@ import ( "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/canvas" "fyne.io/fyne/v2/container" - "fyne.io/fyne/v2/theme" "fyne.io/fyne/v2/widget" ) +// Embed resources +// //go:embed blessing.txt var blessingBytes []byte //go:embed chant.mp3 var chantBytes []byte +//go:embed icon.ico +var iconBytes []byte + +//go:embed datafont.ttf +var dataFont []byte + func playChant() { streamer, format, err := mp3.Decode(io.NopCloser(bytes.NewReader(chantBytes))) if err != nil { @@ -41,41 +48,46 @@ func main() { go playChant() a := app.NewWithID("com.omnissiah.blessing") - a.Settings().SetTheme(theme.DarkTheme()) - w := a.NewWindow("🔧 Rite of Activation") - // Lock resolution - const windowWidth = 400 - const windowHeight = 800 + // Apply custom font theme + fontRes := fyne.NewStaticResource("datafont.ttf", dataFont) + a.Settings().SetTheme(&customTheme{font: fontRes}) + + w := a.NewWindow("COGITATOR-LINK::RITE-SEQUENCE-ENGAGE") + iconRes := fyne.NewStaticResource("icon.ico", iconBytes) + w.SetIcon(iconRes) + + const windowWidth = 480 + const windowHeight = 780 w.Resize(fyne.NewSize(windowWidth, windowHeight)) w.SetFixedSize(true) - // Background - bg := canvas.NewRectangle(color.RGBA{R: 10, G: 10, B: 10, A: 255}) - bg.Resize(fyne.NewSize(windowWidth, windowHeight)) + // Background black + bg := canvas.NewRectangle(color.RGBA{R: 5, G: 5, B: 5, A: 255}) - // Header and footer - header := canvas.NewText("+++ ACTIVATE RITE +++", color.RGBA{R: 200, G: 40, B: 40, A: 255}) - header.TextSize = 20 + // Header + header := canvas.NewText("+++ INITIATE COGITATOR RITE +++", color.RGBA{R: 100, G: 255, B: 100, A: 255}) + header.TextSize = 18 header.Alignment = fyne.TextAlignCenter - header.TextStyle = fyne.TextStyle{Bold: true} - footer := canvas.NewText("<< OMNISSIAH WATCHES >>", color.RGBA{R: 255, G: 200, B: 200, A: 255}) - footer.TextSize = 16 - footer.Alignment = fyne.TextAlignCenter - footer.TextStyle = fyne.TextStyle{Italic: true} + header.TextStyle = fyne.TextStyle{Monospace: true, Bold: true} - // Center blessing - label := widget.NewLabel(blessing) - label.Alignment = fyne.TextAlignCenter + // Footer + footer := canvas.NewText("<< SYSTEM: BLESSED BY THE OMNISSIAH >>", color.RGBA{R: 255, G: 100, B: 100, A: 255}) + footer.TextSize = 14 + footer.Alignment = fyne.TextAlignCenter + footer.TextStyle = fyne.TextStyle{Italic: true, Monospace: true} + + // Terminal-style blessing + label := widget.NewLabelWithStyle(blessing, fyne.TextAlignCenter, fyne.TextStyle{Monospace: true}) label.Wrapping = fyne.TextWrapWord + // Scroll container scroll := container.NewScroll(label) - scroll.SetMinSize(fyne.NewSize(420, 760)) + scroll.SetMinSize(fyne.NewSize(windowWidth-20, windowHeight-140)) - // Use Border layout to keep footer anchored - mainContent := container.NewBorder(header, footer, nil, nil, scroll) + // Build layout + content := container.NewBorder(header, footer, nil, nil, scroll) + w.SetContent(container.NewMax(bg, content)) - // Final layout with background - w.SetContent(container.NewMax(bg, mainContent)) w.ShowAndRun() } diff --git a/makefile b/makefile new file mode 100644 index 0000000..cb3c640 --- /dev/null +++ b/makefile @@ -0,0 +1,10 @@ +default: build compress + +build: + @echo "Building the project..." + -mkdir -p ./bin + go build -ldflags="-H windowsgui -s -w" -o ./bin/OmnissiahBlessing.exe + +compress: + @echo "Compressing the executable..." + upx --best --lzma ./bin/OmnissiahBlessing.exe \ No newline at end of file diff --git a/theme.go b/theme.go new file mode 100644 index 0000000..dbc5ab3 --- /dev/null +++ b/theme.go @@ -0,0 +1,35 @@ +package main + +import ( + "image/color" + + "fyne.io/fyne/v2" + "fyne.io/fyne/v2/theme" +) + +type customTheme struct { + font fyne.Resource +} + +func (c *customTheme) Font(style fyne.TextStyle) fyne.Resource { + return c.font +} + +func (c *customTheme) Color(name fyne.ThemeColorName, variant fyne.ThemeVariant) color.Color { + return theme.DefaultTheme().Color(name, variant) +} + +func (c *customTheme) Size(name fyne.ThemeSizeName) float32 { + switch name { + case theme.SizeNameText: + return 22 // Default is 14; bump it up + case theme.SizeNameHeadingText: + return 24 + default: + return theme.DefaultTheme().Size(name) + } +} + +func (c *customTheme) Icon(name fyne.ThemeIconName) fyne.Resource { + return theme.DefaultTheme().Icon(name) +}