From 863c5be42820bd06f57cc26a5fe5b2dfe96085f3 Mon Sep 17 00:00:00 2001 From: eblade Date: Tue, 11 Nov 2008 04:36:44 -0500 Subject: [PATCH] change text in hud main windows (smaller, indicates presence of menu and moveability), add opacity and move support (does not yet save it's position) --- pyfpdb/Hud.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index bee81aaf..9a5ea7f1 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -68,10 +68,12 @@ class Hud: self.main_window.set_title(table.name + " FPDBHUD") self.main_window.connect("destroy", self.kill_hud) self.main_window.set_decorated(False) + self.main_window.set_opacity(self.colors["hudopacity"]) #self.main_window.set_transient_for(parent.get_toplevel()) self.ebox = gtk.EventBox() - self.label = gtk.Label("Right click to close HUD for %s\nor Save Stat Positions." % (table.name)) +# self.label = gtk.Label("Right click to close HUD for %s\nor Save Stat Positions." % (table.name)) + self.label = gtk.Label("FPDB Menu (Right Click)\nLeft-drag to move") self.label.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(self.colors['hudbgcolor'])) self.label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse(self.colors['hudfgcolor'])) @@ -111,6 +113,9 @@ class Hud: self.main_window.set_destroy_with_parent(True) def on_button_press(self, widget, event): + if event.button == 1: + self.main_window.begin_move_drag(event.button, int(event.x_root), int(event.y_root), event.time) + return True if event.button == 3: widget.popup(None, None, None, event.button, event.time) return True