Menu Toolbar for Editor + Shell Prompts + Theme
* Added a "menu toolbar" to the top of the Edit Mode with useful buttons
that work: New Level, New Doodad (same thing), Save, Save as, Open.
* Added ability for the dev console to prompt the user for a question,
which opens the console automatically. "Save", "Save as" and "Load"
ask for their filenames this way.
* Started groundwork for theming the app. The palette window is a light
brown with an orange title bar, the Menu Toolbar has a black
background, etc.
* Added support for multiple fonts instead of just monospace. DejaVu
Sans (normal and bold) are used now for most labels and window titles,
respectively. The dev console uses DejaVu Sans Mono as before.
* Update ui.Label to accept PadX and PadY separately instead of only
having the Padding option which did both.
* Improvements to Frame packing algorithm.
* Set the SDL draw mode to BLEND so we can use alpha colors properly,
so now the dev console is semi-translucent.
2018-08-12 00:30:00 +00:00
|
|
|
package balance
|
|
|
|
|
|
|
|
import (
|
2019-04-10 00:35:44 +00:00
|
|
|
"git.kirsle.net/apps/doodle/lib/render"
|
|
|
|
"git.kirsle.net/apps/doodle/lib/ui"
|
Menu Toolbar for Editor + Shell Prompts + Theme
* Added a "menu toolbar" to the top of the Edit Mode with useful buttons
that work: New Level, New Doodad (same thing), Save, Save as, Open.
* Added ability for the dev console to prompt the user for a question,
which opens the console automatically. "Save", "Save as" and "Load"
ask for their filenames this way.
* Started groundwork for theming the app. The palette window is a light
brown with an orange title bar, the Menu Toolbar has a black
background, etc.
* Added support for multiple fonts instead of just monospace. DejaVu
Sans (normal and bold) are used now for most labels and window titles,
respectively. The dev console uses DejaVu Sans Mono as before.
* Update ui.Label to accept PadX and PadY separately instead of only
having the Padding option which did both.
* Improvements to Frame packing algorithm.
* Set the SDL draw mode to BLEND so we can use alpha colors properly,
so now the dev console is semi-translucent.
2018-08-12 00:30:00 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Theme and appearance variables.
|
|
|
|
var (
|
|
|
|
// Window and panel styles.
|
|
|
|
TitleConfig = ui.Config{
|
|
|
|
Background: render.MustHexColor("#FF9900"),
|
|
|
|
OutlineSize: 1,
|
|
|
|
OutlineColor: render.Black,
|
|
|
|
}
|
|
|
|
TitleFont = render.Text{
|
2019-06-28 05:54:46 +00:00
|
|
|
FontFilename: "DejaVuSans-Bold.ttf",
|
Menu Toolbar for Editor + Shell Prompts + Theme
* Added a "menu toolbar" to the top of the Edit Mode with useful buttons
that work: New Level, New Doodad (same thing), Save, Save as, Open.
* Added ability for the dev console to prompt the user for a question,
which opens the console automatically. "Save", "Save as" and "Load"
ask for their filenames this way.
* Started groundwork for theming the app. The palette window is a light
brown with an orange title bar, the Menu Toolbar has a black
background, etc.
* Added support for multiple fonts instead of just monospace. DejaVu
Sans (normal and bold) are used now for most labels and window titles,
respectively. The dev console uses DejaVu Sans Mono as before.
* Update ui.Label to accept PadX and PadY separately instead of only
having the Padding option which did both.
* Improvements to Frame packing algorithm.
* Set the SDL draw mode to BLEND so we can use alpha colors properly,
so now the dev console is semi-translucent.
2018-08-12 00:30:00 +00:00
|
|
|
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,
|
|
|
|
}
|
2018-10-20 22:42:49 +00:00
|
|
|
|
2019-06-25 21:57:11 +00:00
|
|
|
// 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,
|
2019-06-28 05:54:46 +00:00
|
|
|
FontFilename: "DejaVuSans-Bold.ttf",
|
2019-06-25 21:57:11 +00:00
|
|
|
Padding: 4,
|
|
|
|
Color: render.Black,
|
|
|
|
}
|
|
|
|
|
2018-10-20 22:42:49 +00:00
|
|
|
// Color for draggable doodad.
|
|
|
|
DragColor = render.MustHexColor("#0099FF")
|
2019-06-26 01:36:53 +00:00
|
|
|
|
|
|
|
PlayButtonFont = render.Text{
|
2019-06-28 05:54:46 +00:00
|
|
|
FontFilename: "DejaVuSans-Bold.ttf",
|
2019-06-26 01:36:53 +00:00
|
|
|
Size: 16,
|
|
|
|
Padding: 4,
|
|
|
|
Color: render.RGBA(255, 255, 0, 255),
|
|
|
|
Stroke: render.RGBA(100, 100, 0, 255),
|
|
|
|
}
|
Menu Toolbar for Editor + Shell Prompts + Theme
* Added a "menu toolbar" to the top of the Edit Mode with useful buttons
that work: New Level, New Doodad (same thing), Save, Save as, Open.
* Added ability for the dev console to prompt the user for a question,
which opens the console automatically. "Save", "Save as" and "Load"
ask for their filenames this way.
* Started groundwork for theming the app. The palette window is a light
brown with an orange title bar, the Menu Toolbar has a black
background, etc.
* Added support for multiple fonts instead of just monospace. DejaVu
Sans (normal and bold) are used now for most labels and window titles,
respectively. The dev console uses DejaVu Sans Mono as before.
* Update ui.Label to accept PadX and PadY separately instead of only
having the Padding option which did both.
* Improvements to Frame packing algorithm.
* Set the SDL draw mode to BLEND so we can use alpha colors properly,
so now the dev console is semi-translucent.
2018-08-12 00:30:00 +00:00
|
|
|
)
|