changeset 7:2b9e766f9dee grumpy-goblin

Tests fixes issues with Linux GUI effecting miniatures Files: /mapper/miniatures.py /mapper/miniatures_handler.py
author sirebral
date Thu, 16 Jul 2009 14:26:50 -0500
parents 668694b93f6c
children b28777975827
files orpg/main.py orpg/mapper/miniatures.py orpg/mapper/miniatures_handler.py orpg/orpg_version.py
diffstat 4 files changed, 29 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/orpg/main.py	Wed Jul 15 04:06:37 2009 -0500
+++ b/orpg/main.py	Thu Jul 16 14:26:50 2009 -0500
@@ -599,18 +599,17 @@
     #Help Menu
     def OnMB_HelpAbout(self):
 
-        description = """OpenRPG is a Virtual Game Table that allows users to connect via a network and play table
-top games with friends.  'Traipse' is an OpenRPG distro that is easy to setup and provides superb 
-functionality.  OpenRPG is originally designed by Chris Davis."""
+        description = """OpenRPG is a Virtual Game Table that allows users to connect via a network and play table top games with friends.  'Traipse' is an OpenRPG distro that is easy to setup and provides superb functionality.  
+
+OpenRPG is originally designed by Chris Davis."""
 
-        license = """OpenRPG is free software; you can redistribute it and/or modify it 
-under the terms of the GNU General Public License as published by the Free Software Foundation; 
-either version 2 of the License, or (at your option) any later version.
+        license = """OpenRPG is free software; you can redistribute it and/or modify it under the terms of the GNU General 
+Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any 
+later version.
 
-OpenRPG and Traipse 'OpenRPG' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
-without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
-See the GNU General Public License for more details. You should have received a copy of 
-the GNU General Public License along with Traipse 'OpenRPG'; if not, write to 
+OpenRPG and Traipse 'OpenRPG' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more 
+details. You should have received a copy of the GNU General Public License along with Traipse 'OpenRPG'; if not, write to 
 the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 'Traipse' and the 'Traipse' Logo are trademarks of Mad Mathematics Laboratories."""
--- a/orpg/mapper/miniatures.py	Wed Jul 15 04:06:37 2009 -0500
+++ b/orpg/mapper/miniatures.py	Thu Jul 16 14:26:50 2009 -0500
@@ -494,8 +494,20 @@
         self.log.log("Enter miniature_layer", ORPG_DEBUG)
         self.settings = self.canvas.settings
         layer_base.__init__(self)
+
+        self.id = -1 #added.
+
         self.miniatures = []
         self.serial_number = 0
+
+        # Set the font of the labels to be the same as the chat window
+        # only smaller.
+        font_size = int(self.settings.get_setting('defaultfontsize'))
+        if (font_size >= 10):
+            font_size -= 2
+        self.label_font = wx.Font(font_size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL,
+                                  False, self.settings.get_setting('defaultfont'))
+
         self.log.log("Exit miniature_layer", ORPG_DEBUG)
 
     def next_serial(self):
@@ -589,6 +601,9 @@
 
     def layerDraw(self, dc, topleft, size):
         self.log.log("Enter miniature_layer->layerDraw(self, dc, topleft, size)", ORPG_DEBUG)
+
+        dc.SetFont(self.label_font)
+
         sorted_miniatures = self.miniatures[:]
         sorted_miniatures.sort(cmp_zorder)
         for m in sorted_miniatures:
--- a/orpg/mapper/miniatures_handler.py	Wed Jul 15 04:06:37 2009 -0500
+++ b/orpg/mapper/miniatures_handler.py	Thu Jul 16 14:26:50 2009 -0500
@@ -583,10 +583,13 @@
                 return
             self.sel_min = mini
             self.sel_min.selected = True
+            """
             dc = wx.ClientDC(self.canvas)
             self.canvas.PrepareDC(dc)
             dc.SetUserScale(self.canvas.layers['grid'].mapscale,self.canvas.layers['grid'].mapscale)
             self.sel_min.draw(dc, self.canvas.layers['miniatures'])
+            """
+            self.canvas.Refresh()
         else:
             self.drag_mini = None
             pos = self.getLogicalPosition(evt)
--- a/orpg/orpg_version.py	Wed Jul 15 04:06:37 2009 -0500
+++ b/orpg/orpg_version.py	Thu Jul 16 14:26:50 2009 -0500
@@ -2,9 +2,9 @@
 SERVER_MIN_CLIENT_VERSION = "1.7.1"
 
 #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed)
-DISTRO = "Traipse"
+DISTRO = "Traipse Dev"
 DIS_VER = "Grumpy Goblin"
-BUILD = "090715-02"
+BUILD = "090716-00"
 
 # This version is for network capability.
 PROTOCOL_VERSION = "1.2"