Exemplo n.º 1
0
	def inventory(self):
		self.clear_screen1();
		hintergrund = self.hintergrund;
		
		Label(hintergrund, text="Inventar", font=gui_content.ch_fontsize("16"), bg="green"). place(y=functions.pro_size(1,1), x=functions.pro_size(50,0), anchor=N);
		Button(hintergrund, text="Zurück", command=self.hub_menu, font=gui_content.ch_fontsize("16"), bg="green"). place(y=functions.pro_size(5,1), x=functions.pro_size(50,0), anchor=N);
		
		inventar1 = Canvas(hintergrund, width=functions.pro_size(90,0), height=functions.pro_size(80,1));
		inventar1.place(anchor=N, x=functions.pro_size(50,0), y=functions.pro_size(10,1));
		inventar = functions.VerticalScrolledFrame(inventar1);
		inventar.place(width=functions.pro_size(90,0), height=functions.pro_size(80,1));
		
		inventar_content = functions.get_inventory();
		if len(inventar_content) == 0:
			Label(inventar.interior, text="Keine Items", font=gui_content.ch_fontsize("32")).place(x=functions.pro_size(50,0), y=functions.pro_size(50,1), anchor=CENTER);
		else:
		
			xrow = 0;
			for inv, value in inventar_content.items():
				xrow +=1
				setattr(self, "inv_canvas"+str(xrow), Canvas(inventar.interior, bg="green", width=functions.pro_size(90,0), height=functions.pro_size(9,1)));
				getattr(self, "inv_canvas"+str(xrow)).grid(row=xrow);
				Label(getattr(self, "inv_canvas"+str(xrow)), text=inv, font=gui_content.ch_fontsize("40"), bg="green", fg="white").place(x=functions.pro_size(1,0), y=functions.pro_size(4.5,1), anchor=W);
				Label(getattr(self, "inv_canvas"+str(xrow)), text="Anzahl: "+str(value), fg="white",bg="green").place(y=functions.pro_size(9,1), x=functions.pro_size(88,0), anchor=SE);
				Button(getattr(self, "inv_canvas"+str(xrow)), command=partial(self.useitem, inv), text="Verwenden", fg="white",bg="green").place(y=functions.pro_size(9,1), x=functions.pro_size(78,0), anchor=SE);
Exemplo n.º 2
0
def garageerror(gui, veh):
    gui.clear_screen()
    back = gui.hintergrund()
    back.pack()
    gd = functions.get_gamedata()

    Label(back,
          text="Die Garage von " + gd["place"] + "ist voll.",
          bg="Gold2",
          fg="red",
          font=gui_content.ch_fontsize("32")).grid(row=1,
                                                   column=1,
                                                   columnspan=2,
                                                   sticky=NSEW)
    Button(back,
           text="Fahrzeug " + veh["name"] + " zerstören.",
           command=partial(hub, gui),
           font=gui_content.ch_fontsize("16"),
           bg="green").grid(row=2, column=1, sticky=NSEW)
    Button(back,
           text="Zu einem anderen Ort fahren.",
           command=partial(enterveh, gui, veh),
           font=gui_content.ch_fontsize("16"),
           bg="green").grid(row=2, column=2, sticky=NSEW)

    back.grid_rowconfigure(0, weight=1)
    back.grid_rowconfigure(3, weight=1)
    back.grid_columnconfigure(0, weight=1)
    back.grid_columnconfigure(3, weight=1)
Exemplo n.º 3
0
	def label(self):
		self.clear_screen();
		frame = Frame(self.hintergrund, bg="blue");
		Label(frame, text="Aktueller Server: "+self.net, font=gui_content.ch_fontsize("15"), bg="blue", fg="white").pack();
		Button(frame, text="Ändern", command=self.select_server, font=gui_content.ch_fontsize("12"), bg="green").pack();
		frame.place(x=10, y=10);
		
		Label(self.hintergrund, text="Was möchtest du updaten?", font=gui_content.ch_fontsize("16"),bg="blue", fg="white").place(x=375, y=250);
		gui_content.button(self.hintergrund, "Charakter-Index", 400, 350, self.caracter_index, gui_content.ch_fontsize("16"), ["green", "black"], [150, 50]);
		Button(self.hintergrund, text="Events", command=self.event, font=gui_content.ch_fontsize("16"), bg="green", bd=8).place(x=400, y=420, width=150, height=50);
		gui_content.button(self.hintergrund, "Alles", 400, 490, self.all, gui_content.ch_fontsize("16"), ["green", "black"], [150, 50]);
		self.root.mainloop();
Exemplo n.º 4
0
    def update(self):
        self.clear_screen()
        hintergrund1 = self.hintergrund()
        hintergrund1.pack()

        def run_updater():
            import update

        Label(hintergrund1,
              text="UPDATER LÄUFT",
              font=gui_content.ch_fontsize("32")).place(x=180, y=300)
        gui_content.button(hintergrund1, "Fertig!", 250, 350, self.main_menu,
                           gui_content.ch_fontsize("20"))
        self.content_frame.after(0, run_updater)

        self.content_frame.mainloop()
Exemplo n.º 5
0
def overlay(*back, **gui):
	if hasattr(gui["gui"], "last_event"):
		#Label(back[0], bg="White", width=functions.pro_size(1,0), height=functions.pro_size(1,1)).place(y=functions.pro_size(1,1), x=functions.pro_size(80,0), anchor=N)
		i=0;
		for text in gui["gui"].texts:
			i+=1;
			i2=(i-1)*2.5+1;
			if not i > 5:
				Label(back[0], bg="Gold2", text=text[0], font=gui_content.ch_fontsize("15"), fg=text[1]).place(y=functions.pro_size(i2,1),x=functions.pro_size(80,0), anchor=NW);
Exemplo n.º 6
0
	def hub_menu(self):
		gd = functions.get_gamedata();
		self.clear_screen1();
		menu = Canvas(self.hintergrund, bg="gold2", highlightthickness=0);
		menu.place(x=functions.pro_size(5,0), y=functions.pro_size(5,1));
		Button(menu, text="Inventar", command=self.inventory, width=functions.pro_size(1,0), font=gui_content.ch_fontsize(16)).grid(row=1);
		check=True;
		try:
			exec("print(\""+str(gd["travel"])+"\")");
		except:
			check=False;
		if check:
			Label(menu, text="Aktuelle Reise: \nZiel: "+gd["travel"]["destination"]+"\nAnkunft in: "+str(gd["travel"]["steps"]), bg="Gold2", font=gui_content.ch_fontsize(16)).grid(row=1,column=1,sticky=W);
		else:
			Label(menu, text="Aktuelle Reise: \nKeine", bg="Gold2", font=gui_content.ch_fontsize(16)).grid(row=1,column=1,sticky=W);
			Button(menu, text="Ort ansteuern", command=self.travel, font=gui_content.ch_fontsize(16)).grid(row=2,column=1,sticky=W);
		Button(menu, text="Fraktions-Übersicht", command=self.factions, font=gui_content.ch_fontsize(16)).grid(row=1,column=2,sticky=W);
		
		Button(self.hintergrund, text="Weiter gehen", command=self.hintergrund.quit, font=gui_content.ch_fontsize("16")).place(x=functions.pro_size(50,0), y=functions.pro_size(85,1), anchor=CENTER);
Exemplo n.º 7
0
	def select_server(self):
		self.clear_screen();
		self.getback = Label(self.hintergrund, text="Server-Auswahl", font=gui_content.ch_fontsize("20"), bg="blue", fg="white");
		self.getback.place(x=375, y=100);
		
		def standart():
			self.net = "iedsoftworks.net";
			self.label();
		
		if not self.std_server:
			Label(self.hintergrund, text="Standart-Server nicht erreicht", font=gui_content.ch_fontsize("13"), bg="blue", fg="white").place(x=200, y=200);
		else:
			Button(self.hintergrund, text="Standart-Server", command=standart, font=gui_content.ch_fontsize("14"), bd=8, bg="green").place(x=200, y=200);
		
		custom_server_frame = Frame(self.hintergrund, bg="blue");
		Label(custom_server_frame, text="Custom Server / Mods", bg="blue", fg="white", font=gui_content.ch_fontsize("16")).pack();
		custom_server_frame.place(x=500,y=170);
		self.custom_server_input = Entry(custom_server_frame, font=gui_content.ch_fontsize("13"))
		self.custom_server_input.pack();
		Button(custom_server_frame, text="Übernehmen", command=self.custom_server, bd=8, font=gui_content.ch_fontsize("16"),bg="green").pack();
		self.root.mainloop();
Exemplo n.º 8
0
	def ping(self):
		self.clear_screen();
		x=Message(self.hintergrund, font=gui_content.ch_fontsize("16"), text="VERBINDUNG ZUM STANDART-SERVER\nWIRD ÜBERPRÜFT!\n(iedsoftworks.com)", width=500, bg="blue", fg="white").place(x=200, y=200);
		self.root.after(100, self.root.quit);
		self.root.mainloop();
		check_server = os.system("ping iedsoftworks.com");
		if check_server != 0:
			x.config(text="ALLGEMEINE INTERNETVERBINDUNG\nWIRD GETESTET!\n(google.com)");
			self.root.after(100, self.root.quit);
			self.root.mainloop();
			check_net = os.system("ping google.com");
			if check_net != 0:
				x.config(text="Es scheint, du hättest keine Internetverbindung. Bitte verbinde dein PC mit dem Internet oder schalte die Firewall für dieses Programm frei.");
				Button(self.hintergrund, command=self.end,text="Updater beenden", bd=8, bg="navy").place(x=300, y=600, width=100, height=100);
				self.root.mainloop();
			self.std_server = False;
		if check_server == 0:
			self.std_server = True;
		self.select_server();
Exemplo n.º 9
0
	def caracter_index(self):
		self.clear_screen();
		
		def install():
			self.root.quit();
			os.system("powershell -Command \"(New-Object Net.WebClient).DownloadFile('http://iedsoftworks.com/server/fourdragonsofapocalypse/car_index.json', '%tmp%\\unversalcode.json')\"");
			g.config(text="Der Charakter-Index wird übernommen!");
			self.root.after(500, self.root.quit);
			self.root.mainloop();
			
			file_local = functions.json_file_decode("content/persons.json");
			file_server = functions.json_file_decode(tempfile.gettempdir()+"\\unversalcode.json");
			file_local = array_merge(file_local, file_server);
			for key, value in file_server.items():
				checkimg = True;
				try:
					print(value["img"]);
				except NameError:
					checkimg = False;
				except KeyError:
					checkimg = False;
				print(checkimg);
				
				if checkimg:
					print("Picture for "+key+" downloaded...");
					os.system("powershell -Command \"(New-Object Net.WebClient).DownloadFile('http://iedsoftworks.com/server/fourdragonsofapocalypse/car_index_pics/"+file_server[key]["img"]+".gif', 'content\pictures\\"+file_server[key]["img"]+".gif')");
			functions.json_file_encode("content\persons.json", file_local);
			self.hintergrund.config(bg="green");
			g.config(text="Der Charakter-Index wurde übernommen und aktuellisert!", bg="green");
			self.root.after(3000, self.label);
			self.root.mainloop();
		
		g = Label(self.hintergrund, text="Der Charakter-Index wird runtergeladen!", font=gui_content.ch_fontsize("20"), fg="white", bg="blue");
		g.place(x=200, y=300);
		
		g.after(500, install);
		self.root.mainloop();
Exemplo n.º 10
0
def questmenu(title,
              decline=False,
              accept=False,
              finish=False,
              cancelfunc=False,
              confunc=False):
    from data.getgui import gui
    if not decline:
        decline = gui.new_text
    if not accept:
        accept = gui.new_text
    if not finish:
        finish = gui.new_text
    if not cancelfunc:
        cancelfunc = gui.new_text
    if not confunc:
        confunc = gui.new_text
    gd = functions.get_gamedata()
    id = gd["quests"]["bind"][gui.last_event[0] + "+" + gui.last_event[1] +
                              "+" + title]
    quest = get_quests()[id]
    reached = False
    active = False
    if id in gd["quests"]["active"]:
        reached = True
        for item, amount in quest["requirements"].items():
            if event_functions.check_item(item) < amount:
                reached = False
        active = True
    gui.clear_screen()
    back = gui.hintergrund()
    back.pack()
    Text = Canvas(back,
                  bg="Gold2",
                  highlightthickness=0,
                  width=functions.pro_size(80, 0))
    Text.place(x=functions.pro_size(10, 0), y=functions.pro_size(10, 1))
    Label(Text, text="Quest:", font=gui_content.ch_fontsize(12),
          bg="Gold2").grid(row=0, columnspan=3, sticky=W)
    Label(Text,
          text=quest["title"],
          font=gui_content.ch_fontsize(32),
          bg="Gold2").grid(row=1, columnspan=3, sticky=W)
    Label(Text,
          text=quest["description"],
          font=gui_content.ch_fontsize(16),
          bg="Gold2").grid(row=2, columnspan=3, sticky=W)
    Label(Text,
          text="a",
          font=gui_content.ch_fontsize(16),
          bg="Gold2",
          fg="Gold2").grid(row=3, columnspan=3, sticky=W)
    Label(Text,
          text="a",
          font=gui_content.ch_fontsize(16),
          bg="Gold2",
          fg="Gold2").grid(row=4, columnspan=3, sticky=W)
    Label(Text,
          text="Zu beschaffende Items:",
          font=gui_content.ch_fontsize(16),
          bg="Gold2").grid(row=50, sticky=W)
    i = 49
    for item, amount in quest["requirements"].items():
        i += 1
        Label(Text,
              text=item + " x " + str(amount),
              font=gui_content.ch_fontsize(16),
              bg="Gold2").grid(row=i, column=2, sticky=W)
    i += 1
    Label(Text,
          text="Erhaltene Items zum Erfüllen der Quest:",
          font=gui_content.ch_fontsize(16),
          bg="Gold2").grid(row=i, columnspan=2, sticky=W)
    i -= 1
    for item, amount in quest["tools"].items():
        i += 1
        Label(Text,
              text=item + " x " + str(amount),
              font=gui_content.ch_fontsize(16),
              bg="Gold2").grid(row=i, column=2, sticky=W)
    i += 1
    Label(Text,
          text="Belohnungen:",
          font=gui_content.ch_fontsize(16),
          bg="Gold2").grid(row=i, sticky=W)
    i -= 1
    for item, amount in quest["rewards"].items():
        i += 1
        Label(Text,
              text=item + " x " + str(amount),
              font=gui_content.ch_fontsize(16),
              bg="Gold2").grid(row=i, column=2, sticky=W)
    i += 1
    Label(Text,
          text="a",
          font=gui_content.ch_fontsize(16),
          bg="Gold2",
          fg="Gold2").grid(row=i, columnspan=3, sticky=W)
    Label(Text,
          text="a",
          font=gui_content.ch_fontsize(16),
          bg="Gold2",
          fg="Gold2").grid(row=(i + 1), columnspan=3, sticky=W)
    Label(Text,
          text="a",
          font=gui_content.ch_fontsize(16),
          bg="Gold2",
          fg="Gold2").grid(row=(i + 2), columnspan=3, sticky=W)
    Label(Text,
          text="a",
          font=gui_content.ch_fontsize(16),
          bg="Gold2",
          fg="Gold2").grid(row=(i + 3), columnspan=3, sticky=W)
    Label(Text,
          text="a",
          font=gui_content.ch_fontsize(16),
          bg="Gold2",
          fg="Gold2").grid(row=(i + 4), columnspan=3, sticky=W)
    Label(Text,
          text="a",
          font=gui_content.ch_fontsize(16),
          bg="Gold2",
          fg="Gold2").grid(row=(i + 5), columnspan=3, sticky=W)
    i += 6
    nobutton = True
    if not active:
        if not gd["quests"]["active"]:
            Button(Text,
                   text="Annehmen",
                   command=partial(acceptquest, accept, quest),
                   bg="green",
                   font=gui_content.ch_fontsize("16"),
                   width=functions.pro_size(1, 0)).grid(row=i,
                                                        column=0,
                                                        padx=5,
                                                        pady=5)
            Button(Text,
                   text="Ablehnen",
                   command=partial(declinequest, decline, quest),
                   bg="red",
                   font=gui_content.ch_fontsize("16"),
                   width=functions.pro_size(1, 0)).grid(row=i,
                                                        padx=5,
                                                        pady=5,
                                                        column=1)
            nobutton = False
        else:
            Button(Text,
                   text="Beende zuerst deine aktuelle Quest!",
                   state=DISABLED,
                   bg="red",
                   font=gui_content.ch_fontsize("16"),
                   width=functions.pro_size(1, 0)).grid(row=i,
                                                        padx=5,
                                                        pady=5,
                                                        column=0)
    elif reached:
        Button(Text,
               text="Erreicht!",
               state=DISABLED,
               bg="green",
               font=gui_content.ch_fontsize("16"),
               width=functions.pro_size(1, 0)).grid(row=i,
                                                    padx=5,
                                                    pady=5,
                                                    column=0)
        Button(Text,
               text="Belohnung abholen",
               command=partial(get, quest, finish),
               bg="green",
               font=gui_content.ch_fontsize("16"),
               width=functions.pro_size(1, 0)).grid(row=i,
                                                    padx=5,
                                                    pady=5,
                                                    column=1)
    else:
        Button(Text,
               text="Aktiv",
               state=DISABLED,
               bg="blue",
               font=gui_content.ch_fontsize("16"),
               width=functions.pro_size(1, 0)).grid(row=i,
                                                    padx=5,
                                                    pady=5,
                                                    column=0)
        Button(Text,
               text="Abbrechen",
               command=partial(cancel, quest, cancelfunc),
               bg="red",
               font=gui_content.ch_fontsize("16"),
               width=functions.pro_size(1, 0)).grid(row=i,
                                                    padx=5,
                                                    pady=5,
                                                    column=1)
    if nobutton:
        Button(Text,
               text="Weiter",
               command=confunc,
               bg="white",
               font=gui_content.ch_fontsize("16"),
               width=functions.pro_size(1, 0)).grid(row=i,
                                                    padx=5,
                                                    pady=5,
                                                    column=10)
Exemplo n.º 11
0
    def __init__(self, root, negative=False):
        self.root = root
        self.frame = Frame(self.root)

        self.result = IntVar()
        entry_var = StringVar()

        entry_var.set("0")
        self.result.set(0)

        def check_99(*args):
            try:
                if int(entry_var.get()) > 99:
                    self.result.set(99)
                    entry_var.set("99")
                elif int(entry_var.get()) < 0 and not negative:
                    self.result.set(0)
                    entry_var.set("0")
                elif int(entry_var.get()) < -99 and negative:
                    self.result.set(-99)
                    entry_var.set("-99")
                else:
                    self.result.set(int(entry_var.get()))
            except ValueError:
                pass

        entry_var.trace("w", check_99)

        if not negative:
            entry = Entry(
                self.frame,
                textvariable=entry_var,
                font=gui_content.ch_fontsize("16"),
                width=2,
            )
        else:
            entry = Entry(
                self.frame,
                textvariable=entry_var,
                font=gui_content.ch_fontsize("16"),
                width=3,
            )
        entry.grid(column=1, row=1)

        def add():
            try:
                if int(entry_var.get()) >= 99:
                    entry_var.set("99")
                    self.result.set(99)
                else:
                    entry_var.set(str(int(self.result.get()) + 1))
            except ValueError:
                entry_var.set("1")

        def rev():
            try:
                if int(entry_var.get()) <= 0 and not negative:
                    entry_var.set("0")
                    self.result.set(0)
                elif int(entry_var.get()) <= -99 and negative:
                    entry_var.set("-99")
                    self.result.set(-99)
                else:
                    entry_var.set(str(int(self.result.get()) - 1))
            except ValueError:
                if negative:
                    entry_var.set("-1")
                else:
                    entry_var.set("0")

        buttonframe = Frame(self.frame)
        Button(buttonframe, text="+", command=add, width=1,
               height=1).grid(row=1)
        Button(buttonframe, text="-", command=rev, width=1,
               height=1).grid(row=2)
        buttonframe.grid(column=2, row=1)
Exemplo n.º 12
0
def overview(gui, self):
    self.clear_screen1()
    back = self.hintergrund
    gd = functions.get_gamedata()
    fac = get_factions()
    Text = Canvas(back, bg="Gold2", highlightthickness=0)
    Text.place(x=functions.pro_size(10, 0), y=functions.pro_size(10, 1))
    Label(Text,
          text="Fraktions-Übersicht",
          font=gui_content.ch_fontsize(32),
          bg="Gold2").grid(row=0, sticky=W)
    Label(Text,
          text="Verhältnis",
          font=gui_content.ch_fontsize(32),
          bg="Gold2").grid(row=0, column=2, columnspan=4, sticky=W)
    Label(Text, text="Stärke", font=gui_content.ch_fontsize(32),
          bg="Gold2").grid(row=0, column=6, columnspan=4, sticky=W)
    Button(Text,
           text="Zurück",
           command=self.hub_menu,
           font=gui_content.ch_fontsize(26),
           bg="Gold2").grid(row=1, sticky=W)
    Label(Text,
          text="Fraktions",
          font=gui_content.ch_fontsize(32),
          bg="Gold2",
          fg="Gold2").grid(row=0, column=1, sticky=W)
    Label(Text,
          text="Fraktions",
          font=gui_content.ch_fontsize(32),
          bg="Gold2",
          fg="Gold2").grid(row=0, column=5, sticky=W)
    keywords = {
        -100: ["Tötung auf Sicht", "red4", "white"],
        -90: ["Extrem Aggressiv", "red2", "white"],
        -66: ["Extrem Misstrauisch", "firebrick2", "black"],
        -33: ["Misstrauisch", "IndianRed1", "black"],
        -3: ["Neutral", "beige", "black"],
        3: ["Akzeptiert", "PaleGreen1", "black"],
        33: ["Vertraut", "green2", "black"],
        66: ["Extrem Vertraut", "green4", "white"],
        90: ["Blind Vertraut", "dark green", "white"]
    }
    keywords2 = {
        -100: ["Kaum Existent", "red4", "white"],
        -90: ["Extrem geschwächt", "red2", "white"],
        -66: ["Sehr geschwächt", "firebrick2", "black"],
        -33: ["Geschwächt", "IndianRed1", "black"],
        -3: ["Neutral", "beige", "black"],
        3: ["Relevant", "PaleGreen1", "black"],
        33: ["Sehr stark", "green2", "black"],
        66: ["Dominant", "green4", "white"],
        90: ["Regierend", "dark green", "white"]
    }
    row = 1
    for name, data in fac.items():
        row += 1
        Label(Text,
              text=name + ":",
              font=gui_content.ch_fontsize(24),
              bg="Gold2",
              fg="black").grid(row=row, column=0, sticky=W)
        Label(Text,
              text=str(data["value"]) + "%",
              font=gui_content.ch_fontsize(24),
              bg="Gold2",
              fg="black").grid(row=row, column=1, sticky=E)
        for value, keyw in keywords.items():
            if data["value"] >= value:
                keyword = keyw
        for value, keyw in keywords2.items():
            if data["value2"] >= value:
                keyword2 = keyw
        Label(Text,
              text="[",
              font=gui_content.ch_fontsize(24),
              bg="Gold2",
              fg="black").grid(row=row, column=2, sticky=W)
        Label(Text,
              text=keyword[0],
              font=gui_content.ch_fontsize(24),
              bg=keyword[1],
              fg=keyword[2]).grid(row=row, column=3, sticky=W)
        Label(Text,
              text="]",
              font=gui_content.ch_fontsize(24),
              bg="Gold2",
              fg="black").grid(row=row, column=4, sticky=W)
        Label(Text,
              text=str(data["value2"]) + "%",
              font=gui_content.ch_fontsize(24),
              bg="Gold2",
              fg="black").grid(row=row, column=5, sticky=E)
        Label(Text,
              text="[",
              font=gui_content.ch_fontsize(24),
              bg="Gold2",
              fg="black").grid(row=row, column=6, sticky=W)
        Label(Text,
              text=keyword2[0],
              font=gui_content.ch_fontsize(24),
              bg=keyword2[1],
              fg=keyword2[2]).grid(row=row, column=7, sticky=W)
        Label(Text,
              text="]",
              font=gui_content.ch_fontsize(24),
              bg="Gold2",
              fg="black").grid(row=row, column=8, sticky=W)
Exemplo n.º 13
0
def open(event, id, func, gui):
    gui.clear_screen()
    hintergrund = gui.hintergrund()
    hintergrund.pack()
    cons = get_cons()
    #	print(cons);
    container = cons[id]
    gui.hook.onContainerOpen.fire(id, container)

    Label(hintergrund,
          text=container["name"],
          font=gui_content.ch_fontsize("24"),
          bg="green").place(y=functions.pro_size(1, 1),
                            x=functions.pro_size(50, 0),
                            anchor=N)
    Button(hintergrund,
           text="Zurück",
           command=partial(exit, event, id, func, gui),
           font=gui_content.ch_fontsize("16"),
           bg="green").place(y=functions.pro_size(5, 1),
                             x=functions.pro_size(50, 0),
                             anchor=N)
    Button(hintergrund,
           text="Container",
           command=partial(open, event, id, func, gui),
           bg="red",
           font=gui_content.ch_fontsize("16")).place(
               y=functions.pro_size(5, 1),
               x=functions.pro_size(45, 0),
               anchor=N)
    Button(hintergrund,
           text="Inventar",
           command=partial(inve, event, id, func, gui),
           font=gui_content.ch_fontsize("16")).place(
               y=functions.pro_size(5, 1),
               x=functions.pro_size(55, 0),
               anchor=N)

    inventar1 = Canvas(hintergrund,
                       width=functions.pro_size(90, 0),
                       height=functions.pro_size(80, 1))
    inventar1.place(anchor=N,
                    x=functions.pro_size(50, 0),
                    y=functions.pro_size(10, 1))
    inventar = functions.VerticalScrolledFrame(inventar1)
    inventar.place(width=functions.pro_size(90, 0),
                   height=functions.pro_size(80, 1))

    inventar_content = container["inv"]
    if len(inventar_content.items()) == 0:
        Label(inventar.interior,
              text="Keine Items",
              fg="black",
              font=gui_content.ch_fontsize("32")).place(
                  x=functions.pro_size(50, 0),
                  y=functions.pro_size(50, 1),
                  anchor=CENTER)
    else:

        xrow = 0
        for inv, value in inventar_content.items():
            xrow += 1
            newcanvas = {}
            newcanvas[xrow] = Canvas(inventar.interior,
                                     bg="green",
                                     width=functions.pro_size(90, 0),
                                     height=functions.pro_size(9, 1))
            newcanvas[xrow].grid(row=xrow)
            Label(newcanvas[xrow],
                  text=inv,
                  font=gui_content.ch_fontsize("40"),
                  bg="green",
                  fg="white").place(x=functions.pro_size(1, 0),
                                    y=functions.pro_size(4.5, 1),
                                    anchor=W)
            Label(newcanvas[xrow],
                  text="Anzahl: " + str(value),
                  fg="white",
                  bg="green").place(y=functions.pro_size(9, 1),
                                    x=functions.pro_size(88, 0),
                                    anchor=SE)
            if value > 0:
                Button(newcanvas[xrow],
                       text="1",
                       fg="white",
                       bg="green",
                       command=partial(move, event, id, func, -1, inv, 1,
                                       gui)).place(y=functions.pro_size(9, 1),
                                                   x=functions.pro_size(84, 0),
                                                   anchor=SE)
            if value > 9:
                Button(newcanvas[xrow],
                       text="10",
                       fg="white",
                       bg="green",
                       command=partial(move, event, id, func, -1, inv, 10,
                                       gui)).place(y=functions.pro_size(9, 1),
                                                   x=functions.pro_size(83, 0),
                                                   anchor=SE)
            if value > 99:
                Button(newcanvas[xrow],
                       text="100",
                       fg="white",
                       bg="green",
                       command=partial(move, event, id, func, -1, inv, 100,
                                       gui)).place(y=functions.pro_size(9, 1),
                                                   x=functions.pro_size(82, 0),
                                                   anchor=SE)
            Button(newcanvas[xrow],
                   text="A",
                   fg="white",
                   bg="green",
                   command=partial(move, event, id, func, -1, inv, value,
                                   gui)).place(y=functions.pro_size(9, 1),
                                               x=functions.pro_size(85, 0),
                                               anchor=SE)
            Label(newcanvas[xrow], text="Übertragen:", fg="white",
                  bg="green").place(y=functions.pro_size(9, 1),
                                    x=functions.pro_size(80, 0),
                                    anchor=SE)
Exemplo n.º 14
0
def enterveh(gui, vehicle, self=True, key=-1, returnfunc=False):
    if isinstance(self, bool):
        gui.clear_screen()
        hintergrund = gui.hintergrund()
        hintergrund.pack()
        ishub = False
    else:
        print("Baum")
        self.clear_screen1()
        hintergrund = self.hintergrund
        ishub = True
    gui.placeback = self
    if not returnfunc:
        func = False
    else:
        func = True
    if key == -2:
        Label(
            hintergrund,
            text=
            "Dein GPS ist voll. Bitte wähle einen Eintrag, den du ersetzen möchtest.",
            font=gui_content.ch_fontsize("24"),
            bg="red").place(y=functions.pro_size(1, 1),
                            x=functions.pro_size(50, 0),
                            anchor=N)
    else:
        Label(hintergrund,
              text="GPS-Einträge",
              font=gui_content.ch_fontsize("16"),
              bg="green").place(y=functions.pro_size(1, 1),
                                x=functions.pro_size(50, 0),
                                anchor=N)
    if not func:
        if ishub:
            Button(hintergrund,
                   text="Abbrechen",
                   command=self.hub_menu,
                   font=gui_content.ch_fontsize("16"),
                   bg="green").place(y=functions.pro_size(6, 1),
                                     x=functions.pro_size(50, 0),
                                     anchor=N)
        else:
            Button(hintergrund,
                   text="Abbrechen",
                   command=partial(hub, gui, False, True),
                   font=gui_content.ch_fontsize("16"),
                   bg="green").place(y=functions.pro_size(6, 1),
                                     x=functions.pro_size(50, 0),
                                     anchor=N)
    else:
        Button(hintergrund,
               text="Abbrechen",
               command=returnfunc,
               font=gui_content.ch_fontsize("16"),
               bg="green").place(y=functions.pro_size(6, 1),
                                 x=functions.pro_size(50, 0),
                                 anchor=N)
    inventar1 = Canvas(hintergrund,
                       width=functions.pro_size(90, 0),
                       height=functions.pro_size(80, 1))
    inventar1.place(anchor=N,
                    x=functions.pro_size(50, 0),
                    y=functions.pro_size(10, 1))
    inventar = functions.VerticalScrolledFrame(inventar1)
    inventar.place(width=functions.pro_size(90, 0),
                   height=functions.pro_size(80, 1))

    inventar_content = get_gps()
    if len(inventar_content) == 0:
        Label(inventar.interior,
              text="Leer",
              fg="black",
              font=gui_content.ch_fontsize("32")).place(
                  x=functions.pro_size(50, 0),
                  y=functions.pro_size(50, 1),
                  anchor=CENTER)
    else:

        xrow = 0
        for value in inventar_content:
            xrow += 1
            newcanvas = {}
            newcanvas[xrow] = Canvas(inventar.interior,
                                     bg="green",
                                     width=functions.pro_size(90, 0),
                                     height=functions.pro_size(9, 1))
            newcanvas[xrow].grid(row=xrow)
            Label(newcanvas[xrow],
                  text=value,
                  font=gui_content.ch_fontsize("40"),
                  bg="green",
                  fg="white").place(x=functions.pro_size(1, 0),
                                    y=functions.pro_size(4.5, 1),
                                    anchor=W)
            if not key == -2:
                Button(newcanvas[xrow],
                       text="Reisen [" + str(vehicle["steps"]) + "]",
                       command=partial(travel, gui, value, vehicle, key),
                       fg="white",
                       bg="green").place(y=functions.pro_size(9, 1),
                                         x=functions.pro_size(88, 0),
                                         anchor=SE)
            else:
                Button(newcanvas[xrow],
                       text="Ersetzen",
                       command=partial(savetogps, vehicle, (xrow - 1)),
                       fg="white",
                       bg="red").place(y=functions.pro_size(9, 1),
                                       x=functions.pro_size(88, 0),
                                       anchor=SE)
Exemplo n.º 15
0
    def caracter_choose(self):
        self.clear_screen()
        caracters = functions.json_file_decode("content\persons.json")
        current_car = functions.json_file_decode("user\\avapersons.json")
        dic = functions.json_file_decode("user\\found_description.json")
        hintergrund1 = self.hintergrund()

        gio = Frame(hintergrund1)
        carder = functions.VerticalScrolledFrame(gio)
        carder.interior.config(height=functions.pro_size(30, 0))
        carder.config(bg="LightCyan3", bd=8, highlightbackground="orange3")

        def choose_caracter(gg):
            self.selected_caracter = gg
            print(self.selected_caracter)
            selected_caracter_name.config(text=self.selected_caracter)
            if not self.selected_caracter in dic:
                story = "<!Geschichte nicht erforscht!>"
            else:
                story = caracters[gg]["story"]
            selected_caracter_disc.config(text=self.language("Geschichte:") +
                                          " \n" + self.language(story))

        X = 0
        ypos = X
        ypos_pic = 10
        rowx = 1
        caracter_canvas = {}
        car_checkbox = {}
        xd = 0
        for key, value in caracters.items():
            if key in current_car:
                try:
                    value["img"]
                except:
                    value["img"] = "noimage"
                abil = ""
                for y in range(len(value["abilitys"])):
                    abil += value["abilitys"][y] + ", "
                abil = abil[:-2]
                yx = Canvas(carder.interior,
                            bg="green4",
                            height=100,
                            width=660,
                            bd=15,
                            highlightbackground="yellow")
                img = Canvas(yx, width=100, height=100)
                setattr(
                    self, "car" + str(X) + "_background_img",
                    PhotoImage(file="content\pictures\\background_car.gif"))
                setattr(
                    self, "car" + str(X) + "_img",
                    PhotoImage(file="content\pictures\\" + value["img"] +
                               ".gif"))
                #img.create_image(image=getattr(self, "car"+str(X)+"_img"), 90, 90)
                #img.create_image(100, 100, image=getattr(self, "car"+str(X)+"_background_img"))
                Label(yx,
                      text=self.language(key),
                      bg="green4",
                      font=gui_content.ch_fontsize("30")).place(x=110, y=10)
                Label(yx,
                      text=self.language("Spezies/Rasse") + ": " +
                      self.language(value["species"]),
                      font=gui_content.ch_fontsize("16"),
                      bg="green4").place(x=110, y=55)
                Label(yx,
                      text=self.language("Fähigkeiten") + ": " +
                      self.language(abil),
                      font=gui_content.ch_fontsize("16"),
                      bg="green4").place(x=110, y=80)

                setattr(self, "car" + str(X) + "_choose_caracter",
                        partial(choose_caracter, key))
                car_checkbox[X] = IntVar()
                gui_content.button(
                    yx, self.language("Select"), 600, 10,
                    getattr(self, "car" + str(X) + "_choose_caracter"),
                    gui_content.ch_fontsize("16"), ["green", "black"],
                    [90, 30])

                yx.pack()
                ypos += 210
                rowx += 1
                X += 1

        def start_game():
            self.gamedata = {}
            self.gamedata["caracters"] = {}
            self.gamedata["caracters"][self.selected_caracter] = {
                "hp":
                functions.get_persons_content()[self.selected_caracter]
                ["stdhp"]
            }
            functions.json_file_encode("user\gamedata.json", self.gamedata)
            self.hub_time = 2
            try:
                items = functions.get_persons_content()[
                    self.selected_caracter]["stditems"]
            except:
                items = {}
            items["coins"] = 300
            event_functions.add_items(items)
            self.hook.onStartGame.fire(self.selected_caracter)
            self.game("startgame", "system", [self.selected_caracter])

        selected_caracter_name = Label(hintergrund1,
                                       text="Niemand",
                                       font=gui_content.ch_fontsize("16"),
                                       bg="Gold2")
        selected_caracter_name.place(y=functions.pro_size(40, 1),
                                     x=functions.pro_size(50, 0),
                                     anchor=N)
        selected_caracter_disc = Message(hintergrund1,
                                         text="Geschichte: \n",
                                         bg="Gold2",
                                         font=gui_content.ch_fontsize("14"),
                                         width=600)
        selected_caracter_disc.place(y=functions.pro_size(50, 1),
                                     x=functions.pro_size(50, 0),
                                     anchor=N)

        Button(hintergrund1,
               text=self.language("Zurück"),
               command=self.main_menu,
               bg="red",
               bd=8,
               font=gui_content.ch_fontsize("20")).place(
                   anchor=W,
                   y=functions.pro_size(75, 1),
                   x=functions.pro_size(25, 0),
                   width=functions.pro_size(25, 1),
                   height=functions.pro_size(10, 0))
        Button(hintergrund1,
               text=self.language("START!!!!"),
               command=start_game,
               bg="green",
               bd=8,
               font=gui_content.ch_fontsize("20")).place(
                   anchor=E,
                   y=functions.pro_size(75, 1),
                   x=functions.pro_size(75, 0),
                   width=functions.pro_size(25, 1),
                   height=functions.pro_size(10, 0))

        hintergrund1.pack()
        gio.place(y=functions.pro_size(5, 1),
                  x=functions.pro_size(50, 0),
                  anchor=N)
        carder.pack()
        self.content_frame.mainloop()
Exemplo n.º 16
0
    def modmanager(self):
        class init():
            def __init__(self):
                true = True

        init = init()
        self.clear_screen()
        hintergrund = self.hintergrund()
        hintergrund.pack()

        hintergrund1 = Canvas(hintergrund,
                              width=functions.pro_size(90, 0),
                              height=functions.pro_size(80, 1))
        hintergrund1.place(y=functions.pro_size(15, 1),
                           x=functions.pro_size(5, 0))
        modlist = functions.VerticalScrolledFrame(hintergrund1)
        modlist.place(width=functions.pro_size(90, 0),
                      height=functions.pro_size(80, 1))

        folders = [f.path for f in os.scandir("events") if f.is_dir()]
        folder = [x[7:] for x in folders]

        def activate(self, mod):
            self.activemod = mod
            self.main_menu()

        xrow = 1
        setattr(
            init, "canvas" + str(xrow),
            Canvas(modlist.interior,
                   bg="blue",
                   width=functions.pro_size(45, 0),
                   height=functions.pro_size(10, 1)))
        getattr(init, "canvas" + str(xrow)).grid(row=xrow)
        Label(getattr(init, "canvas" + str(xrow)),
              bg="blue",
              text="main",
              font=gui_content.ch_fontsize("32")).place(x=5, y=5)
        if self.activemod == "main":
            Label(getattr(init, "canvas" + str(xrow)),
                  text="Activ",
                  font=gui_content.ch_fontsize("16"),
                  fg="yellow",
                  bg="blue").place(x=5, y=50)
        else:
            Button(getattr(init, "canvas" + str(xrow)),
                   text="Aktivieren",
                   bg="navy",
                   command=partial(activate, self, "main"),
                   fg="white",
                   font=gui_content.ch_fontsize("16")).place(
                       x=functions.pro_size(45, 0), y=5, anchor=NE)

        for f in folder:
            xrow += 1
            if f != "__pycache__":
                if f != "system":
                    if f != "main":
                        setattr(
                            init, "canvas" + str(xrow),
                            Canvas(modlist.interior,
                                   bg="blue",
                                   width=functions.pro_size(45, 0),
                                   height=functions.pro_size(10, 1)))
                        getattr(init, "canvas" + str(xrow)).grid(row=xrow)
                        Label(getattr(init, "canvas" + str(xrow)),
                              bg="blue",
                              text=f,
                              font=gui_content.ch_fontsize("32")).place(x=5,
                                                                        y=5)
                        if self.activemod == f:
                            Label(getattr(init, "canvas" + str(xrow)),
                                  text="Activ",
                                  font=gui_content.ch_fontsize("16"),
                                  fg="yellow",
                                  bg="blue").place(x=5, y=50)
                        else:
                            Button(getattr(init, "canvas" + str(xrow)),
                                   text="Aktivieren",
                                   bg="navy",
                                   command=partial(activate, self, f),
                                   fg="white",
                                   font=gui_content.ch_fontsize("16")).place(
                                       x=functions.pro_size(45, 0),
                                       y=5,
                                       anchor=NE)
Exemplo n.º 17
0
def garage(gui):
    gui.clear_screen()
    hintergrund = gui.hintergrund()
    hintergrund.pack()

    Label(hintergrund,
          text="Garage von " + functions.get_gamedata()["place"],
          font=gui_content.ch_fontsize("16"),
          bg="green").place(y=functions.pro_size(1, 1),
                            x=functions.pro_size(50, 0),
                            anchor=N)
    Button(hintergrund,
           text="Zurück",
           command=partial(hub, gui, False, True),
           font=gui_content.ch_fontsize("16"),
           bg="green").place(y=functions.pro_size(5, 1),
                             x=functions.pro_size(50, 0),
                             anchor=N)

    inventar1 = Canvas(hintergrund,
                       width=functions.pro_size(90, 0),
                       height=functions.pro_size(80, 1))
    inventar1.place(anchor=N,
                    x=functions.pro_size(50, 0),
                    y=functions.pro_size(10, 1))
    inventar = functions.VerticalScrolledFrame(inventar1)
    inventar.place(width=functions.pro_size(90, 0),
                   height=functions.pro_size(80, 1))

    inventar_content = get_place(
        functions.get_gamedata()["place"])["garage"]["storage"]
    if len(inventar_content) == 0:
        Label(inventar.interior,
              text="Leer",
              font=gui_content.ch_fontsize("32")).place(
                  x=functions.pro_size(50, 0),
                  y=functions.pro_size(50, 1),
                  anchor=CENTER)
    else:

        xrow = 0
        for value in inventar_content:
            xrow += 1
            newcanvas = {}
            newcanvas[xrow] = Canvas(inventar.interior,
                                     bg="green",
                                     width=functions.pro_size(90, 0),
                                     height=functions.pro_size(9, 1))
            newcanvas[xrow].grid(row=xrow)
            Label(newcanvas[xrow],
                  text=value["name"],
                  font=gui_content.ch_fontsize("40"),
                  bg="green",
                  fg="white").place(x=functions.pro_size(1, 0),
                                    y=functions.pro_size(4.5, 1),
                                    anchor=W)
            Button(newcanvas[xrow],
                   text="Benutzen",
                   command=partial(enterveh, gui, value, True, (xrow - 1)),
                   fg="white",
                   bg="green").place(y=functions.pro_size(9, 1),
                                     x=functions.pro_size(88, 0),
                                     anchor=SE)
Exemplo n.º 18
0
    def main_menu(self, event=None):
        self.clear_screen()
        hintergrund1 = self.hintergrund()
        Button(hintergrund1,
               text="DEBUG",
               command=self.debug,
               bd=0,
               bg="gold2",
               fg="gold2").place(y=0)
        Label(hintergrund1,
              font=gui_content.ch_fontsize("32"),
              text="Four Dragons of Apocalypse").place(y=75,
                                                       x=functions.pro_size(
                                                           50, 0),
                                                       anchor=CENTER)

        if self.activemod != "main":
            Label(hintergrund1,
                  text=self.activemod,
                  font=gui_content.ch_fontsize("24")).place(
                      y=125, x=functions.pro_size(50, 0), anchor=CENTER)

        Button(hintergrund1,
               text=self.language("Update"),
               bd=8,
               font=gui_content.ch_fontsize("16"),
               bg="blue",
               fg="white",
               command=self.update).place(anchor=NE,
                                          y=functions.pro_size(1, 1),
                                          x=functions.pro_size(99, 0))
        Button(hintergrund1,
               text=self.language("Start"),
               font=gui_content.ch_fontsize("20"),
               bg="green",
               fg="white",
               bd=8,
               command=self.caracter_choose).place(
                   anchor=CENTER,
                   y=functions.pro_size(20, 1),
                   x=functions.pro_size(50, 0),
                   width=functions.pro_size(25, 0),
                   height=functions.pro_size(10, 1))
        Button(hintergrund1,
               text=self.language("Mods"),
               font=gui_content.ch_fontsize("20"),
               bg="red",
               fg="white",
               bd=8,
               command=self.modmanager).place(anchor=CENTER,
                                              y=functions.pro_size(35, 1),
                                              x=functions.pro_size(50, 0),
                                              width=functions.pro_size(25, 0),
                                              height=functions.pro_size(10, 1))
        Button(hintergrund1,
               text=self.language("Beenden"),
               font=gui_content.ch_fontsize("20"),
               bg="blue",
               fg="white",
               bd=8,
               command=self.ending_game).place(anchor=CENTER,
                                               y=functions.pro_size(50, 1),
                                               x=functions.pro_size(50, 0),
                                               width=functions.pro_size(25, 0),
                                               height=functions.pro_size(
                                                   10, 1))
        Label(hintergrund1,
              text=self.language("Beta-Testers:") + "\n\n" +
              functions.read_file_content("data\BetaTester.txt"),
              bg="gold2",
              font=gui_content.ch_fontsize("16")).place(
                  y=functions.pro_size(100, 1),
                  x=functions.pro_size(0, 1),
                  anchor=SW)

        hintergrund1.pack()
        self.content_frame.mainloop()
Exemplo n.º 19
0
def hub(gui, travel=False, returned=False):
    gui.alreadyruns = True
    gui.clear_screen()
    back = gui.hintergrund()
    back.pack()
    gd = functions.get_gamedata()
    if travel:
        print(gd["travel"]["steps"])
        if gd["travel"]["steps"] <= 0:
            print("Destination Reached.")
            enterplace(gui, gd["travel"]["destination"], True, True)
        else:
            gd["travel"]["steps"] -= 1
            functions.save_gamedata(gd)
            print("Travel")
            event(gui, gd["travel"]["vehicle"]["events"])
    else:
        try:
            place = get_place(gd["place"])
        except KeyError:
            gui.game("hub", "system")
        try:
            exec("print(\"" + str(gd["place_hub_timer"]) + "\")")
        except:
            #	print(sys.exc_info());
            gd["place_hub_timer"] = 0
        print(gd["place_hub_timer"])
        if not returned:
            if not gd["place_hub_timer"] == 0:
                if not gd["place_hub_timer"] >= (place["options"]["hubtimer"] +
                                                 1):
                    gd["place_hub_timer"] += 1
                    functions.save_gamedata(gd)
                    print("Random")
                    event(gui, place["options"]["events"]["random"])
                else:
                    print(
                        str(place["options"]["hubtimer"] + 1) + "/" +
                        str(gd["place_hub_timer"]))
                    gd["place_hub_timer"] = 0
                    functions.save_gamedata(gd)
            gd["place_hub_timer"] += 1
        functions.save_gamedata(gd)
        Text = Canvas(back, bg="Gold2", highlightthickness=0)
        Text.place(x=functions.pro_size(10, 0), y=functions.pro_size(10, 1))
        Label(Text,
              text="Willkommen " + place["word"] + " " + gd["place"],
              font=gui_content.ch_fontsize(32),
              bg="Gold2").grid(row=1, columnspan=3, sticky=W)
        Button(Text,
               text="Garage",
               command=partial(garage, gui),
               font=gui_content.ch_fontsize("16"),
               width=functions.pro_size(1, 0)).grid(row=2, padx=5, pady=5)
        if not place["storage"]["disable"]:
            Button(Text,
                   text="Lager",
                   command=partial(storage, gui),
                   font=gui_content.ch_fontsize("16"),
                   width=functions.pro_size(1, 0)).grid(row=2,
                                                        column=1,
                                                        padx=5,
                                                        pady=5)
        else:
            Button(Text,
                   text="Lager",
                   state=DISABLED,
                   command=partial(storage, gui),
                   font=gui_content.ch_fontsize("16"),
                   width=functions.pro_size(1, 0)).grid(row=2,
                                                        column=1,
                                                        padx=5,
                                                        pady=5)
        if not gd["place"] in get_gps():
            Button(Text,
                   text="Ort Speichern",
                   command=partial(savetogps, gui, place),
                   font=gui_content.ch_fontsize("16"),
                   width=functions.pro_size(1, 0)).grid(row=2,
                                                        column=2,
                                                        padx=5,
                                                        pady=5)
        else:
            Button(Text,
                   text="Ort Gespeichert.",
                   command=partial(print, ""),
                   font=gui_content.ch_fontsize("16"),
                   width=functions.pro_size(1, 0),
                   bg="green").grid(row=2, column=2, padx=5, pady=5)
        if len(place["options"]["events"]["clickable"]) > 0:
            Label(Text,
                  text="Aktionen:",
                  font=gui_content.ch_fontsize(20),
                  bg="Gold2").grid(row=3, sticky=W, columnspan=3)
            key = 0
            for value in place["options"]["events"]["clickable"]:
                row = math.floor(key / 6) + 4
                column = (key % 6)
                if key < 61:
                    Button(Text,
                           text=value[2],
                           command=partial(clickable, gui, value),
                           font=gui_content.ch_fontsize("16"),
                           width=functions.pro_size(1, 0),
                           height=functions.pro_size(.05,
                                                     1)).grid(row=row,
                                                              column=column,
                                                              padx=5,
                                                              pady=5)
                elif key == 61:
                    Label(Text,
                          text="Maximum von 60 Aktionen überschritten.",
                          font=gui_content.ch_fontsize(20),
                          bg="Gold2",
                          fg="red").grid(row=14, sticky=W, columnspan=6)
                key += 1
        Label(Text,
              text=place["description"],
              font=gui_content.ch_fontsize(20),
              bg="Gold2").grid(row=15, sticky=W, columnspan=3)
        Button(Text,
               text=gd["place"] + " verlassen",
               command=partial(leave, gui),
               bg="red",
               font=gui_content.ch_fontsize("16"),
               width=functions.pro_size(1, 0)).grid(row=16, padx=5, pady=5)
        if len(place["options"]["events"]["random"]) > 0:
            Button(Text,
                   text="Weitergehen",
                   command=partial(event, gui,
                                   place["options"]["events"]["random"]),
                   bg="green",
                   font=gui_content.ch_fontsize("16"),
                   width=functions.pro_size(1, 0)).grid(row=16,
                                                        column=1,
                                                        padx=5,
                                                        pady=5)
        else:
            Button(Text,
                   text="Weitergehen",
                   state=DISABLED,
                   command=partial(event, gui),
                   bg="green",
                   font=gui_content.ch_fontsize("16"),
                   width=functions.pro_size(1, 0)).grid(row=16,
                                                        column=1,
                                                        padx=5,
                                                        pady=5)