Noah Petherbridge
38614ee280
* Tightens up the surface area of API methods available to the JavaScript VMs for doodads. Variables and functions are carefully passed in one-by-one so the doodad script can only access intended functions and not snoop on undocumented APIs. * Wrote tons of user documentation for Doodad Scripts: documented the full surface area of the exposed JavaScript API now that the surface area is known and limited. * Early WIP code for the Campaign JSON
87 lines
1.8 KiB
Go
87 lines
1.8 KiB
Go
package balance
|
|
|
|
import (
|
|
"git.kirsle.net/go/render"
|
|
"git.kirsle.net/go/ui"
|
|
)
|
|
|
|
// Theme and appearance variables.
|
|
var (
|
|
// Title Screen Font
|
|
TitleScreenFont = render.Text{
|
|
Size: 46,
|
|
Color: render.Pink,
|
|
Stroke: render.SkyBlue,
|
|
Shadow: render.Black,
|
|
}
|
|
|
|
// Window and panel styles.
|
|
TitleConfig = ui.Config{
|
|
Background: render.MustHexColor("#FF9900"),
|
|
OutlineSize: 1,
|
|
OutlineColor: render.Black,
|
|
}
|
|
TitleFont = render.Text{
|
|
FontFilename: "DejaVuSans-Bold.ttf",
|
|
Size: 12,
|
|
Padding: 4,
|
|
Color: render.White,
|
|
Stroke: render.Red,
|
|
}
|
|
WindowBackground = render.MustHexColor("#cdb689")
|
|
WindowBorder = render.Grey
|
|
|
|
// Menu bar styles.
|
|
MenuBackground = render.Black
|
|
MenuFont = render.Text{
|
|
Size: 12,
|
|
PadX: 4,
|
|
}
|
|
|
|
// StatusFont is the font for the status bar.
|
|
StatusFont = render.Text{
|
|
Size: 12,
|
|
Padding: 4,
|
|
Color: render.Black,
|
|
}
|
|
|
|
// UIFont is the main font for UI labels.
|
|
UIFont = render.Text{
|
|
Size: 12,
|
|
Padding: 4,
|
|
Color: render.Black,
|
|
}
|
|
|
|
// LabelFont is the font for strong labels in UI.
|
|
LabelFont = render.Text{
|
|
Size: 12,
|
|
FontFilename: "DejaVuSans-Bold.ttf",
|
|
Padding: 4,
|
|
Color: render.Black,
|
|
}
|
|
|
|
// SmallMonoFont for cramped spaces like the +/- buttons on Toolbar.
|
|
SmallMonoFont = render.Text{
|
|
Size: 14,
|
|
PadX: 3,
|
|
FontFilename: "DejaVuSansMono.ttf",
|
|
Color: render.Black,
|
|
}
|
|
|
|
// Color for draggable doodad.
|
|
DragColor = render.MustHexColor("#0099FF")
|
|
|
|
// Link lines drawn between connected doodads.
|
|
LinkLineColor = render.Magenta
|
|
LinkLighten = 128
|
|
LinkAnimSpeed uint64 = 30 // ticks
|
|
|
|
PlayButtonFont = render.Text{
|
|
FontFilename: "DejaVuSans-Bold.ttf",
|
|
Size: 16,
|
|
Padding: 4,
|
|
Color: render.RGBA(255, 255, 0, 255),
|
|
Stroke: render.RGBA(100, 100, 0, 255),
|
|
}
|
|
)
|