fix kill hud not killing popups, fix some popup bugs
This commit is contained in:
parent
a34c90dee3
commit
d81a701ec2
|
@ -190,8 +190,7 @@ class Hud:
|
||||||
# kill all stat_windows, popups and aux_windows in this HUD
|
# kill all stat_windows, popups and aux_windows in this HUD
|
||||||
# heap dead, burnt bodies, blood 'n guts, veins between my teeth
|
# heap dead, burnt bodies, blood 'n guts, veins between my teeth
|
||||||
for s in self.stat_windows.itervalues():
|
for s in self.stat_windows.itervalues():
|
||||||
for p in s.popups:
|
s.kill_popups()
|
||||||
s.kill_popup(p)
|
|
||||||
s.window.destroy()
|
s.window.destroy()
|
||||||
self.stat_windows = {}
|
self.stat_windows = {}
|
||||||
# also kill any aux windows
|
# also kill any aux windows
|
||||||
|
@ -370,6 +369,11 @@ class Stat_Window:
|
||||||
popup.window.destroy()
|
popup.window.destroy()
|
||||||
self.popups.remove(popup)
|
self.popups.remove(popup)
|
||||||
|
|
||||||
|
def kill_popups(self):
|
||||||
|
for x in self.popups:
|
||||||
|
self.popups[x].window.destroy()
|
||||||
|
self.popups = { }
|
||||||
|
|
||||||
def relocate(self, x, y):
|
def relocate(self, x, y):
|
||||||
self.x = x + self.table.x
|
self.x = x + self.table.x
|
||||||
self.y = y + self.table.y
|
self.y = y + self.table.y
|
||||||
|
@ -557,7 +561,10 @@ class Popup_window:
|
||||||
|
|
||||||
for w in tl_windows:
|
for w in tl_windows:
|
||||||
if w[1] == unique_name:
|
if w[1] == unique_name:
|
||||||
win32gui.SetWindowPos(w[0], win32con.HWND_TOPMOST, 0, 0, 0, 0, win32con.SWP_NOMOVE|win32con.SWP_NOSIZE)
|
window.set_transient_for(self.parent.main_window)
|
||||||
|
style = win32gui.GetWindowLong(self.table.number, win32con.GWL_EXSTYLE)
|
||||||
|
style |= win32con.WS_CLIPCHILDREN
|
||||||
|
win32gui.SetWindowLong(self.table.number, win32con.GWL_EXSTYLE, style)
|
||||||
|
|
||||||
window.set_title(real_name)
|
window.set_title(real_name)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user