Skip to content

Commit 16f7937

Browse files
authored
Merge pull request #7 from ChocoScaff/color
Color
2 parents 9150f06 + ed09ca0 commit 16f7937

File tree

1 file changed

+29
-23
lines changed

1 file changed

+29
-23
lines changed

sourceSDK++.py

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
import shutil
1313
#from PIL import Image
1414
import git
15-
16-
15+
import ctypes as ct
1716

1817
class SourceSDK():
1918
selected_folder : string
@@ -341,50 +340,50 @@ def Init(folder=False):
341340
def button_init():
342341

343342
if os.path.isfile(sdk.bin_folder + "/hammer.exe"):
344-
sdk.btn_hammer = tk.Button(root, text="hammer", command=open_hammer,image=iconHammer,compound=tk.LEFT)
343+
sdk.btn_hammer = tk.Button(root, text="hammer", command=open_hammer,image=iconHammer,compound=tk.LEFT, background="#4c5844",fg="white")
345344
sdk.btn_hammer.pack(side="left")
346345

347346
if os.path.isfile(sdk.bin_folder + "/hammerplusplus.exe"):
348-
sdk.btn_hammer_plus_plus = tk.Button(root, text="hammer++", command=open_hammer_plus_plus, image=iconHpp, compound=tk.LEFT)
347+
sdk.btn_hammer_plus_plus = tk.Button(root, text="hammer++", command=open_hammer_plus_plus, image=iconHpp, compound=tk.LEFT, background="#4c5844",fg="white")
349348
sdk.btn_hammer_plus_plus.pack(side="left")
350349

351350
if os.path.isfile(sdk.bin_folder + "/hlmv.exe"):
352-
sdk.btn_hlmv = tk.Button(root, text="hlmv", command=open_hlmv, image=iconHLMV, compound=tk.LEFT)
351+
sdk.btn_hlmv = tk.Button(root, text="hlmv", command=open_hlmv, image=iconHLMV, compound=tk.LEFT, background="#4c5844",fg="white")
353352
sdk.btn_hlmv.pack(side="left")
354353

355354
if os.path.isfile(sdk.bin_folder + "/qc_eyes.exe"):
356-
sdk.btn_qc_eyes= tk.Button(root, text="qc_eyes", command=open_qc_eyes, image=iconQc_eyes, compound=tk.LEFT)
355+
sdk.btn_qc_eyes= tk.Button(root, text="qc_eyes", command=open_qc_eyes, image=iconQc_eyes, compound=tk.LEFT, background="#4c5844",fg="white")
357356
sdk.btn_qc_eyes.pack(side="left")
358357

359358
if os.path.isfile(sdk.bin_folder + "/hlfaceposer.exe"):
360-
sdk.btn_hlfaceposer = tk.Button(root, text="hlfaceposer", command=open_hlfaceposer, image=iconHlposer, compound=tk.LEFT)
359+
sdk.btn_hlfaceposer = tk.Button(root, text="hlfaceposer", command=open_hlfaceposer, image=iconHlposer, compound=tk.LEFT, background="#4c5844",fg="white")
361360
sdk.btn_hlfaceposer.pack(side="left")
362361

363362
if os.path.exists(sdk.selected_folder + "/src/games.sln"):
364-
sdk.btn_games = tk.Button(root, text="games", command=open_games, image=iconVisualStudio, compound=tk.LEFT)
363+
sdk.btn_games = tk.Button(root, text="games", command=open_games, image=iconVisualStudio, compound=tk.LEFT, background="#4c5844",fg="white")
365364
sdk.btn_games.pack(side="left")
366365

367366
if os.path.exists(sdk.selected_folder + "/src/everything.sln"):
368-
sdk.btn_everything = tk.Button(root, text="everything", command=open_everything, image=iconVisualStudio, compound=tk.LEFT)
367+
sdk.btn_everything = tk.Button(root, text="everything", command=open_everything, image=iconVisualStudio, compound=tk.LEFT, background="#4c5844",fg="white")
369368
sdk.btn_everything.pack(side="left")
370369

371-
sdk.btn_particle = tk.Button(root, text="Particle", command=particle, image=iconSource, compound=tk.LEFT)
370+
sdk.btn_particle = tk.Button(root, text="Particle", command=particle, image=iconSource, compound=tk.LEFT, background="#4c5844",fg="white")
372371
sdk.btn_particle.pack(side="left")
373372

374-
sdk.btn_Launch_dev = tk.Button(root, text="Launch Dev", command=Launch_dev, image=iconSource, compound=tk.LEFT)
373+
sdk.btn_Launch_dev = tk.Button(root, text="Launch Dev", command=Launch_dev, image=iconSource, compound=tk.LEFT, background="#4c5844",fg="white")
375374
sdk.btn_Launch_dev.pack(side="left")
376375

377-
sdk.btn_Launch = tk.Button(root, text="Launch", command=Launch, image=iconSource, compound=tk.LEFT)
376+
sdk.btn_Launch = tk.Button(root, text="Launch", command=Launch, image=iconSource, compound=tk.LEFT, background="#4c5844",fg="white")
378377
sdk.btn_Launch.pack(side="left")
379378

380379
if sdk.first_init == 0:
381-
sdk.texture_menu = tk.Menu(sdk.menu_bar, tearoff=0)
380+
sdk.texture_menu = tk.Menu(sdk.menu_bar, tearoff=0,background="#4c5844",fg="white")
382381
sdk.menu_bar.add_cascade(label="Texture", menu=sdk.texture_menu)
383-
sdk.map_menu = tk.Menu(sdk.menu_bar, tearoff=0)
382+
sdk.map_menu = tk.Menu(sdk.menu_bar, tearoff=0,background="#4c5844",fg="white")
384383
sdk.menu_bar.add_cascade(label="Map", menu=sdk.map_menu)
385-
sdk.model_menu = tk.Menu(sdk.menu_bar, tearoff=0)
384+
sdk.model_menu = tk.Menu(sdk.menu_bar, tearoff=0,background="#4c5844",fg="white")
386385
sdk.menu_bar.add_cascade(label="Model", menu=sdk.model_menu)
387-
sdk.other_menu = tk.Menu(sdk.menu_bar, tearoff=0)
386+
sdk.other_menu = tk.Menu(sdk.menu_bar, tearoff=0,background="#4c5844",fg="white")
388387
sdk.menu_bar.add_cascade(label="Other", menu=sdk.other_menu)
389388

390389
sdk.map_menu.add_command(label="Build Map", command=build_map)
@@ -601,11 +600,14 @@ def downbload_source_code():
601600

602601
download_github_code("https://github.com/ValveSoftware/source-sdk-2013", sdk.selected_folder + "/src/")
603602

604-
605603
shutil.rmtree(sdk.selected_folder + "/src/mp/")
606604
move_files(sdk.selected_folder + "/src/sp/src/", sdk.selected_folder + "/src/")
607605
shutil.rmtree(sdk.selected_folder + "/src/sp/")
608-
shutil.rmtree(sdk.selected_folder + "/src/.git/")
606+
607+
generate_games()
608+
generate_everything()
609+
610+
Init()
609611

610612
def download_github_code(repo_url, destination_folder):
611613
git.Repo.clone_from(repo_url, destination_folder)
@@ -631,11 +633,15 @@ def move_files(source_folder, destination_folder):
631633
root = tk.Tk()
632634
root.title("Source SDK")
633635

636+
root.tk_setPalette(background="#4c5844", foreground="white")
637+
638+
root.configure(background="#3e4637")
639+
634640
sdk.menu_bar = tk.Menu(root)
635-
root.config(menu=sdk.menu_bar)
641+
root.config(menu=sdk.menu_bar,background="#3e4637")
636642

637643
# Create a "File" menu
638-
file_menu = tk.Menu(sdk.menu_bar, tearoff=0)
644+
file_menu = tk.Menu(sdk.menu_bar, tearoff=0,background="#4c5844",fg="white")
639645
sdk.menu_bar.add_cascade(label="File", menu=file_menu)
640646

641647
# Add "Open" option to the "File" menu
@@ -645,9 +651,9 @@ def move_files(source_folder, destination_folder):
645651
#file_menu.add_cascade(label="Previous Projects", menu=previous_projects_menu)
646652
file_menu.add_command(label="Exit", command=launch_exit)
647653

648-
help_menu = tk.Menu(sdk.menu_bar, tearoff=0)
654+
help_menu = tk.Menu(sdk.menu_bar, tearoff=0,background="#4c5844",fg="white")
649655
sdk.menu_bar.add_cascade(label="Help", menu=help_menu)
650-
help_menu.add_command(label="About", command=open_about_window, )
656+
help_menu.add_command(label="About", command=open_about_window)
651657

652658
# Create a Text widget to display terminal output
653659
terminal = Terminal(root, wrap=tk.WORD, height=20, width=80)
@@ -657,7 +663,7 @@ def move_files(source_folder, destination_folder):
657663
sys.stdout = terminal
658664
sys.stderr = terminal
659665

660-
lbl_result = tk.Label(root, text="Tools", wraplength=400)
666+
lbl_result = tk.Label(root, text="Tools", wraplength=400, background="#3e4637",fg='white')
661667
lbl_result.pack()
662668

663669
# Bind keyboard shortcuts to the root window

0 commit comments

Comments
 (0)