mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Improved style of main menu, configuration menu, and base menu
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from tkinter import *
|
||||
from tkinter.ttk import *
|
||||
from .styles import STYLES
|
||||
|
||||
from ui.window import *
|
||||
|
||||
@@ -34,22 +35,36 @@ class ConfigurationMenu(Menu):
|
||||
def display(self):
|
||||
self.window.clear_right_pane()
|
||||
|
||||
Label(self.frame, text="Player coalition skill").grid(row=0, column=0)
|
||||
Label(self.frame, text="Enemy coalition skill").grid(row=1, column=0)
|
||||
# Header
|
||||
head = Frame(self.frame, **STYLES["header"])
|
||||
head.grid(row=0, column=0, columnspan=2, sticky=NSEW)
|
||||
Label(head, text="Configuration", **STYLES["title"]).grid()
|
||||
|
||||
OptionMenu(self.frame, self.player_skill_var, "Average", "Good", "High", "Excellent").grid(row=0, column=1)
|
||||
OptionMenu(self.frame, self.enemy_skill_var, "Average", "Good", "High", "Excellent").grid(row=1, column=1)
|
||||
# Body
|
||||
body = Frame(self.frame, **STYLES["body"])
|
||||
body.grid(row=1, column=0, sticky=NSEW)
|
||||
|
||||
Label(self.frame, text="Aircraft cold start").grid(row=2, column=0)
|
||||
Label(self.frame, text="Takeoff only for player group").grid(row=3, column=0)
|
||||
Label(self.frame, text="Disable night missions").grid(row=4, column=0)
|
||||
Label(body, text="Player coalition skill", **STYLES["widget"]).grid(row=0, column=0, sticky=W)
|
||||
Label(body, text="Enemy coalition skill", **STYLES["widget"]).grid(row=1, column=0, sticky=W)
|
||||
|
||||
Checkbutton(self.frame, variable=self.cold_start_var).grid(row=2, column=1)
|
||||
Checkbutton(self.frame, variable=self.takeoff_var).grid(row=3, column=1)
|
||||
Checkbutton(self.frame, variable=self.night_var).grid(row=4, column=1)
|
||||
p_skill = OptionMenu(body, self.player_skill_var, "Average", "Good", "High", "Excellent")
|
||||
p_skill.grid(row=0, column=1, sticky=E, pady=5)
|
||||
p_skill.configure(**STYLES["btn-primary"])
|
||||
|
||||
Button(self.frame, text="Back", command=self.dismiss).grid(row=5, column=0, columnspan=1)
|
||||
Button(self.frame, text="Cheat +200m", command=self.cheat_money).grid(row=6, column=1)
|
||||
e_skill = OptionMenu(body, self.enemy_skill_var, "Average", "Good", "High", "Excellent")
|
||||
e_skill.grid(row=1, column=1, sticky=E)
|
||||
e_skill.configure(**STYLES["btn-primary"])
|
||||
|
||||
Label(body, text="Aircraft cold start", **STYLES["widget"]).grid(row=2, column=0, sticky=W)
|
||||
Label(body, text="Takeoff only for player group", **STYLES["widget"]).grid(row=3, column=0, sticky=W)
|
||||
Label(body, text="Disable night missions", **STYLES["widget"]).grid(row=4, column=0, sticky=W)
|
||||
|
||||
Checkbutton(body, variable=self.cold_start_var, **STYLES["radiobutton"]).grid(row=2, column=1, sticky=E)
|
||||
Checkbutton(body, variable=self.takeoff_var, **STYLES["radiobutton"]).grid(row=3, column=1, sticky=E)
|
||||
Checkbutton(body, variable=self.night_var, **STYLES["radiobutton"]).grid(row=4, column=1, sticky=E)
|
||||
|
||||
Button(body, text="Back", command=self.dismiss, **STYLES["btn-primary"]).grid(row=5, column=1, sticky=E, pady=30)
|
||||
Button(body, text="Cheat +200m", command=self.cheat_money, **STYLES["btn-danger"]).grid(row=6, column=1)
|
||||
|
||||
def cheat_money(self):
|
||||
self.game.budget += 200
|
||||
|
||||
Reference in New Issue
Block a user