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
|
||||||
|
@ -369,6 +368,11 @@ class Stat_Window:
|
||||||
def kill_popup(self, popup):
|
def kill_popup(self, popup):
|
||||||
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
|
||||||
|
@ -557,8 +561,11 @@ 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)
|
||||||
|
|
||||||
if __name__== "__main__":
|
if __name__== "__main__":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user