mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
[ci] auto-format
This commit is contained in:
parent
6bd0adc2c3
commit
59b55cb152
1 changed files with 127 additions and 121 deletions
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
|
||||
from __future__ import annotations
|
||||
import _babase, babase
|
||||
import _babase
|
||||
import babase
|
||||
import bascenev1 as bs
|
||||
import bauiv1 as bui
|
||||
from bauiv1lib.mainmenu import MainMenuWindow
|
||||
|
|
@ -18,11 +19,11 @@ class Manual_camera_window:
|
|||
def __init__(self):
|
||||
self._root_widget = bui.containerwidget(
|
||||
on_outside_click_call=None,
|
||||
size=(0,0))
|
||||
button_size = (50,50)
|
||||
size=(0, 0))
|
||||
button_size = (50, 50)
|
||||
self._text = bui.textwidget(parent=self._root_widget,
|
||||
scale=0.65,
|
||||
color = (0.75, 0.75, 0.75),
|
||||
color=(0.75, 0.75, 0.75),
|
||||
text='Cam Position',
|
||||
size=(0, 0),
|
||||
position=(500, 185),
|
||||
|
|
@ -57,14 +58,14 @@ class Manual_camera_window:
|
|||
position=(482, 2),
|
||||
on_activate_call=babase.Call(self._change_camera_position, 'y-'))
|
||||
self.inwards = bui.buttonwidget(parent=self._root_widget,
|
||||
size=(100,30),
|
||||
size=(100, 30),
|
||||
label='Zoom +',
|
||||
button_type='square',
|
||||
autoselect=True,
|
||||
position=(-550, -60),
|
||||
on_activate_call=babase.Call(self._change_camera_position, 'z-'))
|
||||
self._outwards = bui.buttonwidget(parent=self._root_widget,
|
||||
size=(100,30),
|
||||
size=(100, 30),
|
||||
label='Zoom -',
|
||||
button_type='square',
|
||||
autoselect=True,
|
||||
|
|
@ -72,7 +73,7 @@ class Manual_camera_window:
|
|||
on_activate_call=babase.Call(self._change_camera_position, 'z'))
|
||||
self.target_text = bui.textwidget(parent=self._root_widget,
|
||||
scale=0.65,
|
||||
color = (0.75, 0.75, 0.75),
|
||||
color=(0.75, 0.75, 0.75),
|
||||
text='Cam Angle',
|
||||
size=(0, 0),
|
||||
position=(-462, 185),
|
||||
|
|
@ -108,7 +109,7 @@ class Manual_camera_window:
|
|||
on_activate_call=babase.Call(self._change_camera_target, 'y-'))
|
||||
self._step_text = bui.textwidget(parent=self._root_widget,
|
||||
scale=0.85,
|
||||
color=(1,1,1),
|
||||
color=(1, 1, 1),
|
||||
text='Step:',
|
||||
size=(0, 0),
|
||||
position=(450, -38),
|
||||
|
|
@ -126,14 +127,14 @@ class Manual_camera_window:
|
|||
v_align='center',
|
||||
corner_scale=0.7)
|
||||
self._reset = bui.buttonwidget(parent=self._root_widget,
|
||||
size=(50,30),
|
||||
size=(50, 30),
|
||||
label='Reset',
|
||||
button_type='square',
|
||||
autoselect=True,
|
||||
position=(450, -100),
|
||||
on_activate_call=babase.Call(self._change_camera_position, 'reset'))
|
||||
self._done = bui.buttonwidget(parent=self._root_widget,
|
||||
size=(50,30),
|
||||
size=(50, 30),
|
||||
label='Done',
|
||||
button_type='square',
|
||||
autoselect=True,
|
||||
|
|
@ -141,6 +142,7 @@ class Manual_camera_window:
|
|||
on_activate_call=self._close)
|
||||
bui.containerwidget(edit=self._root_widget,
|
||||
cancel_button=self._done)
|
||||
|
||||
def _close(self):
|
||||
bui.containerwidget(edit=self._root_widget,
|
||||
transition=('out_scale'))
|
||||
|
|
@ -202,6 +204,7 @@ class Manual_camera_window:
|
|||
|
||||
old_refresh_in_game = MainMenuWindow._refresh_in_game
|
||||
|
||||
|
||||
def my_refresh_in_game(self, *args, **kwargs):
|
||||
value = old_refresh_in_game.__get__(self)(*args, **kwargs)
|
||||
camera_button = bui.buttonwidget(
|
||||
|
|
@ -215,11 +218,14 @@ def my_refresh_in_game(self, *args, **kwargs):
|
|||
on_activate_call=self._manual_camera)
|
||||
return value
|
||||
|
||||
|
||||
def _manual_camera(self):
|
||||
bui.containerwidget(edit=self._root_widget, transition='out_scale')
|
||||
Manual_camera_window()
|
||||
|
||||
# ba_meta export plugin
|
||||
|
||||
|
||||
class ByDroopy(babase.Plugin):
|
||||
def __init__(self):
|
||||
MainMenuWindow._refresh_in_game = my_refresh_in_game
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue