ya2 · news · projects · code · about

support for custom backgrounds
authorFlavio Calva <f.calva@gmail.com>
Sat, 11 Feb 2023 07:46:22 +0000 (09:46 +0200)
committerFlavio Calva <f.calva@gmail.com>
Sat, 11 Feb 2023 07:46:22 +0000 (09:46 +0200)
33 files changed:
assets/locale/po/it_IT.po
assets/locale/po/pmachines.pot
assets/models/blend/background/ao.png [deleted file]
assets/models/blend/background/ao_roughness_metal.png [deleted file]
assets/models/blend/background/background.blend [deleted file]
assets/models/blend/background/base.png [deleted file]
assets/models/blend/background/bump.png [deleted file]
assets/models/blend/background/bump_frame.png [deleted file]
assets/models/blend/background/bump_pattern.png [deleted file]
assets/models/blend/background/metal.png [deleted file]
assets/models/blend/background/normal.png [deleted file]
assets/models/blend/background/roughness.png [deleted file]
assets/models/blend/backgrounds/wood/ao.png [new file with mode: 0644]
assets/models/blend/backgrounds/wood/ao_roughness_metal.png [new file with mode: 0644]
assets/models/blend/backgrounds/wood/background.blend [new file with mode: 0644]
assets/models/blend/backgrounds/wood/base.png [new file with mode: 0644]
assets/models/blend/backgrounds/wood/bump.png [new file with mode: 0644]
assets/models/blend/backgrounds/wood/bump_frame.png [new file with mode: 0644]
assets/models/blend/backgrounds/wood/bump_pattern.png [new file with mode: 0644]
assets/models/blend/backgrounds/wood/metal.png [new file with mode: 0644]
assets/models/blend/backgrounds/wood/normal.png [new file with mode: 0644]
assets/models/blend/backgrounds/wood/roughness.png [new file with mode: 0644]
assets/scenes/basketball.json
assets/scenes/box.json
assets/scenes/domino.json
assets/scenes/domino_box.json
assets/scenes/domino_box_basketball.json
assets/scenes/teeter_domino_box_basketball.json
assets/scenes/teeter_tooter.json
pmachines/editor/scene.py
pmachines/items/background.py
pmachines/scene/scene.py
tests/functional_test.py

index a0adf15d25a1aa7a8a35ba7fb72cd3a477ccb976..6f2ec6f85c1c7d1c302b799017d4db26ae12a6e0 100644 (file)
@@ -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 <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\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 \ 5mouse_l\ 5 pressed to drag an item\n"
-#~ "\n"
-#~ msgstr ""
-#~ "tieni premuto \ 5mouse_l\ 5 per trascinare un oggetto\n"
-#~ "\n"
+#~ msgid "Teeter tooter"
+#~ msgstr "Altalena"
 
-#~ msgid "keep \ 5mouse_r\ 5 pressed to rotate an item"
-#~ msgstr "tieni premuto \ 5mouse_r\ 5 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 \ 5mouse_l\ 5 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 \ 5mouse_r\ 5 pressed to rotate an item"
+#~ msgstr "tieni \\5mouse_r\\5 per ruotare un oggetto"
index 6d14833244ab1274963640af4e8b3496a4c2c8c7..d8e5b77cc704972128a897618f63275e74292907 100644 (file)
@@ -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 <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\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"
 "  \ 1scale\ 1Flavio Calva\ 2\n"
@@ -94,11 +230,11 @@ msgid ""
 "  \ 1scale\ 1Stefan Grossmann\ 2"
 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"
 "  \ 1scale\ 1rdb\ 2\n"
@@ -106,56 +242,123 @@ msgid ""
 "  \ 1scale\ 1Damiana Ercolani\ 2"
 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 \ 5mouse_l\ 5 pressed to drag an item\n"
-"\n"
+#: pmachines/gui/main_page.py:25
+msgid "Credits"
 msgstr ""
 
-msgid "keep \ 5mouse_r\ 5 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 \ 5mouse_l\ 5 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 \ 5mouse_r\ 5 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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
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 (file)
index 0000000..324ea17
Binary files /dev/null and b/assets/models/blend/backgrounds/wood/roughness.png differ
index 93ff646d6027b2335a99b7962638f07230172bd4..0e0a4c5a44db5455ce298a7ea28fa0f241c566dd 100644 (file)
@@ -1,4 +1,5 @@
 {
+  "background": "wood",
   "items": [
     {
       "class": "Shelf",
index d3d82f6758f963a1d32ce5cc959a6ac04b804a33..3ac92b7125b7e9bbd4f0020e9b78502012186e7a 100644 (file)
@@ -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": [
     {
       }
     ]
   },
-  "version": "8062bd34519a"
+  "version": "8f6333998c31"
 }
\ No newline at end of file
index 461ab216cd4c342ec8bd6c2f977aa3a2fd1f495e..08214072aa78476bcb7ebe8d015718ba64d02630 100644 (file)
@@ -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": [
     {
     ]
   },
   "version": "51b44031bbce"
-}
\ No newline at end of file
+}
index 87df60e67307387e86d2ca21a236d6263808b63d..7e4fd255a194bb29aefe9c5d8e276e5ba6d46ad6 100644 (file)
@@ -1,4 +1,5 @@
 {
+  "background": "wood",
   "items": [
     {
       "class": "Shelf",
index 6543fb73ac60327f1f8f2bb2b4a05e4665694291..f2f77929674baa6303d1d32ba888d7f5dcc57d27 100644 (file)
@@ -1,4 +1,5 @@
 {
+  "background": "wood",
   "items": [
     {
       "class": "Shelf",
index 5159a2807dada89b7f21007ed7b06afdbc664aff..5e5694daf5026fda63864de78f526d26a74c808d 100644 (file)
@@ -1,4 +1,5 @@
 {
+  "background": "wood",
   "items": [
     {
       "class": "Shelf",
index 63de0316391bba5e5216d96092a449f1e26438c8..8d559f08d8669566df709e6705a51b3bc4dbd06c 100644 (file)
@@ -1,4 +1,5 @@
 {
+  "background": "wood",
   "items": [
     {
       "class": "Shelf",
index d67203f43f6907d2e1879d8656812a7ab5b70480..da55021742cfe18e0d6d2dc3211e63f3f96a7ca0 100644 (file)
@@ -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()
index acf6b8ff9eb3fdb94d8e2cd62e1b35e62d1eb34e..d641496d2eea748eeb35c399fe9ba3cb93b94e6e 100644 (file)
@@ -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
index 60e08755caf77e32f8e06dd4d6166e8f5471861b..1bff770dfb3938fae283de67f48970612bd65b5d 100644 (file)
@@ -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:
index 2e21403af92e72f93d8871206ec6ec3e02accbd6..8a3396e9fa3c516400409529f1fe5c40c25b7b41 100644 (file)
@@ -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'])