Skip to content

Commit

Permalink
Merge pull request #12 from jaames/v1.1
Browse files Browse the repository at this point in the history
V1.1
  • Loading branch information
jaames committed Apr 25, 2022
2 parents 38c959f + 5ed819c commit cfb45f5
Show file tree
Hide file tree
Showing 59 changed files with 792 additions and 311 deletions.
17 changes: 15 additions & 2 deletions Source/components/Button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function Button:init(x, y, w, h, text)

self.variant = 'default'
self.state = 'base'
self.stateTimer = nil

self.padLeft = 16
self.padRight = 16
Expand Down Expand Up @@ -54,19 +55,31 @@ function Button:init(x, y, w, h, text)
end

function Button:focus()
if self.stateTimer then
self.stateTimer:remove()
self.stateTimer = nil
end
self.state = 'select'
Button.super.focus(self)
end

function Button:unfocus()
if self.stateTimer then
self.stateTimer:remove()
self.stateTimer = nil
end
self.state = 'base'
Button.super.unfocus(self)
end

function Button:click()
local lastState = self.state
if self.stateTimer then
self.stateTimer:remove()
self.stateTimer = nil
end
local lastState = self.state ~= 'click' and self.state or 'base'
self.state = 'click'
playdate.timer.performAfterDelay(300, function ()
self.stateTimer = playdate.timer.performAfterDelay(300, function ()
self.state = lastState
end)
Button.super.click(self)
Expand Down
18 changes: 18 additions & 0 deletions Source/components/PageArrow.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
local img <const> = gfx.image.new('./gfx/icon_page_next')

PageArrow = {}
class('PageArrow').extends(ComponentBase)

PageArrow.kTypeNext = 1
PageArrow.kTypePrev = 2

function PageArrow:init(x, y, type)
local w, h = img:getSize()
PageArrow.super.init(self, x, y, w, h)
self:setAnchor('center', 'center')
self:setZIndex(200)
self:setImage(img)
if type == PageArrow.kTypePrev then
self:setImageFlip(gfx.kImageFlippedX)
end
end
2 changes: 1 addition & 1 deletion Source/data/cy_strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"SETTINGS_RESET_CONFIRM": "Bydd gosodiadau’n cael eu dileu",
"SETTINGS_RESET_DONE": "Mae gosodiadau wedi’u dileu",

"ABOUT_VERSION": "Fersiwn %d",
"ABOUT_VERSION": "Fersiwn %s",
"ABOUT_BUILT_BY": "Gwnaed gan %s",

"CREDITS_HEADER_JAMES": "Dylunio rhyngwyneb a rhaglennu",
Expand Down
2 changes: 1 addition & 1 deletion Source/data/de_strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"SETTINGS_RESET_CONFIRM": "Alle Einstellungen werden gelöscht",
"SETTINGS_RESET_DONE": "Einstellungen wurden gelöscht",

"ABOUT_VERSION": "Version %d",
"ABOUT_VERSION": "Version %s",
"ABOUT_BUILT_BY": "Kreiert von %s",

"CREDITS_HEADER_JAMES": "Programmierung und UI Design",
Expand Down
2 changes: 1 addition & 1 deletion Source/data/en_strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"SETTINGS_RESET_CONFIRM": "All settings will be cleared",
"SETTINGS_RESET_DONE": "Settings cleared",

"ABOUT_VERSION": "Version %d",
"ABOUT_VERSION": "Version %s",
"ABOUT_BUILT_BY": "Built by %s",

"CREDITS_HEADER_JAMES": "Programming and UI Design",
Expand Down
2 changes: 1 addition & 1 deletion Source/data/es_strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"SETTINGS_RESET_CONFIRM": "Cada ajuste se va a restablecer",
"SETTINGS_RESET_DONE": "Se han restablecido los ajustes",

"ABOUT_VERSION": "Versión %d",
"ABOUT_VERSION": "Versión %s",
"ABOUT_BUILT_BY": "Compilado por %s",

"CREDITS_HEADER_JAMES": "Programación y Diseño de UI",
Expand Down
2 changes: 1 addition & 1 deletion Source/data/fr_strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"SETTINGS_RESET_CONFIRM": "Toutes les options seront réinitialisées",
"SETTINGS_RESET_DONE": "Les options ont été réinitialisées",

"ABOUT_VERSION": "Version %d",
"ABOUT_VERSION": "Version %s",
"ABOUT_BUILT_BY": "Créé par %s",

"CREDITS_HEADER_JAMES": "Programmation et design de l’interface",
Expand Down
2 changes: 1 addition & 1 deletion Source/data/it_strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"SETTINGS_RESET_CONFIRM": "Le impostazioni verranno ripristinate",
"SETTINGS_RESET_DONE": "Impostazioni cancellate",

"ABOUT_VERSION": "La versione %d",
"ABOUT_VERSION": "La versione %s",
"ABOUT_BUILT_BY": "Costruito da %s",

"CREDITS_HEADER_JAMES": "Programmatore e UI Designer",
Expand Down
2 changes: 1 addition & 1 deletion Source/data/jp_strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"SETTINGS_RESET_CONFIRM": "すべての設定をリセットします",
"SETTINGS_RESET_DONE": "設定のリセットが完了しました",

"ABOUT_VERSION": "Version %d",
"ABOUT_VERSION": "Version %s",
"ABOUT_BUILT_BY": "開発者: %s",

"CREDITS_HEADER_JAMES": "プログラム&UIデザイン",
Expand Down
2 changes: 1 addition & 1 deletion Source/data/nl_strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"SETTINGS_RESET_CONFIRM": "Alle instellingen worden hersteld",
"SETTINGS_RESET_DONE": "Instellingen zijn hersteld",

"ABOUT_VERSION": "Versie %d",
"ABOUT_VERSION": "Versie %s",
"ABOUT_BUILT_BY": "Ontwikkeld door %s",

"CREDITS_HEADER_JAMES": "Programmeren en UI Ontwerp",
Expand Down
2 changes: 1 addition & 1 deletion Source/data/pl_strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"SETTINGS_RESET_CONFIRM": "Wszystkie ustawienia zostaną usunięte",
"SETTINGS_RESET_DONE": "Ustawienia zostały usunięte",

"ABOUT_VERSION": "Wersja %d",
"ABOUT_VERSION": "Wersja %s",
"ABOUT_BUILT_BY": "Autor: %s",

"CREDITS_HEADER_JAMES": "Programowanie i Projekt UI",
Expand Down
2 changes: 1 addition & 1 deletion Source/data/ru_strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"SETTINGS_RESET_CONFIRM": "Все настройки будут сброшены",
"SETTINGS_RESET_DONE": "Настройки сброшены",

"ABOUT_VERSION": "Версия %d",
"ABOUT_VERSION": "Версия %s",
"ABOUT_BUILT_BY": "Создано %s",

"CREDITS_HEADER_JAMES": "Программирование и UI-Дизайн",
Expand Down
4 changes: 2 additions & 2 deletions Source/fonts/WhalesharkSans.fnt

Large diffs are not rendered by default.

Binary file removed Source/gfx/gfx_dialog_top.png
Binary file not shown.
Binary file removed Source/gfx/gfx_player_dpadhint_default.png
Binary file not shown.
Binary file removed Source/gfx/gfx_player_dpadhint_downpressed.png
Binary file not shown.
Binary file removed Source/gfx/gfx_player_dpadhint_leftpressed.png
Binary file not shown.
Binary file removed Source/gfx/gfx_player_dpadhint_pause.png
Binary file not shown.
Binary file removed Source/gfx/gfx_player_dpadhint_rightpressed.png
Binary file not shown.
Binary file removed Source/gfx/icon_layer.png
Binary file not shown.
Binary file added Source/gfx/icon_page_next.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Source/gfx/qr_rickastley.png
Binary file not shown.
Binary file removed Source/gfx/shape_button_cap_left.png
Binary file not shown.
Binary file removed Source/gfx/shape_button_cap_right.png
Binary file not shown.
Binary file modified Source/gfx/shape_button_cap_topleft_selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Source/gfx/shape_button_default_selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Source/gfx/shape_button_folderselect_selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Source/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import './components/DitherSwatch'
import './components/Scrollbar'
import './components/KeyValList'
import './components/TextView'
import './components/PageArrow'

import './scenes/ScreenBase'

Expand Down
2 changes: 1 addition & 1 deletion Source/noteFs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function noteFs:setWorkingFolder(folderPath)
end
end
numNotes = #noteList
self.hasNotes = numNotes > 1
self.hasNotes = numNotes > 0
self.numPages = math.ceil(numNotes / notesPerPage)
end

Expand Down
4 changes: 2 additions & 2 deletions Source/pdxinfo
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name=Playnote Studio
author=James Daniel
description=Flipnote Studio animation player for the Playdate
bundleID=com.jaames.playnote
version=1.0.1
buildNumber=2
version=1.1
buildNumber=3
imagePath=gfx/launcher
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed Source/samplememo/22_scarecrow1.ppm
Binary file not shown.
Binary file added Source/samplememo/22_scarecrow4.ppm
Binary file not shown.
16 changes: 8 additions & 8 deletions Source/samplememo/playnote.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,29 +86,29 @@
"authorId": "pekira"
},
{
"filename": "17_pekira2.ppm",
"filename": "17_pekira4.ppm",
"authorId": "pekira",
"dithering": [[1, 3, 1], [1, 3, 1]]
"dithering": [[1, 4, 1], [1, 4, 1]]
},
{
"filename": "18_pekira3.ppm",
"authorId": "pekira"
},
{
"filename": "19_pekira4.ppm",
"authorId": "pekira",
"dithering": [[1, 4, 1], [1, 4, 1]]
"filename": "19_pekira6.ppm",
"authorId": "pekira"
},
{
"filename": "20_pekira6.ppm",
"authorId": "pekira"
"filename": "20_pekira2.ppm",
"authorId": "pekira",
"dithering": [[1, 3, 1], [1, 3, 1]]
},
{
"filename": "21_pekira7.ppm",
"authorId": "pekira"
},
{
"filename": "22_scarecrow1.ppm",
"filename": "22_scarecrow4.ppm",
"authorId": "scarecrow"
},
{
Expand Down
1 change: 1 addition & 0 deletions Source/scenes/Dithering.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function DitheringScreen:drawBg(x, y, w, h)
gfx.fillRoundRect(RECT_LABELS, 6)

gfx.setImageDrawMode(gfx.kDrawModeFillWhite)
gfx.setFontTracking(2)
gfx.drawTextAligned(locales:getText('DITHER_COLOUR_BLACK'), COL_BLACK, ROW_LABELS, kTextAlignment.center)
gfx.drawTextAligned(locales:getText('DITHER_COLOUR_RED'), COL_RED, ROW_LABELS, kTextAlignment.center)
gfx.drawTextAligned(locales:getText('DITHER_COLOUR_BLUE'), COL_BLUE, ROW_LABELS, kTextAlignment.center)
Expand Down
4 changes: 2 additions & 2 deletions Source/scenes/Home.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function HomeScreen:init()
end

function HomeScreen:setupSprites()
local viewButton = Button(PLAYDATE_W / 2, PLAYDATE_H - 60, 196, 44, '%HOME_VIEW%')
local viewButton = Button(PLAYDATE_W / 2, PLAYDATE_H - 60, 196, 48, '%HOME_VIEW%')
viewButton.autoWidth = true
viewButton:setIcon('./gfx/icon_view')
viewButton:setAnchor('center', 'top')
Expand All @@ -18,7 +18,7 @@ function HomeScreen:setupSprites()
end)
self.viewButton = viewButton

local settingsButton = Button(PLAYDATE_W + 6, -6, 128, 42, '%HOME_SETTINGS%')
local settingsButton = Button(PLAYDATE_W + 6, -8, 128, 44, '%HOME_SETTINGS%')
settingsButton.variant = 'settings'
settingsButton.autoWidth = true
settingsButton:setIcon('./gfx/icon_settings')
Expand Down
Loading

0 comments on commit cfb45f5

Please sign in to comment.