[ci] auto-format

This commit is contained in:
Freaku17 2023-08-05 13:43:03 +00:00 committed by github-actions[bot]
parent 6bd0adc2c3
commit 59b55cb152

View file

@ -8,7 +8,8 @@
from __future__ import annotations from __future__ import annotations
import _babase, babase import _babase
import babase
import bascenev1 as bs import bascenev1 as bs
import bauiv1 as bui import bauiv1 as bui
from bauiv1lib.mainmenu import MainMenuWindow from bauiv1lib.mainmenu import MainMenuWindow
@ -18,11 +19,11 @@ class Manual_camera_window:
def __init__(self): def __init__(self):
self._root_widget = bui.containerwidget( self._root_widget = bui.containerwidget(
on_outside_click_call=None, on_outside_click_call=None,
size=(0,0)) size=(0, 0))
button_size = (50,50) button_size = (50, 50)
self._text = bui.textwidget(parent=self._root_widget, self._text = bui.textwidget(parent=self._root_widget,
scale=0.65, scale=0.65,
color = (0.75, 0.75, 0.75), color=(0.75, 0.75, 0.75),
text='Cam Position', text='Cam Position',
size=(0, 0), size=(0, 0),
position=(500, 185), position=(500, 185),
@ -57,14 +58,14 @@ class Manual_camera_window:
position=(482, 2), position=(482, 2),
on_activate_call=babase.Call(self._change_camera_position, 'y-')) on_activate_call=babase.Call(self._change_camera_position, 'y-'))
self.inwards = bui.buttonwidget(parent=self._root_widget, self.inwards = bui.buttonwidget(parent=self._root_widget,
size=(100,30), size=(100, 30),
label='Zoom +', label='Zoom +',
button_type='square', button_type='square',
autoselect=True, autoselect=True,
position=(-550, -60), position=(-550, -60),
on_activate_call=babase.Call(self._change_camera_position, 'z-')) on_activate_call=babase.Call(self._change_camera_position, 'z-'))
self._outwards = bui.buttonwidget(parent=self._root_widget, self._outwards = bui.buttonwidget(parent=self._root_widget,
size=(100,30), size=(100, 30),
label='Zoom -', label='Zoom -',
button_type='square', button_type='square',
autoselect=True, autoselect=True,
@ -72,7 +73,7 @@ class Manual_camera_window:
on_activate_call=babase.Call(self._change_camera_position, 'z')) on_activate_call=babase.Call(self._change_camera_position, 'z'))
self.target_text = bui.textwidget(parent=self._root_widget, self.target_text = bui.textwidget(parent=self._root_widget,
scale=0.65, scale=0.65,
color = (0.75, 0.75, 0.75), color=(0.75, 0.75, 0.75),
text='Cam Angle', text='Cam Angle',
size=(0, 0), size=(0, 0),
position=(-462, 185), position=(-462, 185),
@ -108,7 +109,7 @@ class Manual_camera_window:
on_activate_call=babase.Call(self._change_camera_target, 'y-')) on_activate_call=babase.Call(self._change_camera_target, 'y-'))
self._step_text = bui.textwidget(parent=self._root_widget, self._step_text = bui.textwidget(parent=self._root_widget,
scale=0.85, scale=0.85,
color=(1,1,1), color=(1, 1, 1),
text='Step:', text='Step:',
size=(0, 0), size=(0, 0),
position=(450, -38), position=(450, -38),
@ -126,14 +127,14 @@ class Manual_camera_window:
v_align='center', v_align='center',
corner_scale=0.7) corner_scale=0.7)
self._reset = bui.buttonwidget(parent=self._root_widget, self._reset = bui.buttonwidget(parent=self._root_widget,
size=(50,30), size=(50, 30),
label='Reset', label='Reset',
button_type='square', button_type='square',
autoselect=True, autoselect=True,
position=(450, -100), position=(450, -100),
on_activate_call=babase.Call(self._change_camera_position, 'reset')) on_activate_call=babase.Call(self._change_camera_position, 'reset'))
self._done = bui.buttonwidget(parent=self._root_widget, self._done = bui.buttonwidget(parent=self._root_widget,
size=(50,30), size=(50, 30),
label='Done', label='Done',
button_type='square', button_type='square',
autoselect=True, autoselect=True,
@ -141,6 +142,7 @@ class Manual_camera_window:
on_activate_call=self._close) on_activate_call=self._close)
bui.containerwidget(edit=self._root_widget, bui.containerwidget(edit=self._root_widget,
cancel_button=self._done) cancel_button=self._done)
def _close(self): def _close(self):
bui.containerwidget(edit=self._root_widget, bui.containerwidget(edit=self._root_widget,
transition=('out_scale')) transition=('out_scale'))
@ -202,6 +204,7 @@ class Manual_camera_window:
old_refresh_in_game = MainMenuWindow._refresh_in_game old_refresh_in_game = MainMenuWindow._refresh_in_game
def my_refresh_in_game(self, *args, **kwargs): def my_refresh_in_game(self, *args, **kwargs):
value = old_refresh_in_game.__get__(self)(*args, **kwargs) value = old_refresh_in_game.__get__(self)(*args, **kwargs)
camera_button = bui.buttonwidget( camera_button = bui.buttonwidget(
@ -215,11 +218,14 @@ def my_refresh_in_game(self, *args, **kwargs):
on_activate_call=self._manual_camera) on_activate_call=self._manual_camera)
return value return value
def _manual_camera(self): def _manual_camera(self):
bui.containerwidget(edit=self._root_widget, transition='out_scale') bui.containerwidget(edit=self._root_widget, transition='out_scale')
Manual_camera_window() Manual_camera_window()
# ba_meta export plugin # ba_meta export plugin
class ByDroopy(babase.Plugin): class ByDroopy(babase.Plugin):
def __init__(self): def __init__(self):
MainMenuWindow._refresh_in_game = my_refresh_in_game MainMenuWindow._refresh_in_game = my_refresh_in_game