comparison orpg/networking/gsclient.py @ 61:f3d8101211c4 ornery-dev

Traipse Dev 'OpenRPG' {090813-00} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc''s main goal is to offer more advanced features and enhance the productivity of the user. Update Summary: This update completes the front end of the Updater tab. Material is now ready to start adding to the Controls tab, however GUI planning needs to take place first. Player List and Game Server Menu Columns now have a minimum width and the software will refresh to that width on an update, if the column is too small.
author sirebral
date Thu, 13 Aug 2009 04:25:10 -0500
parents 4385a7d0efd1
children c54768cffbd4
comparison
equal deleted inserted replaced
60:3b2cfa13b610 61:f3d8101211c4
157 self.sizers["server"].Add(self.server_list, 1, wx.EXPAND) 157 self.sizers["server"].Add(self.server_list, 1, wx.EXPAND)
158 self.sizers["server"].Add(self.sizers["svrbtns"], 0, wx.EXPAND) 158 self.sizers["server"].Add(self.sizers["svrbtns"], 0, wx.EXPAND)
159 159
160 #Build Rooms Sizer 160 #Build Rooms Sizer
161 self.room_list = wx.ListCtrl(self, LIST_ROOM, style=wx.LC_REPORT | wx.SUNKEN_BORDER) 161 self.room_list = wx.ListCtrl(self, LIST_ROOM, style=wx.LC_REPORT | wx.SUNKEN_BORDER)
162 self.room_list.InsertColumn(0,"Game", wx.LIST_FORMAT_LEFT,0) 162 self.room_list.InsertColumn(0,"Game", wx.LIST_FORMAT_LEFT,-1)
163 self.room_list.InsertColumn(1,"Players", wx.LIST_FORMAT_LEFT,0) 163 self.room_list.InsertColumn(1,"Players", wx.LIST_FORMAT_LEFT,-1)
164 self.room_list.InsertColumn(2,"PW", wx.LIST_FORMAT_LEFT,0) 164 self.room_list.InsertColumn(2,"PW", wx.LIST_FORMAT_LEFT,-1)
165 self.buttons[GS_JOIN] = wx.Button(self, GS_JOIN, "Join Room") 165 self.buttons[GS_JOIN] = wx.Button(self, GS_JOIN, "Join Room")
166 self.buttons[GS_JOINLOBBY] = wx.Button(self, GS_JOINLOBBY, "Lobby") 166 self.buttons[GS_JOINLOBBY] = wx.Button(self, GS_JOINLOBBY, "Lobby")
167 self.sizers["roombtns"] = wx.BoxSizer(wx.HORIZONTAL) 167 self.sizers["roombtns"] = wx.BoxSizer(wx.HORIZONTAL)
168 self.sizers["roombtns"].Add(self.buttons[GS_JOIN], 0, wx.EXPAND) 168 self.sizers["roombtns"].Add(self.buttons[GS_JOIN], 0, wx.EXPAND)
169 self.sizers["roombtns"].Add(self.buttons[GS_JOINLOBBY], 0, wx.EXPAND) 169 self.sizers["roombtns"].Add(self.buttons[GS_JOINLOBBY], 0, wx.EXPAND)
240 self.log.log("Exit game_server_panel->build_ctrls(self)", ORPG_DEBUG) 240 self.log.log("Exit game_server_panel->build_ctrls(self)", ORPG_DEBUG)
241 241
242 #--------------------------------------------------------- 242 #---------------------------------------------------------
243 # [END] Snowdog: Updated Game Server Window 12/02 243 # [END] Snowdog: Updated Game Server Window 12/02
244 #--------------------------------------------------------- 244 #---------------------------------------------------------
245
246 245
247 #----------------------------------------------------- 246 #-----------------------------------------------------
248 # on_server_dbclick() 247 # on_server_dbclick()
249 # support for double click selection of server. 248 # support for double click selection of server.
250 # 5/16/05 -- Snowdog 249 # 5/16/05 -- Snowdog
462 self.log.log("Exit game_server_panel->refresh_room_list(self)", ORPG_DEBUG) 461 self.log.log("Exit game_server_panel->refresh_room_list(self)", ORPG_DEBUG)
463 462
464 def autosizeRooms(self): 463 def autosizeRooms(self):
465 self.log.log("Enter game_server_panel->autosizeRooms(self)", ORPG_DEBUG) 464 self.log.log("Enter game_server_panel->autosizeRooms(self)", ORPG_DEBUG)
466 self.room_list.SetColumnWidth(0, wx.LIST_AUTOSIZE) 465 self.room_list.SetColumnWidth(0, wx.LIST_AUTOSIZE)
467 self.room_list.SetColumnWidth(1, wx.LIST_AUTOSIZE) 466 #self.room_list.SetColumnWidth(1, wx.LIST_AUTOSIZE)
468 self.room_list.SetColumnWidth(2, wx.LIST_AUTOSIZE) 467 #self.room_list.SetColumnWidth(2, wx.LIST_AUTOSIZE)
468 if self.room_list.GetColumnWidth(0) < 70: self.room_list.SetColumnWidth(0, 70)
469 if self.room_list.GetColumnWidth(1) < 70: self.room_list.SetColumnWidth(1, 70)
470 if self.room_list.GetColumnWidth(2) < 50: self.room_list.SetColumnWidth(2, 50)
469 self.log.log("Exit game_server_panel->autosizeRooms(self)", ORPG_DEBUG) 471 self.log.log("Exit game_server_panel->autosizeRooms(self)", ORPG_DEBUG)
470 472
471 def refresh_server_list(self): 473 def refresh_server_list(self):
472 self.log.log("Enter game_server_panel->refresh_server_list(self)", ORPG_DEBUG) 474 self.log.log("Enter game_server_panel->refresh_server_list(self)", ORPG_DEBUG)
473 475
525 self.servers = node_list 527 self.servers = node_list
526 528
527 # No server is currently selected!!! Versus the broken and random 0! 529 # No server is currently selected!!! Versus the broken and random 0!
528 self.cur_server_index = -1 530 self.cur_server_index = -1
529 self.server_list.SetColumnWidth(0, wx.LIST_AUTOSIZE) 531 self.server_list.SetColumnWidth(0, wx.LIST_AUTOSIZE)
532 if self.server_list.GetColumnWidth(0) < 70: self.server_list.SetColumnWidth(0, 70)
530 self.server_list.SetColumnWidth(1, wx.LIST_AUTOSIZE) 533 self.server_list.SetColumnWidth(1, wx.LIST_AUTOSIZE)
531 534
532 if self.serverNameSet == 0: 535 if self.serverNameSet == 0:
533 # Pointless to constantly set the address field to random 536 # Pointless to constantly set the address field to random
534 # server. This way, at least, if someone has their own local 537 # server. This way, at least, if someone has their own local