From: Flavio Calva Date: Sat, 11 Feb 2023 07:46:22 +0000 (+0200) Subject: support for custom backgrounds X-Git-Url: http://git.ya2.it/?p=pmachines.git;a=commitdiff_plain;h=2c2198afd3e6f2604b35a50ad7333b6078aa1828 support for custom backgrounds --- diff --git a/assets/locale/po/it_IT.po b/assets/locale/po/it_IT.po index a0adf15..6f2ec6f 100644 --- a/assets/locale/po/it_IT.po +++ b/assets/locale/po/it_IT.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" -"PO-Revision-Date: 2022-12-12 10:10+0100\n" +"PO-Revision-Date: 2023-02-06 17:47+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -21,194 +21,202 @@ msgstr "" msgid "Collapse/Expand" msgstr "Nascondi/Mostra" -#: pmachines/editor/inspector.py:70 pmachines/editor/inspector.py:345 -#: pmachines/editor/inspector.py:476 +#: pmachines/editor/scene_list.py:41 +msgid "Write the file names (without the extension), one file for each line" +msgstr "Scrivi i nomi dei file (senza estensione), uno per riga." + +#: pmachines/editor/scene_list.py:68 +msgid "the list of the scenes in the proper order" +msgstr "la lista della scene nell'ordine" + +#: pmachines/editor/scene_list.py:93 pmachines/editor/scene.py:185 +msgid "Close the scene editor" +msgstr "Chiudi l'editor della scena" + +#: pmachines/editor/scene_list.py:103 +msgid "Save the scene list" +msgstr "Salva la lista delle scene" + +#: pmachines/editor/scene_list.py:112 pmachines/editor/scene.py:314 +msgid "You have unsaved changes. Really quit?" +msgstr "Hai modifiche non salvate, vuoi veramente uscire?" + +#: pmachines/editor/inspector.py:66 pmachines/editor/inspector.py:342 +#: pmachines/editor/inspector.py:473 msgid "position" msgstr "posizione" -#: pmachines/editor/inspector.py:70 pmachines/editor/inspector.py:476 +#: pmachines/editor/inspector.py:66 pmachines/editor/inspector.py:473 msgid "position (e.g. 0.1 2.3 4.5)" msgstr "posizione (e.g. 0.1 2.3 4.5)" -#: pmachines/editor/inspector.py:71 +#: pmachines/editor/inspector.py:67 msgid "roll" msgstr "roll" -#: pmachines/editor/inspector.py:71 +#: pmachines/editor/inspector.py:67 msgid "roll (e.g. 90)" msgstr "roll (e.g. 90)" -#: pmachines/editor/inspector.py:72 pmachines/editor/start_items.py:76 +#: pmachines/editor/inspector.py:68 pmachines/editor/start_items.py:72 msgid "scale" msgstr "scala" -#: pmachines/editor/inspector.py:72 pmachines/editor/start_items.py:76 +#: pmachines/editor/inspector.py:68 pmachines/editor/start_items.py:72 msgid "scale (e.g. 1.2)" msgstr "scala (e.g. 1.2)" -#: pmachines/editor/inspector.py:73 pmachines/editor/start_items.py:77 +#: pmachines/editor/inspector.py:69 pmachines/editor/start_items.py:73 msgid "mass" msgstr "massa" -#: pmachines/editor/inspector.py:73 +#: pmachines/editor/inspector.py:69 msgid "mass (default 1; 0 if fixed)" msgstr "massa (default 1; 0 se fisso)" -#: pmachines/editor/inspector.py:74 pmachines/editor/start_items.py:78 +#: pmachines/editor/inspector.py:70 pmachines/editor/start_items.py:74 msgid "restitution" msgstr "rimbalzo" -#: pmachines/editor/inspector.py:74 pmachines/editor/start_items.py:78 +#: pmachines/editor/inspector.py:70 pmachines/editor/start_items.py:74 msgid "restitution (default 0.5)" msgstr "rimbalzo (default 0.5)" -#: pmachines/editor/inspector.py:75 pmachines/editor/start_items.py:79 +#: pmachines/editor/inspector.py:71 pmachines/editor/start_items.py:75 msgid "friction" msgstr "frizione" -#: pmachines/editor/inspector.py:75 pmachines/editor/start_items.py:79 +#: pmachines/editor/inspector.py:71 pmachines/editor/start_items.py:75 msgid "friction (default 0.5)" msgstr "frizione (default 0.5)" -#: pmachines/editor/inspector.py:76 pmachines/editor/inspector.py:346 -#: pmachines/editor/inspector.py:477 pmachines/editor/start_items.py:80 +#: pmachines/editor/inspector.py:72 pmachines/editor/inspector.py:343 +#: pmachines/editor/inspector.py:474 pmachines/editor/start_items.py:76 msgid "id" msgstr "id" -#: pmachines/editor/inspector.py:76 pmachines/editor/inspector.py:477 +#: pmachines/editor/inspector.py:72 pmachines/editor/inspector.py:474 msgid "id of the item (for the strategies)" msgstr "id dell'oggetto (per le strategie)" -#: pmachines/editor/inspector.py:86 pmachines/editor/start_items.py:88 +#: pmachines/editor/inspector.py:83 pmachines/editor/start_items.py:85 msgid "strategy" msgstr "strategia" -#: pmachines/editor/inspector.py:86 pmachines/editor/start_items.py:88 +#: pmachines/editor/inspector.py:83 pmachines/editor/start_items.py:85 msgid "the strategy of the item" msgstr "la strategia dell'oggetto" -#: pmachines/editor/inspector.py:101 pmachines/editor/start_items.py:103 +#: pmachines/editor/inspector.py:98 pmachines/editor/start_items.py:100 msgid "strategy_args" msgstr "argomenti strategia" -#: pmachines/editor/inspector.py:101 pmachines/editor/start_items.py:103 +#: pmachines/editor/inspector.py:98 pmachines/editor/start_items.py:100 msgid "the arguments of the strategy" msgstr "gli argomenti della strategia" -#: pmachines/editor/inspector.py:128 pmachines/editor/inspector.py:504 -#: pmachines/editor/start_items.py:131 +#: pmachines/editor/inspector.py:125 pmachines/editor/inspector.py:501 +#: pmachines/editor/start_items.py:128 msgid "Close" msgstr "Chiudi" -#: pmachines/editor/inspector.py:139 pmachines/editor/inspector.py:515 +#: pmachines/editor/inspector.py:136 pmachines/editor/inspector.py:512 msgid "Delete the item" msgstr "Cancella l'oggetto" -#: pmachines/editor/inspector.py:286 pmachines/editor/start_items.py:365 +#: pmachines/editor/inspector.py:283 pmachines/editor/start_items.py:362 msgid "There are errors in the strategy args." msgstr "Ci sono errori negli argomenti della strategia." -#: pmachines/editor/scene.py:76 +#: pmachines/editor/scene.py:81 msgid "Filename" msgstr "Filename" -#: pmachines/editor/scene.py:92 +#: pmachines/editor/scene.py:97 msgid "The name of the file without the extension" msgstr "Il nome del file senza estensione" -#: pmachines/editor/scene.py:95 +#: pmachines/editor/scene.py:100 msgid "Name" msgstr "Nome" -#: pmachines/editor/scene.py:110 +#: pmachines/editor/scene.py:115 msgid "The title of the scene" msgstr "Il titolo della scena" -#: pmachines/editor/scene.py:113 +#: pmachines/editor/scene.py:118 +msgid "Background" +msgstr "Sfondo" + +#: pmachines/editor/scene.py:133 +msgid "The name of the background" +msgstr "Il nome dello sfondo" + +#: pmachines/editor/scene.py:136 msgid "Description" msgstr "Descrizione" -#: pmachines/editor/scene.py:137 +#: pmachines/editor/scene.py:160 msgid "The description of the scene" msgstr "La descrizione della scena" -#: pmachines/editor/scene.py:162 pmachines/editor/scene_list.py:93 -msgid "Close the scene editor" -msgstr "Chiudi l'editor della scena" - -#: pmachines/editor/scene.py:172 +#: pmachines/editor/scene.py:195 msgid "Save the scene" msgstr "Salva la scena" -#: pmachines/editor/scene.py:182 +#: pmachines/editor/scene.py:205 msgid "Set the sorting of the scenes" msgstr "Imposta l'ordinamento delle scene" -#: pmachines/editor/scene.py:193 pmachines/editor/scene.py:210 +#: pmachines/editor/scene.py:217 pmachines/editor/scene.py:234 msgid "new item" msgstr "nuovo oggetto" -#: pmachines/editor/scene.py:223 +#: pmachines/editor/scene.py:247 msgid "Create a new item" msgstr "Crea un nuovo oggetto" -#: pmachines/editor/scene.py:234 +#: pmachines/editor/scene.py:258 msgid "Initial items" msgstr "Oggetti iniziali" -#: pmachines/editor/scene.py:244 +#: pmachines/editor/scene.py:268 msgid "New scene" msgstr "Nuova scena" -#: pmachines/editor/scene.py:289 pmachines/editor/scene_list.py:112 -msgid "You have unsaved changes. Really quit?" -msgstr "Hai modifiche non salvate, vuoi veramente uscire?" - -#: pmachines/editor/scene_list.py:41 -msgid "Write the file names (without the extension), one file for each line" -msgstr "Scrivi i nomi dei file (senza estensione), uno per riga." - -#: pmachines/editor/scene_list.py:68 -msgid "the list of the scenes in the proper order" -msgstr "la lista della scene nell'ordine" - -#: pmachines/editor/scene_list.py:103 -msgid "Save the scene list" -msgstr "Salva la lista delle scene" - -#: pmachines/editor/start_items.py:61 +#: pmachines/editor/start_items.py:57 msgid "class" msgstr "classe" -#: pmachines/editor/start_items.py:61 +#: pmachines/editor/start_items.py:57 msgid "class of the item" msgstr "classe dell'oggetto" -#: pmachines/editor/start_items.py:75 +#: pmachines/editor/start_items.py:71 msgid "count" msgstr "quantità" -#: pmachines/editor/start_items.py:75 +#: pmachines/editor/start_items.py:71 msgid "number of the items" msgstr "numero degli oggetti" -#: pmachines/editor/start_items.py:77 +#: pmachines/editor/start_items.py:73 msgid "mass (default 1)" msgstr "massa (default 1)" -#: pmachines/editor/start_items.py:141 +#: pmachines/editor/start_items.py:138 msgid "Save" msgstr "Salva" -#: pmachines/editor/start_items.py:151 +#: pmachines/editor/start_items.py:148 msgid "Delete" msgstr "Cancella" -#: pmachines/editor/start_items.py:161 +#: pmachines/editor/start_items.py:158 msgid "New" msgstr "Nuovo" -#: pmachines/editor/start_items.py:171 +#: pmachines/editor/start_items.py:168 msgid "Next" msgstr "Prossimo" @@ -323,80 +331,44 @@ msgstr "Hai vinto!" msgid "You have failed!" msgstr "Hai perso!" -#~ msgid "" -#~ "Goal: the left box must hit the right box\n" -#~ "\n" -#~ msgstr "" -#~ "Obiettivo: la scatola a sinistra deve colpire la scatola a destra\n" -#~ "\n" - -#~ msgid "" -#~ "Goal: you must hit every domino piece\n" -#~ "\n" -#~ msgstr "" -#~ "Devi colpire ogni pezzo del domino\n" -#~ "\n" - -#~ msgid "Domino" -#~ msgstr "Domino" - -#~ msgid "" -#~ "keep mouse_l pressed to drag an item\n" -#~ "\n" -#~ msgstr "" -#~ "tieni premuto mouse_l per trascinare un oggetto\n" -#~ "\n" +#~ msgid "Teeter tooter" +#~ msgstr "Altalena" -#~ msgid "keep mouse_r pressed to rotate an item" -#~ msgstr "tieni premuto mouse_r per ruotare un oggetto" +#~ msgid "Goal: every domino piece must fall" +#~ msgstr "Obiettivo: ogni pezzo del domino deve cadere" -#~ msgid "" -#~ "Goal: only the last piece of each row must be up\n" -#~ "\n" -#~ msgstr "" -#~ "Obiettivo: solo l'ultimo pezzo di ogni fila deve rimanere in piedi\n" -#~ "\n" +#~ msgid "Basket ball" +#~ msgstr "Palla da basket" -#~ msgid "Teeter tooter" -#~ msgstr "Altalena" +#~ msgid "Goal: only the last piece of each row must be up" +#~ msgstr "Obiettivo: l'ultimo pezzo di ogni riga deve rimanere in piedi" -#~ msgid "" -#~ "Goal: every domino piece must be hit\n" -#~ "\n" -#~ msgstr "" -#~ "Obiettivo: ogni pezzo del domino deve essere colpito\n" -#~ "\n" +#~ msgid "Goal: every domino piece must be hit" +#~ msgstr "Obiettivo: ogni pezzo del domino deve essere colpito" -#~ msgid "" -#~ "Goal: every domino piece must fall\n" -#~ "\n" -#~ msgstr "" -#~ "Obiettivo: ogni pezzo del domino deve cadere\n" -#~ "\n" +#~ msgid "Domino, box and basket ball" +#~ msgstr "Domino, scatola e palla da basket" #~ msgid "Teeter tooter, domino, box and basket ball" #~ msgstr "Altalena, domino, scatola e palla da basket" -#~ msgid "Domino and box" -#~ msgstr "Domino e scatola" +#~ msgid "Domino" +#~ msgstr "Domino" -#~ msgid "Basket ball" -#~ msgstr "Palla da basket" +#~ msgid "Goal: you must hit every domino piece" +#~ msgstr "Obiettivo: devi colpire tutti i pezzi del domino" + +#~ msgid "keep mouse_l pressed to drag an item" +#~ msgstr "tieni \\5mouse_l\\5 per muovere un oggetto" #~ msgid "Box" #~ msgstr "Scatola" -#~ msgid "Domino, box and basket ball" -#~ msgstr "Domino, scatola e palla da basket" - -#~ msgid "Quit" -#~ msgstr "Esci" +#~ msgid "Goal: the left box must hit the right box" +#~ msgstr "Obiettivo: la scatola a sinistra deve colpire la scatola a destra" -#~ msgid "version: " -#~ msgstr "versione: " - -#~ msgid "made with heart with panda3d, panda3d-simplepbr, panda3d-gltf" -#~ msgstr "fatto col cuore con panda3d, panda3d-simplepbr, panda3d-gltf" +#~ msgid "Domino and box" +#~ msgstr "Domino e scatola" -#~ msgid "Support us" -#~ msgstr "Supportaci" +#~ msgid "keep mouse_r pressed to rotate an item" +#~ msgstr "tieni \\5mouse_r\\5 per ruotare un oggetto" diff --git a/assets/locale/po/pmachines.pot b/assets/locale/po/pmachines.pot index 6d14833..d8e5b77 100644 --- a/assets/locale/po/pmachines.pot +++ b/assets/locale/po/pmachines.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-29 15:34+0200\n" +"POT-Creation-Date: 2023-02-06 17:47+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,74 +17,210 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: pmachines/scene.py:89 -msgid "Scene: " +#: pmachines/editor/augmented_frame.py:53 +msgid "Collapse/Expand" msgstr "" -#: pmachines/scene.py:608 -msgid "You win!" +#: pmachines/editor/scene_list.py:41 +msgid "Write the file names (without the extension), one file for each line" msgstr "" -#: pmachines/scene.py:681 -msgid "You have failed!" +#: pmachines/editor/scene_list.py:68 +msgid "the list of the scenes in the proper order" msgstr "" -#: pmachines/gui/menu.py:95 -msgid "Play" +#: pmachines/editor/scene_list.py:93 pmachines/editor/scene.py:185 +msgid "Close the scene editor" msgstr "" -#: pmachines/gui/menu.py:99 -msgid "Options" +#: pmachines/editor/scene_list.py:103 +msgid "Save the scene list" msgstr "" -#: pmachines/gui/menu.py:103 -msgid "Credits" +#: pmachines/editor/scene_list.py:112 pmachines/editor/scene.py:314 +msgid "You have unsaved changes. Really quit?" msgstr "" -#: pmachines/gui/menu.py:112 -msgid "Exit" +#: pmachines/editor/inspector.py:66 pmachines/editor/inspector.py:342 +#: pmachines/editor/inspector.py:473 +msgid "position" msgstr "" -#: pmachines/gui/menu.py:121 pmachines/gui/menu.py:124 -#: pmachines/gui/menu.py:309 -msgid "English" +#: pmachines/editor/inspector.py:66 pmachines/editor/inspector.py:473 +msgid "position (e.g. 0.1 2.3 4.5)" msgstr "" -#: pmachines/gui/menu.py:121 pmachines/gui/menu.py:125 -#: pmachines/gui/menu.py:310 -msgid "Italian" +#: pmachines/editor/inspector.py:67 +msgid "roll" msgstr "" -#: pmachines/gui/menu.py:134 -msgid "Language" +#: pmachines/editor/inspector.py:67 +msgid "roll (e.g. 90)" msgstr "" -#: pmachines/gui/menu.py:143 -msgid "Volume" +#: pmachines/editor/inspector.py:68 pmachines/editor/start_items.py:72 +msgid "scale" msgstr "" -#: pmachines/gui/menu.py:160 -msgid "Fullscreen" +#: pmachines/editor/inspector.py:68 pmachines/editor/start_items.py:72 +msgid "scale (e.g. 1.2)" msgstr "" -#: pmachines/gui/menu.py:188 -msgid "Resolution" +#: pmachines/editor/inspector.py:69 pmachines/editor/start_items.py:73 +msgid "mass" msgstr "" -#: pmachines/gui/menu.py:199 -msgid "Antialiasing" +#: pmachines/editor/inspector.py:69 +msgid "mass (default 1; 0 if fixed)" msgstr "" -#: pmachines/gui/menu.py:206 -msgid "Shadows" +#: pmachines/editor/inspector.py:70 pmachines/editor/start_items.py:74 +msgid "restitution" msgstr "" -#: pmachines/gui/menu.py:213 pmachines/gui/menu.py:238 -#: pmachines/gui/menu.py:275 -msgid "Back" +#: pmachines/editor/inspector.py:70 pmachines/editor/start_items.py:74 +msgid "restitution (default 0.5)" +msgstr "" + +#: pmachines/editor/inspector.py:71 pmachines/editor/start_items.py:75 +msgid "friction" +msgstr "" + +#: pmachines/editor/inspector.py:71 pmachines/editor/start_items.py:75 +msgid "friction (default 0.5)" +msgstr "" + +#: pmachines/editor/inspector.py:72 pmachines/editor/inspector.py:343 +#: pmachines/editor/inspector.py:474 pmachines/editor/start_items.py:76 +msgid "id" +msgstr "" + +#: pmachines/editor/inspector.py:72 pmachines/editor/inspector.py:474 +msgid "id of the item (for the strategies)" +msgstr "" + +#: pmachines/editor/inspector.py:83 pmachines/editor/start_items.py:85 +msgid "strategy" +msgstr "" + +#: pmachines/editor/inspector.py:83 pmachines/editor/start_items.py:85 +msgid "the strategy of the item" +msgstr "" + +#: pmachines/editor/inspector.py:98 pmachines/editor/start_items.py:100 +msgid "strategy_args" +msgstr "" + +#: pmachines/editor/inspector.py:98 pmachines/editor/start_items.py:100 +msgid "the arguments of the strategy" +msgstr "" + +#: pmachines/editor/inspector.py:125 pmachines/editor/inspector.py:501 +#: pmachines/editor/start_items.py:128 +msgid "Close" +msgstr "" + +#: pmachines/editor/inspector.py:136 pmachines/editor/inspector.py:512 +msgid "Delete the item" +msgstr "" + +#: pmachines/editor/inspector.py:283 pmachines/editor/start_items.py:362 +msgid "There are errors in the strategy args." +msgstr "" + +#: pmachines/editor/scene.py:81 +msgid "Filename" +msgstr "" + +#: pmachines/editor/scene.py:97 +msgid "The name of the file without the extension" +msgstr "" + +#: pmachines/editor/scene.py:100 +msgid "Name" +msgstr "" + +#: pmachines/editor/scene.py:115 +msgid "The title of the scene" +msgstr "" + +#: pmachines/editor/scene.py:118 +msgid "Background" +msgstr "" + +#: pmachines/editor/scene.py:133 +msgid "The name of the background" +msgstr "" + +#: pmachines/editor/scene.py:136 +msgid "Description" +msgstr "" + +#: pmachines/editor/scene.py:160 +msgid "The description of the scene" +msgstr "" + +#: pmachines/editor/scene.py:195 +msgid "Save the scene" +msgstr "" + +#: pmachines/editor/scene.py:205 +msgid "Set the sorting of the scenes" +msgstr "" + +#: pmachines/editor/scene.py:217 pmachines/editor/scene.py:234 +msgid "new item" +msgstr "" + +#: pmachines/editor/scene.py:247 +msgid "Create a new item" +msgstr "" + +#: pmachines/editor/scene.py:258 +msgid "Initial items" +msgstr "" + +#: pmachines/editor/scene.py:268 +msgid "New scene" +msgstr "" + +#: pmachines/editor/start_items.py:57 +msgid "class" +msgstr "" + +#: pmachines/editor/start_items.py:57 +msgid "class of the item" +msgstr "" + +#: pmachines/editor/start_items.py:71 +msgid "count" +msgstr "" + +#: pmachines/editor/start_items.py:71 +msgid "number of the items" +msgstr "" + +#: pmachines/editor/start_items.py:73 +msgid "mass (default 1)" +msgstr "" + +#: pmachines/editor/start_items.py:138 +msgid "Save" +msgstr "" + +#: pmachines/editor/start_items.py:148 +msgid "Delete" msgstr "" -#: pmachines/gui/menu.py:225 +#: pmachines/editor/start_items.py:158 +msgid "New" +msgstr "" + +#: pmachines/editor/start_items.py:168 +msgid "Next" +msgstr "" + +#: pmachines/gui/credits_page.py:11 msgid "" "Code and gfx\n" " scaleFlavio Calva\n" @@ -94,11 +230,11 @@ msgid "" " scaleStefan Grossmann" msgstr "" -#: pmachines/gui/menu.py:230 +#: pmachines/gui/credits_page.py:17 msgid "Website" msgstr "" -#: pmachines/gui/menu.py:233 +#: pmachines/gui/credits_page.py:23 msgid "" "Special thanks to:\n" " scalerdb\n" @@ -106,56 +242,123 @@ msgid "" " scaleDamiana Ercolani" msgstr "" -msgid "" -"Goal: the left box must hit the right box\n" -"\n" +#: pmachines/gui/credits_page.py:29 pmachines/gui/options_page.py:132 +#: pmachines/gui/play_page.py:32 +msgid "Back" msgstr "" -msgid "" -"Goal: you must hit every domino piece\n" -"\n" +#: pmachines/gui/main_page.py:11 +msgid "Play" msgstr "" -msgid "Domino" +#: pmachines/gui/main_page.py:18 +msgid "Options" msgstr "" -msgid "" -"keep mouse_l pressed to drag an item\n" -"\n" +#: pmachines/gui/main_page.py:25 +msgid "Credits" msgstr "" -msgid "keep mouse_r pressed to rotate an item" +#: pmachines/gui/main_page.py:32 pmachines/scene/scene.py:307 +msgid "Exit" msgstr "" -msgid "" -"Goal: only the last piece of each row must be up\n" -"\n" +#: pmachines/gui/options_page.py:30 pmachines/gui/options_page.py:33 +#: pmachines/gui/options_page.py:145 +msgid "English" +msgstr "" + +#: pmachines/gui/options_page.py:30 pmachines/gui/options_page.py:34 +#: pmachines/gui/options_page.py:146 +msgid "Italian" +msgstr "" + +#: pmachines/gui/options_page.py:47 +msgid "Language" +msgstr "" + +#: pmachines/gui/options_page.py:56 +msgid "Volume" +msgstr "" + +#: pmachines/gui/options_page.py:70 +msgid "Fullscreen" +msgstr "" + +#: pmachines/gui/options_page.py:101 +msgid "Resolution" +msgstr "" + +#: pmachines/gui/options_page.py:114 +msgid "Antialiasing" +msgstr "" + +#: pmachines/gui/options_page.py:123 +msgid "Shadows" +msgstr "" + +#: pmachines/scene/scene.py:108 +msgid "Scene: " +msgstr "" + +#: pmachines/scene/scene.py:308 +msgid "Instructions" +msgstr "" + +#: pmachines/scene/scene.py:309 +msgid "Run" +msgstr "" + +#: pmachines/scene/scene.py:315 +msgid "Editor" +msgstr "" + +#: pmachines/scene/scene.py:638 +msgid "You win!" +msgstr "" + +#: pmachines/scene/scene.py:718 +msgid "You have failed!" msgstr "" msgid "Teeter tooter" msgstr "" -msgid "" -"Goal: every domino piece must be hit\n" -"\n" +msgid "Goal: every domino piece must fall" msgstr "" -msgid "" -"Goal: every domino piece must fall\n" -"\n" +msgid "Basket ball" +msgstr "" + +msgid "Goal: only the last piece of each row must be up" +msgstr "" + +msgid "Goal: every domino piece must be hit" +msgstr "" + +msgid "Domino, box and basket ball" msgstr "" msgid "Teeter tooter, domino, box and basket ball" msgstr "" -msgid "Domino and box" +msgid "Domino" msgstr "" -msgid "Basket ball" +msgid "Goal: you must hit every domino piece" +msgstr "" + +msgid "keep mouse_l pressed to drag an item" msgstr "" msgid "Box" msgstr "" -msgid "Domino, box and basket ball" +msgid "Goal: the left box must hit the right box" +msgstr "" + +msgid "Domino and box" +msgstr "" + +msgid "keep mouse_r pressed to rotate an item" msgstr "" diff --git a/assets/models/blend/background/ao.png b/assets/models/blend/background/ao.png deleted file mode 100644 index a3a90b5..0000000 Binary files a/assets/models/blend/background/ao.png and /dev/null differ diff --git a/assets/models/blend/background/ao_roughness_metal.png b/assets/models/blend/background/ao_roughness_metal.png deleted file mode 100644 index d191abf..0000000 Binary files a/assets/models/blend/background/ao_roughness_metal.png and /dev/null differ diff --git a/assets/models/blend/background/background.blend b/assets/models/blend/background/background.blend deleted file mode 100644 index 4808dd2..0000000 Binary files a/assets/models/blend/background/background.blend and /dev/null differ diff --git a/assets/models/blend/background/base.png b/assets/models/blend/background/base.png deleted file mode 100644 index b6f8c50..0000000 Binary files a/assets/models/blend/background/base.png and /dev/null differ diff --git a/assets/models/blend/background/bump.png b/assets/models/blend/background/bump.png deleted file mode 100644 index 8d88791..0000000 Binary files a/assets/models/blend/background/bump.png and /dev/null differ diff --git a/assets/models/blend/background/bump_frame.png b/assets/models/blend/background/bump_frame.png deleted file mode 100644 index 162db11..0000000 Binary files a/assets/models/blend/background/bump_frame.png and /dev/null differ diff --git a/assets/models/blend/background/bump_pattern.png b/assets/models/blend/background/bump_pattern.png deleted file mode 100644 index 5dfc360..0000000 Binary files a/assets/models/blend/background/bump_pattern.png and /dev/null differ diff --git a/assets/models/blend/background/metal.png b/assets/models/blend/background/metal.png deleted file mode 100644 index 1258f72..0000000 Binary files a/assets/models/blend/background/metal.png and /dev/null differ diff --git a/assets/models/blend/background/normal.png b/assets/models/blend/background/normal.png deleted file mode 100644 index 597185d..0000000 Binary files a/assets/models/blend/background/normal.png and /dev/null differ diff --git a/assets/models/blend/background/roughness.png b/assets/models/blend/background/roughness.png deleted file mode 100644 index 324ea17..0000000 Binary files a/assets/models/blend/background/roughness.png and /dev/null differ diff --git a/assets/models/blend/backgrounds/wood/ao.png b/assets/models/blend/backgrounds/wood/ao.png new file mode 100644 index 0000000..a3a90b5 Binary files /dev/null and b/assets/models/blend/backgrounds/wood/ao.png differ diff --git a/assets/models/blend/backgrounds/wood/ao_roughness_metal.png b/assets/models/blend/backgrounds/wood/ao_roughness_metal.png new file mode 100644 index 0000000..d191abf Binary files /dev/null and b/assets/models/blend/backgrounds/wood/ao_roughness_metal.png differ diff --git a/assets/models/blend/backgrounds/wood/background.blend b/assets/models/blend/backgrounds/wood/background.blend new file mode 100644 index 0000000..4808dd2 Binary files /dev/null and b/assets/models/blend/backgrounds/wood/background.blend differ diff --git a/assets/models/blend/backgrounds/wood/base.png b/assets/models/blend/backgrounds/wood/base.png new file mode 100644 index 0000000..b6f8c50 Binary files /dev/null and b/assets/models/blend/backgrounds/wood/base.png differ diff --git a/assets/models/blend/backgrounds/wood/bump.png b/assets/models/blend/backgrounds/wood/bump.png new file mode 100644 index 0000000..8d88791 Binary files /dev/null and b/assets/models/blend/backgrounds/wood/bump.png differ diff --git a/assets/models/blend/backgrounds/wood/bump_frame.png b/assets/models/blend/backgrounds/wood/bump_frame.png new file mode 100644 index 0000000..162db11 Binary files /dev/null and b/assets/models/blend/backgrounds/wood/bump_frame.png differ diff --git a/assets/models/blend/backgrounds/wood/bump_pattern.png b/assets/models/blend/backgrounds/wood/bump_pattern.png new file mode 100644 index 0000000..5dfc360 Binary files /dev/null and b/assets/models/blend/backgrounds/wood/bump_pattern.png differ diff --git a/assets/models/blend/backgrounds/wood/metal.png b/assets/models/blend/backgrounds/wood/metal.png new file mode 100644 index 0000000..1258f72 Binary files /dev/null and b/assets/models/blend/backgrounds/wood/metal.png differ diff --git a/assets/models/blend/backgrounds/wood/normal.png b/assets/models/blend/backgrounds/wood/normal.png new file mode 100644 index 0000000..597185d Binary files /dev/null and b/assets/models/blend/backgrounds/wood/normal.png differ diff --git a/assets/models/blend/backgrounds/wood/roughness.png b/assets/models/blend/backgrounds/wood/roughness.png new file mode 100644 index 0000000..324ea17 Binary files /dev/null and b/assets/models/blend/backgrounds/wood/roughness.png differ diff --git a/assets/scenes/basketball.json b/assets/scenes/basketball.json index 93ff646..0e0a4c5 100644 --- a/assets/scenes/basketball.json +++ b/assets/scenes/basketball.json @@ -1,4 +1,5 @@ { + "background": "wood", "items": [ { "class": "Shelf", diff --git a/assets/scenes/box.json b/assets/scenes/box.json index d3d82f6..3ac92b7 100644 --- a/assets/scenes/box.json +++ b/assets/scenes/box.json @@ -1,4 +1,5 @@ { + "background": "wood", "instructions": "Goal: the left box must hit the right box\n\nkeep \\5mouse_l\\5 pressed to drag an item\n\nkeep \\5mouse_r\\5 pressed to rotate an item", "items": [ { @@ -107,5 +108,5 @@ } ] }, - "version": "8062bd34519a" + "version": "8f6333998c31" } \ No newline at end of file diff --git a/assets/scenes/domino.json b/assets/scenes/domino.json index 461ab21..0821407 100644 --- a/assets/scenes/domino.json +++ b/assets/scenes/domino.json @@ -1,4 +1,5 @@ { + "background": "wood", "instructions": "Goal: every domino piece must fall\n\nkeep \\5mouse_l\\5 pressed to drag an item\n\nkeep \\5mouse_r\\5 pressed to rotate an item", "items": [ { @@ -142,4 +143,4 @@ ] }, "version": "51b44031bbce" -} \ No newline at end of file +} diff --git a/assets/scenes/domino_box.json b/assets/scenes/domino_box.json index 87df60e..7e4fd25 100644 --- a/assets/scenes/domino_box.json +++ b/assets/scenes/domino_box.json @@ -1,4 +1,5 @@ { + "background": "wood", "items": [ { "class": "Shelf", diff --git a/assets/scenes/domino_box_basketball.json b/assets/scenes/domino_box_basketball.json index 6543fb7..f2f7792 100644 --- a/assets/scenes/domino_box_basketball.json +++ b/assets/scenes/domino_box_basketball.json @@ -1,4 +1,5 @@ { + "background": "wood", "items": [ { "class": "Shelf", diff --git a/assets/scenes/teeter_domino_box_basketball.json b/assets/scenes/teeter_domino_box_basketball.json index 5159a28..5e5694d 100644 --- a/assets/scenes/teeter_domino_box_basketball.json +++ b/assets/scenes/teeter_domino_box_basketball.json @@ -1,4 +1,5 @@ { + "background": "wood", "items": [ { "class": "Shelf", diff --git a/assets/scenes/teeter_tooter.json b/assets/scenes/teeter_tooter.json index 63de031..8d559f0 100644 --- a/assets/scenes/teeter_tooter.json +++ b/assets/scenes/teeter_tooter.json @@ -1,4 +1,5 @@ { + "background": "wood", "items": [ { "class": "Shelf", diff --git a/pmachines/editor/scene.py b/pmachines/editor/scene.py index d67203f..da55021 100644 --- a/pmachines/editor/scene.py +++ b/pmachines/editor/scene.py @@ -68,7 +68,7 @@ class SceneEditor(DirectObject): 'clickSound': loader.load_sfx( 'assets/audio/sfx/click.ogg')} tooltip_args = self._common['text_font'], self._common['scale'], self._common['text_fg'] - w, h, tw, l = 1.8, 1, 30, .36 + w, h, tw, l = 1.8, 1.1, 30, .36 self._frm = AugmentedDirectFrame(frameColor=(.4, .4, .4, .06), frameSize=(0, w, 0, h), parent=base.a2dBottomCenter, @@ -115,7 +115,25 @@ class SceneEditor(DirectObject): self.__name_entry.set_tooltip(_('The title of the scene'), *tooltip_args) self.__pos_mgr['editor_scene_name'] = self.__name_entry.pos_pixel() OnscreenText( - _('Description'), pos=(l - .03, h - .3), parent=self._frm, + _('Background'), pos=(l - .03, h - .3), parent=self._frm, + font=self._common['text_font'], + scale=self._common['scale'], + fg=self._common['text_fg'], + align=TextNode.A_right) + self.__background_entry = DirectEntry( + scale=self._common['scale'], + pos=(l, 1, h - .3), + entryFont=self._font, + width=tw, + frameColor=self._common['frameColor'], + initialText=json['background'], + parent=self._frm, + text_fg=self._common['text_fg']) + self.__background_entry.__class__ = type('DirectEntryMixed', (DirectEntry, DirectGuiMixin), {}) + self.__background_entry.set_tooltip(_('The name of the background'), *tooltip_args) + self.__pos_mgr['editor_scene_background'] = self.__background_entry.pos_pixel() + OnscreenText( + _('Description'), pos=(l - .03, h - .4), parent=self._frm, font=self._common['text_font'], scale=self._common['scale'], fg=self._common['text_fg'], @@ -127,7 +145,7 @@ class SceneEditor(DirectObject): entry['focus']=1 self.__instructions_entry = DirectEntry( scale=self._common['scale'], - pos=(l, 1, h - .3), + pos=(l, 1, h - .4), entryFont=self._font, width=tw, numLines=12, @@ -287,6 +305,7 @@ class SceneEditor(DirectObject): def __on_close(self): self.__json['name'] = self.__name_entry.get() + self.__json['background'] = self.__background_entry.get() self.__json['instructions'] = self.__instructions_entry.get() if self.__compute_hash() == self.__json['version']: self.destroy() @@ -343,6 +362,7 @@ class SceneEditor(DirectObject): def __on_save(self): self.__json['name'] = self.__name_entry.get() + self.__json['background'] = self.__background_entry.get() self.__json['instructions'] = self.__instructions_entry.get() self.__json['version'] = self.__compute_hash() json_name = self.__filenamename_entry.get() diff --git a/pmachines/items/background.py b/pmachines/items/background.py index acf6b8f..d641496 100644 --- a/pmachines/items/background.py +++ b/pmachines/items/background.py @@ -4,14 +4,14 @@ from ya2.utils.gfx import GfxTools class Background: - def __init__(self): + def __init__(self, name): self._root = GfxTools.build_empty_node('background_root') self._root.reparent_to(render) ncols, nrows = 16, 8 start_size, end_size = 5, 2.5 offset = 5 for col, row in product(range(ncols), range(nrows)): - model = GfxTools.build_model('assets/models/bam/background/background.bam') + model = GfxTools.build_model(f'assets/models/bam/backgrounds/{name}/background.bam') model.set_scale(end_size / start_size) model.reparent_to(self._root) total_width, total_height = end_size * ncols, end_size * nrows diff --git a/pmachines/scene/scene.py b/pmachines/scene/scene.py index 60e0875..1bff770 100644 --- a/pmachines/scene/scene.py +++ b/pmachines/scene/scene.py @@ -72,7 +72,7 @@ class Scene(DirectObject): self.__restore_state() elif self.__json_name: self._set_instructions() - self._bg = Background() + self._bg = Background(self.json['background']) self._side_panel = SidePanel(world, self._mouse_plane_node, (-5, 4), (-3, 1), 1, self.__items) self._scene_tsk = taskMgr.add(self.on_frame, 'scene_on_frame') if auto_start_editor: diff --git a/tests/functional_test.py b/tests/functional_test.py index 2e21403..8a3396e 100644 --- a/tests/functional_test.py +++ b/tests/functional_test.py @@ -545,6 +545,12 @@ class FunctionalTest: await self._event(FunctionalTest.evt_time, 'mouseclick', ['editor_scene_name', 'left']) await self._event(FunctionalTest.evt_time, 'keyboard', ['BackSpace', 'BackSpace', 'BackSpace', 'Return']) await self._screenshot(FunctionalTest.start_time, 'editor_scene_name_restored') + await self._event(FunctionalTest.evt_time, 'mouseclick', ['editor_scene_background', 'left']) + await self._event(FunctionalTest.evt_time, 'keyboard', ['a', 'b', 'c', 'Return']) + await self._screenshot(FunctionalTest.start_time, 'editor_scene_background_changed') + await self._event(FunctionalTest.evt_time, 'mouseclick', ['editor_scene_background', 'left']) + await self._event(FunctionalTest.evt_time, 'keyboard', ['BackSpace', 'BackSpace', 'BackSpace', 'Return']) + await self._screenshot(FunctionalTest.start_time, 'editor_scene_background_restored') await self._event(FunctionalTest.evt_time, 'mouseclick', ['editor_scene_instructions', 'left']) await self._event(FunctionalTest.evt_time, 'keyboard', ['a', 'b', 'c', 'Return', 'BackSpace', 'BackSpace', 'BackSpace', 'BackSpace']) await self._event(FunctionalTest.evt_time, 'mouseclick', ['editor_sorting', 'left'])