diff --git a/Changes.md b/Changes.md index cfc1bdd..40a9b66 100644 --- a/Changes.md +++ b/Changes.md @@ -5,8 +5,8 @@ This is the first release of the game where the "free version" drifts meaningfully away from the "full version". Free versions of the game will show the label "(shareware)" next to the game version numbers and will not support embedding -doodads inside of level files -- for creating them or playing them. Check the -website for how you can register the full version of the game. +doodads inside of level files -- for creating them or playing them. +Check the website for how you can register the full version of the game. This release brings several improvements to the game: @@ -22,26 +22,34 @@ This release brings several improvements to the game: file, it will "just play" on someone else's computer, and they don't need to copy all your custom doodads for it to work! But, free versions of the game will not get to enjoy this feature. +* **Settings UI**: a "Settings" button on the home screen (or the Edit->Settings + menu in the editor) will open a settings window. Check it out! +* **Horizontal Toolbars option:** if enabled in the Settings window, the toolbar + and palette in the Editor will be horizontal instead of vertical, along the top + and bottom of the screen. This may be better optimized for smartphone-sized + screens like the Pinephone. If the program is started with `-w mobile` the first + time, it will use horizontal toolbars by default. Some small bits of polish in the game's user interface: * Some buttons are more colorful! The "Ok" button in alert boxes is blue and pressing - Enter will select the "Ok" button. -* When opening a Level or Doodad to play or edit, a blue **Browse...** button is + Enter will select the blue button. +* When opening a drawing to play or edit, a blue **Browse...** button is added so you can more easily find downloaded custom levels and play them. * In the Level Editor, the "Level -> **Attached Files**" menu will let you see and manage files attached to your level, such as its custom wallpaper image or any custom doodads that were published with the level. * The keyboard shortcut to open the developer console is now the tilde/grave key - instead of Enter. + (`) instead of Enter. -This release also makes the game a little bit more functional on smartphone-sized -devices like the Pine64 Pinephone: +Bugs fixed: -* **Horizontal Toolbars** option for the Level Editor. If the game is started with - the `-w mobile` command line option, the game window takes on a mobile form factor - and the Horizontal Toolbars are enabled by default. -* Alternatively, press the tilde/grave key and type: `boolProp horizontalToolbars true` +* The WASD keys to move the player character (as an alternative to the arrow keys) + now works more reliably. Previously, they were affected by key-repeat so Boy would + do a quick hop followed by a longer one when pressing W to jump. Also, his + animation would not update correctly when moving via the WASD keys. Both bugs + are fixed in this release. +* Shortcut keys advertised in the menu, such as Ctrl-N and Ctrl-S, now actually work. ## v0.6.0-alpha (June 6 2021) diff --git a/assets/pattern/ink.png b/assets/pattern/ink.png index 0a2abfe..9c40c52 100644 Binary files a/assets/pattern/ink.png and b/assets/pattern/ink.png differ diff --git a/assets/pattern/marker.png b/assets/pattern/marker.png index 5504a78..ad8069e 100644 Binary files a/assets/pattern/marker.png and b/assets/pattern/marker.png differ diff --git a/assets/pattern/noise.png b/assets/pattern/noise.png index e8b5ec6..cf36172 100644 Binary files a/assets/pattern/noise.png and b/assets/pattern/noise.png differ diff --git a/pkg/editor_scene.go b/pkg/editor_scene.go index 72eef8e..6d663f3 100644 --- a/pkg/editor_scene.go +++ b/pkg/editor_scene.go @@ -215,8 +215,10 @@ func (s *EditorScene) Loop(d *Doodle, ev *event.State) error { // Undo/Redo key bindings. if keybind.Undo(ev) { s.UI.Canvas.UndoStroke() + ev.ResetKeyDown() } else if keybind.Redo(ev) { s.UI.Canvas.RedoStroke() + ev.ResetKeyDown() } // Zoom in/out. @@ -224,12 +226,15 @@ func (s *EditorScene) Loop(d *Doodle, ev *event.State) error { if keybind.ZoomIn(ev) { d.Flash("Zoom in") s.UI.Canvas.Zoom++ + ev.ResetKeyDown() } else if keybind.ZoomOut(ev) { d.Flash("Zoom out") s.UI.Canvas.Zoom-- + ev.ResetKeyDown() } else if keybind.ZoomReset(ev) { d.Flash("Reset zoom") s.UI.Canvas.Zoom = 0 + ev.ResetKeyDown() } } @@ -237,6 +242,7 @@ func (s *EditorScene) Loop(d *Doodle, ev *event.State) error { if keybind.Origin(ev) { d.Flash("Scrolled back to level origin (0,0)") s.UI.Canvas.ScrollTo(render.Origin) + ev.ResetKeyDown() } // s.UI.Loop(ev) diff --git a/pkg/level/palette_defaults.go b/pkg/level/palette_defaults.go index 926a7c0..b8b3c42 100644 --- a/pkg/level/palette_defaults.go +++ b/pkg/level/palette_defaults.go @@ -13,87 +13,101 @@ var ( } DefaultPalettes = map[string]*Palette{ - "Default": &Palette{ + "Default": { Swatches: []*Swatch{ - &Swatch{ - Name: "solid", - Color: render.Black, - Solid: true, + { + Name: "solid", + Color: render.MustHexColor("#777"), + Solid: true, + Pattern: "noise.png", }, - &Swatch{ - Name: "decoration", - Color: render.Grey, + { + Name: "decoration", + Color: render.MustHexColor("#CCC"), + Pattern: "noise.png", }, - &Swatch{ - Name: "fire", - Color: render.Red, - Fire: true, + { + Name: "fire", + Color: render.Red, + Fire: true, + Pattern: "marker.png", }, - &Swatch{ - Name: "water", - Color: render.RGBA(0, 0, 255, 180), - Water: true, + { + Name: "water", + Color: render.MustHexColor("#09F"), + Water: true, + Pattern: "ink.png", }, }, }, - "Colored Pencil": &Palette{ + "Colored Pencil": { Swatches: []*Swatch{ - &Swatch{ - Name: "grass", - Color: render.DarkGreen, - Solid: true, + { + Name: "grass", + Color: render.DarkGreen, + Solid: true, + Pattern: "noise.png", }, - &Swatch{ - Name: "dirt", - Color: render.RGBA(100, 64, 0, 255), - Solid: true, + { + Name: "dirt", + Color: render.MustHexColor("#960"), + Solid: true, + Pattern: "noise.png", }, - &Swatch{ - Name: "stone", - Color: render.DarkGrey, - Solid: true, + { + Name: "stone", + Color: render.Grey, + Solid: true, + Pattern: "noise.png", }, - &Swatch{ - Name: "fire", - Color: render.Red, - Fire: true, + { + Name: "fire", + Color: render.Red, + Fire: true, + Pattern: "marker.png", }, - &Swatch{ - Name: "water", - Color: render.RGBA(0, 153, 255, 255), - Water: true, + { + Name: "water", + Color: render.RGBA(0, 153, 255, 255), + Water: true, + Pattern: "ink.png", }, }, }, - "Blueprint": &Palette{ + "Blueprint": { Swatches: []*Swatch{ - &Swatch{ - Name: "solid", - Color: render.RGBA(254, 254, 254, 255), - Solid: true, + { + Name: "solid", + Color: render.RGBA(254, 254, 254, 255), + Solid: true, + Pattern: "noise.png", }, - &Swatch{ - Name: "decoration", - Color: render.Grey, + { + Name: "decoration", + Color: render.Grey, + Pattern: "noise.png", }, - &Swatch{ - Name: "fire", - Color: render.RGBA(255, 80, 0, 255), - Fire: true, + { + Name: "fire", + Color: render.RGBA(255, 80, 0, 255), + Fire: true, + Pattern: "marker.png", }, - &Swatch{ - Name: "water", - Color: render.RGBA(0, 153, 255, 255), - Water: true, + { + Name: "water", + Color: render.RGBA(0, 153, 255, 255), + Water: true, + Pattern: "ink.png", }, - &Swatch{ - Name: "electric", - Color: render.RGBA(255, 255, 0, 255), - Solid: true, + { + Name: "electric", + Color: render.RGBA(255, 255, 0, 255), + Solid: true, + Pattern: "marker.png", }, }, }, } -) \ No newline at end of file +) diff --git a/pkg/windows/settings.go b/pkg/windows/settings.go index 7e24fbd..3a657de 100644 --- a/pkg/windows/settings.go +++ b/pkg/windows/settings.go @@ -144,8 +144,6 @@ func saveGameSettings() { func (c Settings) makeOptionsTab(Width, Height int) *ui.Frame { tab := ui.NewFrame("Options Tab") - log.Error("c.Super: %+v", c.Supervisor) - // Common click handler for all settings, // so we can write the updated info to disk. onClick := func(ed ui.EventData) error { @@ -176,7 +174,7 @@ func (c Settings) makeOptionsTab(Width, Height int) *ui.Frame { name: "toolbars", }, { - Header: "Debug Options", + Header: "Debug Options (temporary)", }, { Boolean: c.DebugOverlay,