UI update; enemy vehicle difficulty settings; minor adjustments

This commit is contained in:
Vasyl Horbachenko
2018-10-12 03:13:33 +03:00
parent 0015667829
commit 520a0f91fd
22 changed files with 165 additions and 120 deletions

View File

@@ -18,6 +18,9 @@ class ConfigurationMenu(Menu):
self.enemy_skill_var = StringVar()
self.enemy_skill_var.set(self.game.settings.enemy_skill)
self.enemy_vehicle_var = StringVar()
self.enemy_vehicle_var.set(self.game.settings.enemy_vehicle_skill)
self.takeoff_var = BooleanVar()
self.takeoff_var.set(self.game.settings.only_player_takeoff)
@@ -30,6 +33,7 @@ class ConfigurationMenu(Menu):
def dismiss(self):
self.game.settings.player_skill = self.player_skill_var.get()
self.game.settings.enemy_skill = self.enemy_skill_var.get()
self.game.settings.enemy_vehicle_skill = self.enemy_vehicle_var.get()
self.game.settings.only_player_takeoff = self.takeoff_var.get()
self.game.settings.night_disabled = self.night_var.get()
self.game.settings.cold_start = self.cold_start_var.get()
@@ -49,6 +53,7 @@ class ConfigurationMenu(Menu):
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)
Label(body, text="Enemy AA and vehicle skill", **STYLES["widget"]).grid(row=2, column=0, sticky=W)
p_skill = OptionMenu(body, self.player_skill_var, "Average", "Good", "High", "Excellent")
p_skill.grid(row=0, column=1, sticky=E, pady=5)
@@ -58,26 +63,30 @@ class ConfigurationMenu(Menu):
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)
e_skill = OptionMenu(body, self.enemy_vehicle_var, "Average", "Good", "High", "Excellent")
e_skill.grid(row=2, column=1, sticky=E)
e_skill.configure(**STYLES["btn-primary"])
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)
Label(body, text="Aircraft cold start", **STYLES["widget"]).grid(row=3, column=0, sticky=W)
Label(body, text="Takeoff only for player group", **STYLES["widget"]).grid(row=4, column=0, sticky=W)
Label(body, text="Disable night missions", **STYLES["widget"]).grid(row=5, column=0, sticky=W)
Button(body, text="Display logs", command=self.display_logs, **STYLES["btn-primary"]).grid(row=5, column=0, sticky=E, pady=30)
Button(body, text="Back", command=self.dismiss, **STYLES["btn-primary"]).grid(row=5, column=1, sticky=E, pady=30)
Checkbutton(body, variable=self.cold_start_var, **STYLES["radiobutton"]).grid(row=3, column=1, sticky=E)
Checkbutton(body, variable=self.takeoff_var, **STYLES["radiobutton"]).grid(row=5, column=1, sticky=E)
Checkbutton(body, variable=self.night_var, **STYLES["radiobutton"]).grid(row=5, column=1, sticky=E)
Label(body, text="Contributors: ", **STYLES["widget"]).grid(row=6, column=0, sticky=W)
Button(body, text="Display logs", command=self.display_logs, **STYLES["btn-primary"]).grid(row=6, column=0, sticky=E, pady=30)
Button(body, text="Back", command=self.dismiss, **STYLES["btn-primary"]).grid(row=6, column=1, sticky=E, pady=30)
Label(body, text="shdwp - author, maintainer", **STYLES["widget"]).grid(row=7, column=0, sticky=W)
Button(body, text="[github]", command=lambda: webbrowser.open_new_tab("http://github.com/shdwp"), **STYLES["widget"]).grid(row=7, column=1, sticky=E)
Label(body, text="Contributors: ", **STYLES["widget"]).grid(row=7, column=0, sticky=W)
Label(body, text="Khopa - contributions", **STYLES["widget"]).grid(row=8, column=0, sticky=W)
Button(body, text="[github]", command=lambda: webbrowser.open_new_tab("http://github.com/Khopa"), **STYLES["widget"]).grid(row=8, column=1, sticky=E)
Label(body, text="shdwp - author, maintainer", **STYLES["widget"]).grid(row=8, column=0, sticky=W)
Button(body, text="[github]", command=lambda: webbrowser.open_new_tab("http://github.com/shdwp"), **STYLES["widget"]).grid(row=9, column=1, sticky=E)
Button(body, text="Cheat +200m", command=self.cheat_money, **STYLES["btn-danger"]).grid(row=10, column=1, pady=30)
Label(body, text="Khopa - contributions", **STYLES["widget"]).grid(row=9, column=0, sticky=W)
Button(body, text="[github]", command=lambda: webbrowser.open_new_tab("http://github.com/Khopa"), **STYLES["widget"]).grid(row=9, column=1, sticky=E)
Button(body, text="Cheat +200m", command=self.cheat_money, **STYLES["btn-danger"]).grid(row=11, column=1, pady=30)
def display_logs(self):
raise ShowLogsException()