H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
206 stars 81 forks source link

Add Video Selector buttons for Video Options Menu GUI #1300

Closed Hazado closed 1 year ago

Hazado commented 1 year ago

PRP and other required files - https://github.com/H-uru/moul-assets/pull/206

Adds code for two new buttons in Trailer GUI First video in AVI directory is now first video played Ignores any videos smaller than 1000 bytes Videos will loop if you keep clicking buttons GUI will exit when video is over (retains previous behaviour)

Hoikas commented 1 year ago

These changes will error on non-Windows platforms due to the hard-coded use of Windows style paths (ie using blackslashes \).

Hazado commented 1 year ago

These changes will error on non-Windows platforms due to the hard-coded use of Windows style paths (ie using blackslashes \)

I used the wrong slash!!

Deledrius commented 1 year ago

os.path.join is a great way to let Python handle it. :)

Hoikas commented 1 year ago

Please use pathlib instead of os.path.

Deledrius commented 1 year ago

Ah, yes. Even better!

Hoikas commented 1 year ago

After discussion, pathlib cannot be used in Plasma because it imports urllib, which imports socket, which is disallowed.

Hazado commented 1 year ago

Okay, pushed a change I think will fix non-windows platforms breaking

dgelessus commented 1 year ago

After discussion, pathlib cannot be used in Plasma because it imports urllib, which imports socket, which is disallowed.

Does it? AFAICT, pathlib only imports urllib.parse and not e. g. urllib.request, so socket should never be imported.

Hoikas commented 1 year ago

@Deledrius do the latest revisions resolve your concerns?