bombsquad-community / plugin-manager

A Plugin Manager for Bombsquad 1.7+
https://bombsquad-community.web.app/pluginmanager
Other
39 stars 28 forks source link

Fixed menu_theme and added checks for from_window #211

Closed Loup-Garou911XD closed 6 months ago

Loup-Garou911XD commented 7 months ago

this needs testing which i cant do rn

Loup-Garou911XD commented 7 months ago

i tested on 1.7.27 works perfectly fine though the issue #212 is also applicable here so both can be fixed together

Loup-Garou911XD commented 7 months ago

closes #212

rikkolovescats commented 7 months ago

menu theme from this pr works fine with 1.7.30?

Freaku17 commented 7 months ago

@Loup-Garou911XD It's broken on 1.7.26 or lower. Following two errors:

  1. File "/storage/emulated/0/Android/data/net.froemling.bombsquad_/files/mods/menu_theme.py", line 1168, in on_transition_in vr_mode = env.vr ^^^^^^ AttributeError: 'Dummy' object has no attribute 'vr'

  2. File "/storage/emulated/0/Android/data/net.froemling.bombsquad_/files/mods/plugin_manager.py", line 2447, in _do_advanced bui.app.ui_v1.set_main_menu_window( TypeError: UIV1Subsystem.set_main_menu_window() got an unexpected keyword argument 'from_window'

Works well for 1.7.30, and this warning is also seen;

set_main_menu_window() should be passed a 'from_window' value to help ensure proper UI behavior (/storage/emulated/0/Android/data/net.froemling.bombsquad/files/mods/menu_theme.py line 1401).

Loup-Garou911XD commented 7 months ago

menu theme from this pr works fine with 1.7.30?

Yes it works with 1.7.27 and 1.7.30 except for https://github.com/bombsquad-community/plugin-manager/issues/213 But not with 1.7.26

Loup-Garou911XD commented 7 months ago

@Loup-Garou911XD It's broken on 1.7.26 or lower. Following two errors:

  1. File "/storage/emulated/0/Android/data/net.froemling.bombsquad_/files/mods/menu_theme.py", line 1168, in on_transition_in vr_mode = env.vr ^^^^^^ AttributeError: 'Dummy' object has no attribute 'vr'

  2. File "/storage/emulated/0/Android/data/net.froemling.bombsquad_/files/mods/plugin_manager.py", line 2447, in _do_advanced bui.app.ui_v1.set_main_menu_window( TypeError: UIV1Subsystem.set_main_menu_window() got an unexpected keyword argument 'from_window'

Works well for 1.7.30, and this warning is also seen;

set_main_menu_window() should be passed a 'from_window' value to help ensure proper UI behavior (/storage/emulated/0/Android/data/net.froemling.bombsquad/files/mods/menu_theme.py line 1401).

Would need something like https://github.com/bombsquad-community/plugin-manager/blob/main/plugin_manager.py#L44-L66 to fix it