Mercurial > traipse_dev
diff orpg/mapper/background.py @ 152:6081bdc2b8d5 beta
Traipse Beta 'OpenRPG' {091125-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 (Beta)
Added Bookmarks
Fix to Remote Admin Commands
Minor fix to text based Server
Fix to Pretty Print, from Core
Fix to Splitter Nodes not being created
Fix to massive amounts of images loading, from Core
Added 'boot' command to remote admin
Added confirmation window for sent nodes
Minor changes to allow for portability to an OpenSUSE linux OS
Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG
Zoom Mouse plugin added
Images added to Plugin UI
Switching to Element Tree
Map efficiency, from FlexiRPG
Added Status Bar to Update Manager
default_manifest.xml renamed to default_upmana.xml
Cleaner clode for saved repositories
New TrueDebug Class in orpg_log (See documentation for usage)
Mercurial's hgweb folder is ported to upmana
Pretty important update that can help remove thousands of dead children from your
gametree.
Children, <forms />, <group_atts />, <horizontal />, <cols />, <rows />, <height
/>, etc... are all tags now. Check your gametree and look for dead children!!
New Gametree Recursion method, mapping, and context sensitivity. !Infinite Loops
return error instead of freezing the software!
New Syntax added for custom PC sheets
Tip of the Day added, from Core and community
Fixed Whiteboard ID to prevent random line or text deleting. Modified ID's to
prevent non updated clients from ruining the fix.
author | sirebral |
---|---|
date | Wed, 25 Nov 2009 06:16:35 -0600 |
parents | e842a5f1b775 |
children | dcae32e219f1 |
line wrap: on
line diff
--- a/orpg/mapper/background.py Tue Nov 24 17:18:40 2009 -0600 +++ b/orpg/mapper/background.py Wed Nov 25 06:16:35 2009 -0600 @@ -29,15 +29,10 @@ __version__ = "$Id: background.py,v 1.29 2007/03/09 14:11:55 digitalxero Exp $" from base import * -import thread -import urllib -import os.path -import time -import mimetypes +import thread, urllib, os.path, time, mimetypes from orpg.orpgCore import component from orpg.tools.orpg_log import logger -from orpg.tools.decorators import debugging from orpg.tools.orpg_settings import settings ##----------------------------- @@ -59,14 +54,12 @@ self.r_h = RGBHex() self.clear() - def error_loading_image(self, image): msg = "Unable to load image:" + `image` dlg = wx.MessageDialog(self.canvas,msg,'File not Found',wx.ICON_EXCLAMATION) dlg.ShowModal() dlg.Destroy() - def clear(self): self.type = BG_NONE self.bg_bmp = None @@ -77,16 +70,13 @@ self.localTime = -1 self.isUpdated = True - def get_type(self): return self.type - def get_img_path(self): if self.img_path: return self.img_path else: return "" - def get_color(self): hexcolor = "#FFFFFF" if self.bg_color: @@ -94,7 +84,6 @@ hexcolor = self.r_h.hexstring(red, green, blue) return hexcolor - def set_texture(self, path): self.isUpdated = True self.type = BG_TEXTURE @@ -107,7 +96,6 @@ except: self.error_loading_image(path) self.img_path = path - def set_image(self, path, scale): self.isUpdated = True self.type = BG_IMAGE @@ -121,7 +109,6 @@ self.img_path = path return (self.bg_bmp.GetWidth(),self.bg_bmp.GetHeight()) - def set_color(self, color): self.isUpdated = True self.type = BG_COLOR @@ -129,7 +116,6 @@ self.bg_color = cmpColour(r,g,b) self.canvas.SetBackgroundColour(self.bg_color) - def layerDraw(self, dc, scale, topleft, size): if self.bg_bmp == None or not self.bg_bmp.Ok() or ((self.type != BG_TEXTURE) and (self.type != BG_IMAGE)): return False @@ -204,7 +190,6 @@ del dc2 return True - def layerToXML(self, action="update"): xml_str = "<bg" if self.bg_color != None: @@ -224,7 +209,6 @@ return xml_str else: return '' - def layerTakeDOM(self, xml_dom): type = BG_COLOR color = xml_dom.getAttribute("color") @@ -257,7 +241,6 @@ postdata = urllib.urlencode({'filename':filename[1], 'imgdata':imgdata, 'imgtype':imgtype}) thread.start_new_thread(self.upload, (postdata, self.localPath, type)) - def upload(self, postdata, filename, type): self.lock.acquire() if type == 'Image' or type == 'Texture':