forked from Diftic/SC_Signature_Scanner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
1629 lines (1376 loc) · 55.6 KB
/
Copy pathmain.py
File metadata and controls
1629 lines (1376 loc) · 55.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python3
"""
SC Signature Scanner
====================
Monitor Star Citizen screenshots for signature values and identify targets.
Features:
- Monitors screenshot folder for new images
- OCR detection of signature values
- Identifies asteroids, deposits from signature
- Overlay popup with match results
"""
import sys
# Show splash screen immediately (before heavy imports)
# splash.py only uses tkinter - no heavy dependencies
from splash import show_splash
_splash = show_splash()
# Now do the heavy imports with status updates
_splash.set_status("Loading core modules...")
import json
import threading
import tkinter as tk
from tkinter import ttk, filedialog, messagebox
from pathlib import Path
from datetime import datetime
from typing import Optional, List, Dict, Any, Tuple
# Path utilities (must be first for frozen exe support)
import paths
_splash.pump(10)
_splash.set_status("Loading OCR engine...")
# Load OCR in background thread to keep animation running
_scanner_module = None
_scanner_error = None
def _load_scanner():
global _scanner_module, _scanner_error
try:
import scanner as _mod
_scanner_module = _mod
except Exception as e:
_scanner_error = e
_loader_thread = threading.Thread(target=_load_scanner)
_loader_thread.start()
# Keep animation running while loading
while _loader_thread.is_alive():
_splash.pump(5)
_loader_thread.join()
if _scanner_error:
raise _scanner_error
SignatureScanner = _scanner_module.SignatureScanner
_splash.pump(10)
_splash.set_status("Loading UI components...")
from overlay import OverlayPopup, PositionAdjuster
_splash.pump(5)
from monitor import ScreenshotMonitor
_splash.pump(5)
from config import Config
from theme import RegolithTheme, WarningBanner, UpdateBanner, StatusIndicator
_splash.pump(10)
import version_checker
import region_selector
_splash.pump(10)
class SCSignatureScannerApp:
"""Main application class."""
VERSION = version_checker.CURRENT_VERSION
def __init__(self):
self.root = tk.Tk()
self.root.title(f"SC Signature Scanner")
self.root.resizable(False, False)
# Apply theme
RegolithTheme.apply(self.root)
# Center window on screen - wider layout
window_width = 850
window_height = 850
screen_width = self.root.winfo_screenwidth()
screen_height = self.root.winfo_screenheight()
x = (screen_width - window_width) // 2
y = (screen_height - window_height) // 2
self.root.geometry(f"{window_width}x{window_height}+{x}+{y}")
# Configuration
self.config = Config()
# Components
self.scanner: Optional[SignatureScanner] = None
self.monitor: Optional[ScreenshotMonitor] = None
self.overlay: Optional[OverlayPopup] = None
self._test_overlay: Optional[OverlayPopup] = None
# State
self.is_monitoring = False
self.processed_files = set()
self.overlay_position: Optional[Tuple[int, int]] = None
self.screenshot_count = 0
# Build UI (must be first - needed for dialogs)
self._create_ui()
# Check for updates (background, non-blocking)
self._check_for_updates()
def _create_ui(self):
"""Create the main UI."""
colors = RegolithTheme.COLORS
fonts = RegolithTheme.FONTS
# Main container
main_container = tk.Frame(self.root, bg=colors['bg_main'])
main_container.pack(fill=tk.BOTH, expand=True)
# === Header ===
header = tk.Frame(main_container, bg=colors['bg_dark'], pady=12)
header.pack(fill=tk.X)
# Title with icon
title_frame = tk.Frame(header, bg=colors['bg_dark'])
title_frame.pack()
title_icon = tk.Label(
title_frame,
text="📡",
bg=colors['bg_dark'],
font=('Segoe UI', 22)
)
title_icon.pack(side=tk.LEFT, padx=(0, 10))
title_text = tk.Frame(title_frame, bg=colors['bg_dark'])
title_text.pack(side=tk.LEFT)
title = tk.Label(
title_text,
text="SIGNATURE SCANNER",
bg=colors['bg_dark'],
fg=colors['accent_primary'],
font=('Segoe UI', 16, 'bold')
)
title.pack(anchor=tk.W)
subtitle = tk.Label(
title_text,
text=f"Star Citizen Target Identification • v{self.VERSION}",
bg=colors['bg_dark'],
fg=colors['text_muted'],
font=fonts['small']
)
subtitle.pack(anchor=tk.W)
memorial = tk.Label(
title_text,
text="✦ In memory of Regolith.Rocks — The Industrial Community",
bg=colors['bg_dark'],
fg=colors['text_muted'],
font=('Segoe UI', 7, 'italic')
)
memorial.pack(anchor=tk.W)
# Accent line
accent_line = tk.Frame(header, bg=colors['accent_primary'], height=2)
accent_line.pack(fill=tk.X, pady=(12, 0))
# Warning banner
self.warning_banner = WarningBanner(main_container, "Requires Windowed or Borderless Windowed mode")
self.warning_banner.pack(fill=tk.X, padx=15, pady=10)
# Update banner (created dynamically when update available)
self.update_banner_container = main_container
self.update_banner = None
# === Notebook (Tabs) ===
notebook = ttk.Notebook(main_container)
notebook.pack(fill=tk.BOTH, expand=True, padx=15, pady=(0, 15))
# === Scanner Tab ===
scanner_tab = tk.Frame(notebook, bg=colors['bg_main'])
notebook.add(scanner_tab, text=" Scanner ")
scanner_content = tk.Frame(scanner_tab, bg=colors['bg_main'], padx=5, pady=10)
scanner_content.pack(fill=tk.BOTH, expand=True)
# Screenshot folder section
folder_section = tk.Frame(scanner_content, bg=colors['bg_main'])
folder_section.pack(fill=tk.X, pady=(0, 10))
folder_label = tk.Label(
folder_section,
text="SCREENSHOT FOLDER",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
folder_label.pack(anchor=tk.W, pady=(0, 5))
folder_input = tk.Frame(folder_section, bg=colors['border'])
folder_input.pack(fill=tk.X)
folder_inner = tk.Frame(folder_input, bg=colors['bg_dark'], padx=2, pady=2)
folder_inner.pack(fill=tk.X, padx=1, pady=1)
self.folder_var = tk.StringVar()
folder_entry = tk.Entry(
folder_inner,
textvariable=self.folder_var,
bg=colors['bg_dark'],
fg=colors['text_primary'],
font=fonts['mono_small'],
relief='flat',
insertbackground=colors['accent_primary']
)
folder_entry.pack(side=tk.LEFT, fill=tk.X, expand=True, padx=8, pady=6)
browse_btn = tk.Button(
folder_inner,
text="Browse",
bg=colors['bg_light'],
fg=colors['text_primary'],
font=fonts['body'],
relief='flat',
padx=15,
pady=3,
cursor='hand2',
command=self._browse_folder
)
browse_btn.pack(side=tk.RIGHT, padx=(0, 4), pady=4)
# Status and controls row
control_row = tk.Frame(scanner_content, bg=colors['bg_main'])
control_row.pack(fill=tk.X, pady=(0, 10))
# Status section (left side)
status_border = tk.Frame(control_row, bg=colors['border'])
status_border.pack(side=tk.LEFT, fill=tk.X, expand=True, padx=(0, 10))
status_inner = tk.Frame(status_border, bg=colors['bg_light'], padx=12, pady=8)
status_inner.pack(fill=tk.X, padx=1, pady=1)
self.status_indicator = StatusIndicator(status_inner)
self.status_indicator.configure(bg=colors['bg_light'])
self.status_indicator.icon.configure(bg=colors['bg_light'])
self.status_indicator.label.configure(bg=colors['bg_light'])
self.status_indicator.pack(side=tk.LEFT)
self.stats_label = tk.Label(
status_inner,
text="0 screenshots processed",
bg=colors['bg_light'],
fg=colors['text_muted'],
font=fonts['small']
)
self.stats_label.pack(side=tk.RIGHT)
# Control buttons (right side)
btn_frame = tk.Frame(control_row, bg=colors['bg_main'])
btn_frame.pack(side=tk.RIGHT)
self.start_btn = tk.Button(
btn_frame,
text="▶ START MONITORING",
bg=colors['accent_primary'],
fg=colors['bg_dark'],
font=('Segoe UI', 10, 'bold'),
relief='flat',
padx=15,
pady=8,
cursor='hand2',
command=self._toggle_monitoring
)
self.start_btn.pack(side=tk.LEFT, padx=(0, 8))
test_btn = tk.Button(
btn_frame,
text="🧪 Test",
bg=colors['bg_light'],
fg=colors['text_primary'],
font=fonts['body'],
relief='flat',
padx=12,
pady=8,
cursor='hand2',
command=self._test_screenshot
)
test_btn.pack(side=tk.LEFT)
# Log section
log_label = tk.Label(
scanner_content,
text="DETECTION LOG",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
log_label.pack(anchor=tk.W, pady=(0, 5))
log_border = tk.Frame(scanner_content, bg=colors['border'])
log_border.pack(fill=tk.BOTH, expand=True)
log_inner = tk.Frame(log_border, bg=colors['bg_dark'])
log_inner.pack(fill=tk.BOTH, expand=True, padx=1, pady=1)
self.log_text = tk.Text(
log_inner,
bg=colors['bg_dark'],
fg=colors['text_secondary'],
font=fonts['mono_small'],
relief='flat',
padx=10,
pady=8,
height=12,
state=tk.DISABLED,
insertbackground=colors['accent_primary'],
selectbackground=colors['accent_primary'],
selectforeground=colors['bg_dark']
)
log_scroll = tk.Scrollbar(
log_inner,
orient=tk.VERTICAL,
command=self.log_text.yview,
bg=colors['bg_light'],
troughcolor=colors['bg_dark'],
width=12
)
self.log_text.configure(yscrollcommand=log_scroll.set)
self.log_text.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
log_scroll.pack(side=tk.RIGHT, fill=tk.Y)
# === Settings Tab ===
settings_tab = tk.Frame(notebook, bg=colors['bg_main'])
notebook.add(settings_tab, text=" Settings ")
settings_content = tk.Frame(settings_tab, bg=colors['bg_main'], padx=5, pady=10)
settings_content.pack(fill=tk.BOTH, expand=True)
# === Row 1: Scan Region + Popup Position (side by side) ===
row1 = tk.Frame(settings_content, bg=colors['bg_main'])
row1.pack(fill=tk.X, pady=(0, 10))
# Left: Scan Region
region_frame = tk.Frame(row1, bg=colors['bg_main'])
region_frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=True, padx=(0, 5))
region_label = tk.Label(
region_frame,
text="SCAN REGION",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
region_label.pack(anchor=tk.W, pady=(0, 5))
region_border = tk.Frame(region_frame, bg=colors['border'])
region_border.pack(fill=tk.BOTH, expand=True)
region_inner = tk.Frame(region_border, bg=colors['bg_light'], padx=12, pady=10)
region_inner.pack(fill=tk.BOTH, expand=True, padx=1, pady=1)
region_desc = tk.Label(
region_inner,
text="Define where signatures appear on screen",
bg=colors['bg_light'],
fg=colors['text_muted'],
font=fonts['small']
)
region_desc.pack(anchor=tk.W, pady=(0, 6))
region_row = tk.Frame(region_inner, bg=colors['bg_light'])
region_row.pack(fill=tk.X, pady=(0, 8))
self.region_label = tk.Label(
region_row,
text="Not configured",
bg=colors['bg_light'],
fg=colors['text_muted'],
font=fonts['mono']
)
self.region_label.pack(side=tk.LEFT)
region_btn_frame = tk.Frame(region_inner, bg=colors['bg_light'])
region_btn_frame.pack(fill=tk.X)
define_region_btn = tk.Button(
region_btn_frame,
text="📐 Define",
bg=colors['cyan'],
fg=colors['bg_dark'],
font=('Segoe UI', 9, 'bold'),
relief='flat',
padx=10,
pady=4,
cursor='hand2',
command=self._define_scan_region
)
define_region_btn.pack(side=tk.LEFT, padx=(0, 8))
clear_region_btn = tk.Button(
region_btn_frame,
text="✕ Clear",
bg=colors['bg_hover'],
fg=colors['text_primary'],
font=fonts['body'],
relief='flat',
padx=10,
pady=4,
cursor='hand2',
command=self._clear_scan_region
)
clear_region_btn.pack(side=tk.LEFT)
# Right: Popup Position
pos_frame = tk.Frame(row1, bg=colors['bg_main'])
pos_frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=True, padx=(5, 0))
pos_label = tk.Label(
pos_frame,
text="POPUP POSITION",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
pos_label.pack(anchor=tk.W, pady=(0, 5))
pos_border = tk.Frame(pos_frame, bg=colors['border'])
pos_border.pack(fill=tk.BOTH, expand=True)
pos_inner = tk.Frame(pos_border, bg=colors['bg_light'], padx=12, pady=10)
pos_inner.pack(fill=tk.BOTH, expand=True, padx=1, pady=1)
pos_desc = tk.Label(
pos_inner,
text="Where results overlay appears",
bg=colors['bg_light'],
fg=colors['text_muted'],
font=fonts['small']
)
pos_desc.pack(anchor=tk.W, pady=(0, 6))
pos_row = tk.Frame(pos_inner, bg=colors['bg_light'])
pos_row.pack(fill=tk.X, pady=(0, 8))
self.position_label = tk.Label(
pos_row,
text="Not set (centered)",
bg=colors['bg_light'],
fg=colors['text_muted'],
font=fonts['mono']
)
self.position_label.pack(side=tk.LEFT)
pos_btn_frame = tk.Frame(pos_inner, bg=colors['bg_light'])
pos_btn_frame.pack(fill=tk.X)
adjust_btn = tk.Button(
pos_btn_frame,
text="📍 Adjust",
bg=colors['cyan'],
fg=colors['bg_dark'],
font=('Segoe UI', 9, 'bold'),
relief='flat',
padx=10,
pady=4,
cursor='hand2',
command=self._adjust_position
)
adjust_btn.pack(side=tk.LEFT, padx=(0, 8))
reset_btn = tk.Button(
pos_btn_frame,
text="↺ Reset",
bg=colors['bg_hover'],
fg=colors['text_primary'],
font=fonts['body'],
relief='flat',
padx=10,
pady=4,
cursor='hand2',
command=self._reset_position
)
reset_btn.pack(side=tk.LEFT)
# Update labels on startup
self._update_region_label()
# === Row 2: Popup Duration + Popup Scale (side by side) ===
row2 = tk.Frame(settings_content, bg=colors['bg_main'])
row2.pack(fill=tk.X, pady=(0, 10))
# Left: Popup Duration
dur_frame = tk.Frame(row2, bg=colors['bg_main'])
dur_frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=True, padx=(0, 5))
dur_label = tk.Label(
dur_frame,
text="POPUP DURATION",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
dur_label.pack(anchor=tk.W, pady=(0, 5))
dur_border = tk.Frame(dur_frame, bg=colors['border'])
dur_border.pack(fill=tk.BOTH, expand=True)
dur_inner = tk.Frame(dur_border, bg=colors['bg_light'], padx=12, pady=10)
dur_inner.pack(fill=tk.BOTH, expand=True, padx=1, pady=1)
dur_row = tk.Frame(dur_inner, bg=colors['bg_light'])
dur_row.pack(fill=tk.X, pady=(5, 0))
self.duration_var = tk.IntVar(value=10)
dur_spin = tk.Spinbox(
dur_row,
from_=1,
to=30,
textvariable=self.duration_var,
width=5,
bg=colors['bg_dark'],
fg=colors['text_primary'],
font=fonts['mono'],
relief='flat',
buttonbackground=colors['bg_light']
)
dur_spin.pack(side=tk.LEFT)
dur_text = tk.Label(
dur_row,
text="seconds",
bg=colors['bg_light'],
fg=colors['text_secondary'],
font=fonts['body']
)
dur_text.pack(side=tk.LEFT, padx=(8, 0))
# Right: Popup Scale
scale_frame = tk.Frame(row2, bg=colors['bg_main'])
scale_frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=True, padx=(5, 0))
scale_label = tk.Label(
scale_frame,
text="POPUP SCALE",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
scale_label.pack(anchor=tk.W, pady=(0, 5))
scale_border = tk.Frame(scale_frame, bg=colors['border'])
scale_border.pack(fill=tk.BOTH, expand=True)
scale_inner = tk.Frame(scale_border, bg=colors['bg_light'], padx=12, pady=10)
scale_inner.pack(fill=tk.BOTH, expand=True, padx=1, pady=1)
scale_row = tk.Frame(scale_inner, bg=colors['bg_light'])
scale_row.pack(fill=tk.X, pady=(5, 0))
self.scale_var = tk.DoubleVar(value=1.0)
scale_label_min = tk.Label(
scale_row,
text="50%",
bg=colors['bg_light'],
fg=colors['text_muted'],
font=fonts['small']
)
scale_label_min.pack(side=tk.LEFT)
def update_scale_label(val):
self.scale_display.configure(text=f"{float(val):.0%}")
scale_slider = tk.Scale(
scale_row,
from_=0.5,
to=2.0,
resolution=0.1,
orient=tk.HORIZONTAL,
variable=self.scale_var,
bg=colors['bg_light'],
fg=colors['text_primary'],
highlightthickness=0,
troughcolor=colors['bg_dark'],
activebackground=colors['accent_primary'],
length=150,
showvalue=False,
command=update_scale_label
)
scale_slider.pack(side=tk.LEFT, padx=(5, 5))
scale_label_max = tk.Label(
scale_row,
text="200%",
bg=colors['bg_light'],
fg=colors['text_muted'],
font=fonts['small']
)
scale_label_max.pack(side=tk.LEFT)
self.scale_display = tk.Label(
scale_row,
text="100%",
bg=colors['bg_light'],
fg=colors['cyan'],
font=fonts['mono']
)
self.scale_display.pack(side=tk.LEFT, padx=(10, 0))
# === Row 5: Debug Output Folder (full width) ===
row5 = tk.Frame(settings_content, bg=colors['bg_main'])
row5.pack(fill=tk.X, pady=(0, 10))
debug_folder_label = tk.Label(
row5,
text="DEBUG OUTPUT FOLDER",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
debug_folder_label.pack(anchor=tk.W, pady=(0, 5))
debug_folder_border = tk.Frame(row5, bg=colors['border'])
debug_folder_border.pack(fill=tk.X)
debug_folder_inner = tk.Frame(debug_folder_border, bg=colors['bg_light'], padx=12, pady=10)
debug_folder_inner.pack(fill=tk.X, padx=1, pady=1)
debug_folder_desc = tk.Label(
debug_folder_inner,
text="Where debug images are saved (for testing/troubleshooting)",
bg=colors['bg_light'],
fg=colors['text_muted'],
font=fonts['small']
)
debug_folder_desc.pack(anchor=tk.W, pady=(0, 6))
debug_folder_row = tk.Frame(debug_folder_inner, bg=colors['bg_light'])
debug_folder_row.pack(fill=tk.X)
self.debug_folder_var = tk.StringVar()
debug_folder_entry = tk.Entry(
debug_folder_row,
textvariable=self.debug_folder_var,
bg=colors['bg_dark'],
fg=colors['text_primary'],
font=fonts['mono_small'],
relief='flat',
insertbackground=colors['accent_primary']
)
debug_folder_entry.pack(side=tk.LEFT, fill=tk.X, expand=True, padx=(0, 8), pady=2)
browse_debug_btn = tk.Button(
debug_folder_row,
text="📁 Browse",
bg=colors['cyan'],
fg=colors['bg_dark'],
font=('Segoe UI', 9, 'bold'),
relief='flat',
padx=10,
pady=4,
cursor='hand2',
command=self._browse_debug_folder
)
browse_debug_btn.pack(side=tk.LEFT, padx=(0, 8))
reset_debug_folder_btn = tk.Button(
debug_folder_row,
text="↺ Reset",
bg=colors['bg_hover'],
fg=colors['text_primary'],
font=fonts['body'],
relief='flat',
padx=10,
pady=4,
cursor='hand2',
command=self._reset_debug_folder
)
reset_debug_folder_btn.pack(side=tk.LEFT)
# === Row 6: Debug Mode + Action Buttons ===
row6 = tk.Frame(settings_content, bg=colors['bg_main'])
row6.pack(fill=tk.X, pady=(0, 10))
# Left: Debug Mode
debug_frame = tk.Frame(row6, bg=colors['bg_main'])
debug_frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=True, padx=(0, 5))
debug_label = tk.Label(
debug_frame,
text="DEBUG MODE",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
debug_label.pack(anchor=tk.W, pady=(0, 5))
debug_border = tk.Frame(debug_frame, bg=colors['border'])
debug_border.pack(fill=tk.BOTH, expand=True)
debug_inner = tk.Frame(debug_border, bg=colors['bg_light'], padx=12, pady=10)
debug_inner.pack(fill=tk.BOTH, expand=True, padx=1, pady=1)
debug_row = tk.Frame(debug_inner, bg=colors['bg_light'])
debug_row.pack(fill=tk.X, pady=(5, 0))
self.debug_var = tk.BooleanVar(value=False)
debug_check = tk.Checkbutton(
debug_row,
text="Enable debug output",
variable=self.debug_var,
bg=colors['bg_light'],
fg=colors['text_primary'],
font=fonts['body'],
selectcolor=colors['bg_dark'],
activebackground=colors['bg_light'],
activeforeground=colors['text_primary'],
command=self._toggle_debug
)
debug_check.pack(side=tk.LEFT)
open_debug_btn = tk.Button(
debug_row,
text="📂 Open",
bg=colors['bg_hover'],
fg=colors['text_primary'],
font=fonts['body'],
relief='flat',
padx=10,
pady=3,
cursor='hand2',
command=self._open_debug_folder
)
open_debug_btn.pack(side=tk.RIGHT)
# Right: Action Buttons
action_frame = tk.Frame(row6, bg=colors['bg_main'])
action_frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=True, padx=(5, 0))
action_label = tk.Label(
action_frame,
text="ACTIONS",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
action_label.pack(anchor=tk.W, pady=(0, 5))
action_border = tk.Frame(action_frame, bg=colors['border'])
action_border.pack(fill=tk.BOTH, expand=True)
action_inner = tk.Frame(action_border, bg=colors['bg_light'], padx=12, pady=10)
action_inner.pack(fill=tk.BOTH, expand=True, padx=1, pady=1)
action_row = tk.Frame(action_inner, bg=colors['bg_light'])
action_row.pack(fill=tk.X, pady=(5, 0))
test_popup_btn = tk.Button(
action_row,
text="🔔 Test Popup",
bg=colors['bg_hover'],
fg=colors['text_primary'],
font=fonts['body'],
relief='flat',
padx=12,
pady=4,
cursor='hand2',
command=self._test_popup
)
test_popup_btn.pack(side=tk.LEFT, padx=(0, 10))
save_btn = tk.Button(
action_row,
text="💾 Save Settings",
bg=colors['success'],
fg=colors['bg_dark'],
font=('Segoe UI', 9, 'bold'),
relief='flat',
padx=12,
pady=4,
cursor='hand2',
command=self._save_config
)
save_btn.pack(side=tk.LEFT)
# === About Tab ===
about_tab = tk.Frame(notebook, bg=colors['bg_main'])
notebook.add(about_tab, text=" About ")
about_content = tk.Frame(about_tab, bg=colors['bg_main'], padx=5, pady=10)
about_content.pack(fill=tk.BOTH, expand=True)
# Two-column layout for About
about_cols = tk.Frame(about_content, bg=colors['bg_main'])
about_cols.pack(fill=tk.BOTH, expand=True)
# Left column: Info + How to use
left_col = tk.Frame(about_cols, bg=colors['bg_main'])
left_col.pack(side=tk.LEFT, fill=tk.BOTH, expand=True, padx=(0, 10))
# Logo/Title
about_header = tk.Frame(left_col, bg=colors['bg_main'])
about_header.pack(fill=tk.X, pady=(0, 15))
about_title = tk.Label(
about_header,
text="📡 SC SIGNATURE SCANNER",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=('Segoe UI', 14, 'bold')
)
about_title.pack(anchor=tk.W)
about_ver = tk.Label(
about_header,
text=f"Version {self.VERSION}",
bg=colors['bg_main'],
fg=colors['text_muted'],
font=fonts['small']
)
about_ver.pack(anchor=tk.W)
desc_label = tk.Label(
left_col,
text="Monitors Star Citizen screenshots for signature\nvalues and identifies potential targets in real-time.\n\nMade by Mallachi, for Regolith.Rocks\nJanuary 2026",
bg=colors['bg_main'],
fg=colors['text_secondary'],
font=fonts['body'],
justify=tk.LEFT
)
desc_label.pack(anchor=tk.W, pady=(0, 15))
# How to use
howto_label = tk.Label(
left_col,
text="HOW TO USE",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
howto_label.pack(anchor=tk.W, pady=(0, 5))
howto_border = tk.Frame(left_col, bg=colors['border'])
howto_border.pack(fill=tk.X)
howto_inner = tk.Frame(howto_border, bg=colors['bg_light'], padx=12, pady=10)
howto_inner.pack(fill=tk.X, padx=1, pady=1)
steps = [
("1.", "Set SC to Windowed or Borderless"),
("2.", "Define the scan region in Settings"),
("3.", "Select your screenshot folder"),
("4.", "Click Start Monitoring"),
("5.", "In-game: PrintScreen on signature"),
("6.", "Overlay shows identification"),
]
for num, text in steps:
step_row = tk.Frame(howto_inner, bg=colors['bg_light'])
step_row.pack(fill=tk.X, pady=1)
num_label = tk.Label(
step_row,
text=num,
bg=colors['bg_light'],
fg=colors['accent_primary'],
font=fonts['mono'],
width=3
)
num_label.pack(side=tk.LEFT)
text_label = tk.Label(
step_row,
text=text,
bg=colors['bg_light'],
fg=colors['text_primary'],
font=fonts['small'],
anchor=tk.W
)
text_label.pack(side=tk.LEFT, fill=tk.X)
# Thanks to section
thanks_label = tk.Label(
left_col,
text="THANKS TO",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
thanks_label.pack(anchor=tk.W, pady=(15, 5))
thanks_border = tk.Frame(left_col, bg=colors['border'])
thanks_border.pack(fill=tk.X)
thanks_inner = tk.Frame(thanks_border, bg=colors['bg_light'], padx=12, pady=10)
thanks_inner.pack(fill=tk.X, padx=1, pady=1)
thanks_text = tk.Label(
thanks_inner,
text="Thank you to those who participated\n in the building and testing process\n - Raychaser - Regolith.Rocks\n - iambass - Test crew\n - Mavyre - Test crew",
bg=colors['bg_light'],
fg=colors['text_secondary'],
font=fonts['small'],
justify=tk.LEFT
)
thanks_text.pack(anchor=tk.W)
# Right column: Signature types
right_col = tk.Frame(about_cols, bg=colors['bg_main'])
right_col.pack(side=tk.LEFT, fill=tk.BOTH, expand=True, padx=(10, 0))
sig_label = tk.Label(
right_col,
text="SIGNATURE TYPES",
bg=colors['bg_main'],
fg=colors['accent_primary'],
font=fonts['subheading']
)
sig_label.pack(anchor=tk.W, pady=(0, 5))
sig_border = tk.Frame(right_col, bg=colors['border'])
sig_border.pack(fill=tk.X)
sig_inner = tk.Frame(sig_border, bg=colors['bg_light'], padx=12, pady=10)
sig_inner.pack(fill=tk.X, padx=1, pady=1)
sig_types = [
("🚀", "Ship Mining", "Asteroids & surface rocks — SC 4.7+"),
(None, None, "Signature = mineral identity (100% pure)"),
(None, None, "Legendary: 3170-3200 Epic: 3370-3400"),
(None, None, "Rare: 3540-3600 Uncommon: 3825-3900"),
(None, None, "Common: 4180-4300"),
("", "", ""),
("💎", "Ground", "Ground deposits - ROC or FPS"),
(None, None, "Small (3000) = FPS/Hand mining"),
(None, None, "Large (4000) = ROC/Vehicle"),
(None, None, "100% single mineral per cluster"),
("", "", ""),
("🔧", "Salvage", "Hull panels / Active FPS scrap"),
(None, None, "Panels (2000) = Hull scraping targets"),
(None, None, "Small Debris (1700) = Avenger-class wreck"),
(None, None, "Medium Debris (1850) = Ares Inferno wreck"),
(None, None, "Large Debris (2400) = C2 Hercules wreck"),
(None, None, "Capital Debris (3000) = 890 Jump wreck *"),
(None, None, "* 3000 collides with FPS ground deposit"),
]
for icon, name, desc in sig_types:
sig_row = tk.Frame(sig_inner, bg=colors['bg_light'])
sig_row.pack(fill=tk.X, pady=2)
if icon is not None:
# Normal row with icon and name
icon_label = tk.Label(
sig_row,
text=icon,
bg=colors['bg_light'],
font=('Segoe UI', 11),
width=2
)
icon_label.pack(side=tk.LEFT)
name_label = tk.Label(
sig_row,
text=name,
bg=colors['bg_light'],
fg=colors['text_primary'],
font=('Segoe UI', 10, 'bold'),
width=8,
anchor=tk.W
)
name_label.pack(side=tk.LEFT)
else:
# Continuation row - indent to align with description
spacer = tk.Label(
sig_row,
text="",
bg=colors['bg_light'],
width=10
)
spacer.pack(side=tk.LEFT)
desc_label = tk.Label(
sig_row,
text=desc,
bg=colors['bg_light'],
fg=colors['text_muted'],
font=fonts['small'],
anchor=tk.W