Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmiglio committed Sep 24, 2024
1 parent 294e73d commit d65e3b8
Showing 1 changed file with 82 additions and 71 deletions.
153 changes: 82 additions & 71 deletions src/pyclashbot/interface/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import PySimpleGUI as sg
from PySimpleGUI import Window

from pyclashbot.bot import account_switching
from pyclashbot.interface.controls import job_increment_controls
from pyclashbot.interface.joblist import jobs_checklist
from pyclashbot.interface.stats import (
battle_stats,
Expand All @@ -19,72 +17,84 @@

sg.theme(THEME)

jobs_frame = sg.Frame(layout=jobs_checklist, title="Jobs", expand_x=False, expand_y=True,border_width=None,pad=0)
jobs_frame = sg.Frame(
layout=jobs_checklist,
title="Jobs",
expand_x=False,
expand_y=True,
border_width=None,
pad=0,
)
account_switching_switching_frame = sg.Frame(
layout=[
[sg.Checkbox(
"Enabled",
key="account_switching_toggle",
default=False,
),],[

sg.Slider(
range=(1, 3),
orientation="h",
key="account_switching_slider",
size=(10, 20),
),
],

],
title="Account Switching",
expand_x=True,
pad=0
)
layout=[
[
sg.Checkbox(
"Enabled",
key="account_switching_toggle",
default=False,
),
],
[
sg.Slider(
range=(1, 3),
orientation="h",
key="account_switching_slider",
size=(10, 20),
),
],
],
title="Account Switching",
expand_x=True,
pad=0,
)
memu_settings_frame = sg.Frame(
layout=[
[
sg.Checkbox(
"Dock MEmu",
key="memu_attach_mode_toggle",
default=False,
),
],


[

sg.Radio(
enable_events=True,
text="OpenGL",
group_id="render_mode_radio",
default=True,
key="opengl_toggle",
pad=1,
),

],[sg.Radio(
enable_events=True,
text="DirectX",
group_id="render_mode_radio",
key="directx_toggle",
pad=1,
),],
],
title="Memu Settings",
expand_y=True,
expand_x=True,
pad=0
)

layout=[
[
sg.Checkbox(
"Dock MEmu",
key="memu_attach_mode_toggle",
default=False,
),
],
[
sg.Radio(
enable_events=True,
text="OpenGL",
group_id="render_mode_radio",
default=True,
key="opengl_toggle",
pad=1,
),
],
[
sg.Radio(
enable_events=True,
text="DirectX",
group_id="render_mode_radio",
key="directx_toggle",
pad=1,
),
],
],
title="Memu Settings",
expand_y=True,
expand_x=True,
pad=0,
)


controls_layout = [
[
sg.Frame(layout = [[jobs_frame]],title = '',expand_y=True,border_width=0,pad=0),
sg.Frame(layout = [[memu_settings_frame],[account_switching_switching_frame]],title = '',border_width=0,pad=0,expand_x=True,expand_y=True),
[
sg.Frame(layout=[[jobs_frame]], title="", expand_y=True, border_width=0, pad=0),
sg.Frame(
layout=[[memu_settings_frame], [account_switching_switching_frame]],
title="",
border_width=0,
pad=0,
expand_x=True,
expand_y=True,
),
]

]

stats_tab_layout = [
Expand All @@ -97,7 +107,7 @@
title="Battle Stats",
expand_y=False,
expand_x=True,
pad=0
pad=0,
),
],
[
Expand All @@ -106,7 +116,7 @@
title="Bot Stats",
expand_x=False,
expand_y=True,
pad=0
pad=0,
),
],
],
Expand All @@ -120,13 +130,13 @@
layout=collection_stats,
title="Collection Stats",
expand_y=True,
pad=0
pad=0,
),
],
],
justification="right",
expand_y=True,
pad=0
pad=0,
),
],
]
Expand Down Expand Up @@ -161,8 +171,9 @@
layout=[
[sg.Tab("Controls", controls_layout)],
[sg.Tab("Stats", stats_tab_layout)],
],border_width=0,pad=0

],
border_width=0,
pad=0,
),
],
],
Expand All @@ -175,20 +186,20 @@
"Start",
button_color="Lime Green",
border_width=3,
size = (10,1),
size=(10, 1),
),
sg.Button(
"Stop",
disabled=True,
button_color="Red",
border_width=2,
size = (10,1),
size=(10, 1),
),
sg.Button(
"Collapse",
key="-Collapse-Button-",
border_width=2,
size = (10,1),
size=(10, 1),
),
],
[time_status_bar_layout],
Expand Down

0 comments on commit d65e3b8

Please sign in to comment.