This is the fire options selection menu that I have not added logic too yet:
# Import module
from tkinter import *
import tkinter
from PIL import Image, ImageTk
import keyboard
import pynput
import pygame
pygame.init()
keys = pygame.key.get_pressed()
# Create object
root = tkinter.Tk()
# Adjust size
root.geometry("640x300")
root.configure(bg='black')
# Specify Grid
# options for grid:
# MINSIZE, PAD, UNIFORM, WEIGHT
# format (windowname,row/column,weight,uniform,pad)
Grid.rowconfigure(root,0,weight=1, uniform='a')
Grid.rowconfigure(root,1,weight=1, uniform='c')
Grid.rowconfigure(root,2,weight=1, uniform='b')
Grid.rowconfigure(root,3,weight=1, uniform='b')
Grid.rowconfigure(root,4,weight=1, uniform='b')
Grid.rowconfigure(root,5,weight=1, uniform='b')
Grid.rowconfigure(root,6,weight=1, uniform='e')
Grid.rowconfigure(root,7,weight=1, uniform='b')
Grid.rowconfigure(root,8,weight=1, uniform='b')
Grid.rowconfigure(root,9,weight=1, uniform='b')
Grid.columnconfigure(root,0,weight=1, uniform='d')
Grid.columnconfigure(root,1,weight=1, uniform='d')
Grid.columnconfigure(root,2,weight=1, uniform='d')
Grid.columnconfigure(root,3,weight=1, uniform='d')
Grid.columnconfigure(root,4,weight=1, uniform='d')
Grid.columnconfigure(root,5,weight=1, uniform='d')
Grid.columnconfigure(root,6,weight=1, uniform='d')
Grid.columnconfigure(root,7,weight=1, uniform='d')
#
#
# notes on different widget options other notes sections will be added for late rreference needs and
# desired customizations.
# w = Canvas (master, option-value
# bd, bg, cursor, highlight color, width, height
# w = CheckButton(master, option=value)
# Title, activebackground, activeforeground, bg, command, font, image
# w=Entry(master, option=value)
# bd, bg, cursor, command, highlightcolor, width, height
# w=Label(master, option=value)
# bg, bd, command, font, image, width, height
# w = Listbox(master, option=value)
# hightlightcolor, bg, bd, font, image, width, height
# w = MenuButton(master, option=value)
# activebackground, activeforeground, bg, bd, cursor, image, width, height, highlightcolor
# w = Scrollbar(master, option=value)
# width, activebackground, bg, bd, cursor
# w = Text(master, option=value)
# highlightcolor, insertbackground, bg, font, image, width, height
# w = tk.menu button(parent, option, ...)
# activebackground, activeforeground, anchor, background or bg, cursor, compound, direction, disabledforeground, fg, font, height, highlightbackground, highlightcolor, highlightthickness, image, justify, menu, padx, pady, relief, state, takefocus, text, textvariable, underline, width, wraplength
#
#
#
#image files
#photo = PhotoImage(file = r"c:\Menu_title.png") # old sentry gun menu title
# Specify Framesw = Frame(master, option=value)
# bg, bd, cursor, height, highlightbackground, highlightcolor, highlightthickness, relief, width
# Create Buttons
# master, option=value, ...
# activebackground, activeforeground, bd, bg, command, fg, font, height, highlightcolor, image, justify, padx, pady, relief, state, underline, width, wraplength
button_1 = Button(root,justify=CENTER,text="AUTO-REMOTE",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
button_2 = Button(root,justify=CENTER,text="HARD",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
button_3 = Button(root,justify=CENTER,text="SEMIHARD",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
button_4 = Button(root,justify=CENTER,text="SOFT",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
sbutton_1 = Button(root,justify=CENTER,text="BIO",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
sbutton_2 = Button(root,justify=CENTER,text="INERT",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
tsbutton_1 = Button(root,justify=CENTER,text="MULTI SPEC",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
tsbutton_2 = Button(root,justify=CENTER,text="INFRA RED",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
tsbutton_3 = Button(root,justify=CENTER,text="UV",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
wsbutton_1 = Button(root,justify=CENTER,text="SAFE",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
wsbutton_2 = Button(root,justify=CENTER,text="ARMED",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
isbutton_1 = Button(root,justify=CENTER,text="SEARCH",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
isbutton_2 = Button(root,justify=CENTER,text="TEST",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
isbutton_3 = Button(root,justify=CENTER,text="ENGAGED",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
isbutton_4 = Button(root,justify=CENTER,text="INTERROGATE",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
trbutton_1 = Button(root,justify=CENTER,text="AUTO",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
trbutton_2 = Button(root,justify=CENTER,text="SELECTIVE",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
smman = Button(root,justify=CENTER,text="MAN-OVERRIDE",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
smauto = Button(root,justify=CENTER,text="SEMI-AUTO",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
gun_1 = Button(root,borderwidth=7,bg='black',relief=RIDGE,disabledforeground='yellow',state=DISABLED,text="kp")
gun_2 = Button(root,borderwidth=7,bg='black',fg='yellow',disabledforeground='yellow',state=DISABLED,text="kp")
#header = Button(root, image = photo, compound = TOP) # image reference
headernew = Button(root, bg='black',command=root.quit, fg='yellow',disabledforeground='yellow',highlightbackground='yellow',borderwidth=2,justify=CENTER, text="UA 571-C \n REMOTE SENTRY WEAPON SYSTEM")
syst = Button(root,bg='black',state=DISABLED, fg='yellow',disabledforeground='yellow',highlightbackground='yellow',borderwidth=2,justify=CENTER,text="SYSTEM \n MODE")
weap = Button(root,bg='black',state=DISABLED, fg='yellow',disabledforeground='yellow',highlightbackground='yellow',borderwidth=2,justify=CENTER,text="WEAPON \n STATUS")
iff = Button(root,bg='black',state=DISABLED, fg='yellow',disabledforeground='yellow',highlightbackground='yellow',borderwidth=2,justify=CENTER,text="IFF \n STATUS")
test = Button(root,bg='black',state=DISABLED, fg='yellow',disabledforeground='yellow',highlightbackground='yellow',borderwidth=2,justify=CENTER,text="TEST \n ROUTINE")
target = Button(root,bg='black',state=DISABLED, fg='yellow',disabledforeground='yellow',highlightbackground='yellow',borderwidth=2,justify=CENTER,text="TARGET PROFILE")
spectral = Button(root,bg='black',state=DISABLED, fg='yellow',disabledforeground='yellow',highlightbackground='yellow',borderwidth=2,justify=CENTER,text="SPECTRAL PROFILE")
ts = Button(root,bg='black',state=DISABLED, fg='yellow',disabledforeground='yellow',highlightbackground='yellow',borderwidth=2,justify=CENTER,text="TARGET SELECT")
# bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black'
# Set grid
# widget.grid(grid_options)
# column, columnspan, ipadx, ipady, padx, pady, row, rowspan, sticky
gun_1.grid(row=0,column=0,ipadx=2,ipady=2,padx=2,pady=2,sticky=W)
gun_2.grid(row=0,column=7,ipadx=2,ipady=2,padx=2,pady=2,sticky=E)
headernew.grid(row=0,column=1,columnspan=6,sticky="NSEW")
button_1.grid(row=2,column=0,columnspan=2,sticky="NSEW")
button_2.grid(row=9,column=0,columnspan=3,sticky="NSEW")
button_3.grid(row=8,column=0,columnspan=3,sticky="NSEW")
button_4.grid(row=7,column=0,columnspan=3,sticky="NSEW")
sbutton_1.grid(row=7,column=3,columnspan=2,sticky="NSEW")
sbutton_2.grid(row=8,column=3,columnspan=2,sticky="NSEW")
tsbutton_1.grid(row=7,column=5,columnspan=3,sticky="NSEW")
tsbutton_2.grid(row=8,column=5,columnspan=3,sticky="NSEW")
tsbutton_3.grid(row=9,column=5,columnspan=3,sticky="NSEW")
wsbutton_1.grid(row=2,column=2,columnspan=2,sticky="NSEW")
wsbutton_2.grid(row=3,column=2,columnspan=2,sticky="NSEW")
isbutton_1.grid(row=2,column=4,columnspan=2,sticky="NSEW")
isbutton_2.grid(row=3,column=4,columnspan=2,sticky="NSEW")
isbutton_3.grid(row=4,column=4,columnspan=2,sticky="NSEW")
isbutton_4.grid(row=5,column=4,columnspan=2,sticky="NSEW")
trbutton_1.grid(row=2,column=6,columnspan=2,sticky="NSEW")
trbutton_2.grid(row=3,column=6,columnspan=2,sticky="NSEW")
smman.grid(row=3,column=0,columnspan=2,sticky="NSEW")
smauto.grid(row=4,column=0,columnspan=2,sticky="NSEW")
syst.grid(row=1,column=0,columnspan=2,sticky="NSEW")
weap.grid(row=1,column=2,columnspan=2,sticky="NSEW")
iff.grid(row=1,column=4,columnspan=2,sticky="NSEW")
test.grid(row=1,column=6,columnspan=2,sticky="NSEW")
target.grid(row=6,column=0,columnspan=3,sticky="NSEW")
spectral.grid(row=6,column=3,columnspan=2,sticky="NSEW")
ts.grid(row=6,column=5,columnspan=3,sticky="NSEW")
root.mainloop()
And this is the fire menu that I am trying to figure out how to add keypress count logic too:
# Import module
from tkinter import *
import tkinter
#from PIL import Image, ImageTk
import pygame
import keyboard
pygame.init()
#rounds = ammocounter()
#secsremain = seconds()
# Create object
root = tkinter.Tk()
# Adjust size
root.geometry("640x300")
root.configure(bg='black')
Grid.rowconfigure(root,0,weight=1, uniform='c')
Grid.rowconfigure(root,1,weight=1, uniform='b')
Grid.rowconfigure(root,2,weight=1, uniform='b')
Grid.rowconfigure(root,3,weight=1, uniform='b')
Grid.rowconfigure(root,4,weight=1, uniform='b')
Grid.rowconfigure(root,5,weight=1, uniform='b')
Grid.rowconfigure(root,6,weight=1, uniform='b')
Grid.rowconfigure(root,7,weight=1, uniform='b')
Grid.rowconfigure(root,8,weight=1, uniform='b')
#Grid.rowconfigure(root,9,weight=1, uniform='b')
Grid.columnconfigure(root,0,weight=1, uniform='a')
Grid.columnconfigure(root,1,weight=1, uniform='a')
Grid.columnconfigure(root,2,weight=1, uniform='a')
Grid.columnconfigure(root,3,weight=1, uniform='a')
Grid.columnconfigure(root,4,weight=1, uniform='a')
Grid.columnconfigure(root,5,weight=1, uniform='a')
#Grid.columnconfigure(root,6,weight=1, uniform='a')
#Grid.columnconfigure(root,7,weight=1, uniform='a')
gun_1 = Button(root, borderwidth=7,bg='black',fg='yellow',disabledforeground='yellow',state=DISABLED,text="kp")
gun_2 = Button(root, borderwidth=7,bg='black',fg='yellow',disabledforeground='yellow',state=DISABLED,text="kp")
headernew = Button(root, bg='black',state=DISABLED, fg='yellow',disabledforeground='yellow',highlightbackground='yellow',borderwidth=2,justify=CENTER, text="UA 571-C \n REMOTE SENTRY WEAPON SYSTEM")
rm = Button(root,justify=CENTER,text="R(M)",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
temp = Button(root,justify=CENTER,text="Temp",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
rmbar = Button(root,justify=CENTER,text="R",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
tempbar = Button(root,justify=CENTER,text="T",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
timer = Button(root,justify=CENTER,text="secsremain",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
rounds = Button(root,justify=CENTER,text="rounds",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
crit = Button(root,justify=CENTER,text="CRITICAL",bg='black', fg='yellow', highlightbackground='yellow', highlightcolor='black',activebackground='yellow')
roundsr = Button(root,bg='black',state=DISABLED, fg='yellow',disabledforeground='yellow',highlightbackground='yellow',borderwidth=2,justify=CENTER,text="Rounds \n Remaining")
timestat = Button(root,bg='black',state=DISABLED, fg='yellow',disabledforeground='yellow',highlightbackground='yellow',borderwidth=2,justify=CENTER,text="TIME AT 100% \n (secs)")
quit = Button(root, bg='black', fg='yellow', text='q', command=root.quit)
gun_1.grid(row=0,column=0,rowspan=2,sticky="NS")
gun_2.grid(row=0,column=5,rowspan=2,sticky="NS")
headernew.grid(row=0,column=1,columnspan=4,rowspan=2,sticky="NSEW")
tempbar.grid(row=3,column=4,rowspan=6,sticky="NSEW")
rmbar.grid(row=3,column=5,rowspan=6,sticky="NSEW")
rm.grid(row=2,column=5,sticky="NSEW")
temp.grid(row=2,column=4,sticky="NSEW")
timer.grid(row=7,column=2,columnspan=2,sticky="NS")
rounds.grid(row=3,column=2,columnspan=2,sticky="NS")
timestat.grid(row=7,column=0,columnspan=2,sticky="NSEW")
crit.grid(row=5,column=0,columnspan=2,sticky="NSEW")
roundsr.grid(row=3,column=0,columnspan=2,sticky="NS")
quit.grid(row=8,column=0,sticky="SW")
# Execute tkinter
root.after(200)
root.mainloop()