Skip to content

Commit

Permalink
Small visual fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisDavie committed Sep 30, 2023
1 parent a0d6e69 commit 7402bb4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gui/Doors/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def load_yaml(self: DoorPage, yaml_doors: dict, yaml_lobbies):
)

def clean_canvas(self: DoorPage) -> None:
for tag in ["tile_image", "door", "door_link", "background_select", "door_icon", "hidden_tile"]:
for tag in ["tile_image", "door", "door_link", "background_select", "door_icon", "hidden_tile", "dungeon_name"]:
for item in self.canvas.find_withtag(tag):
self.canvas.delete(item)

Expand All @@ -338,6 +338,14 @@ def redraw_canvas(self: DoorPage):
old_tiles = dict(sorted(self.tiles.items()))

clean_canvas(self)
self.canvas.create_text(
((self.cwidth + (BORDER_SIZE * 2)) // 2),
12,
text=dungeon_name.replace("_", " "),
anchor="center",
font=("TkDefaultFont", 12, "bold"),
tags=["dungeon_name"],
)
# Reset data - We have a copy in the function args
self.doors = self.default_doors.copy()
self.lobby_doors = []
Expand Down Expand Up @@ -809,6 +817,7 @@ def draw_empty_map(self: DoorPage):
self.unused_map_tiles[(col, row)] = tile

def draw_map(self: DoorPage):
self.x_center_align = 0
# x is columns, y is rows
icon_queue = []
aspect_ratio = self.aspect_ratio
Expand Down

0 comments on commit 7402bb4

Please sign in to comment.