mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 15:26:37 +00:00
MiRCART{Canvas,Frame}.py: include canvas width and height in status bar.
This commit is contained in:
parent
12027bc6b5
commit
e157f479ce
@ -150,7 +150,8 @@ class MiRCARTCanvas(wx.Panel):
|
|||||||
self.canvasBackend.cellSize)])
|
self.canvasBackend.cellSize)])
|
||||||
self.canvasBackend.reset(self.canvasSize, self.canvasBackend.cellSize)
|
self.canvasBackend.reset(self.canvasSize, self.canvasBackend.cellSize)
|
||||||
self.canvasJournal.resetCursor(); self.canvasJournal.resetUndo();
|
self.canvasJournal.resetCursor(); self.canvasJournal.resetUndo();
|
||||||
self.parentFrame.onCanvasUpdate(newUndoLevel=-1)
|
self.parentFrame.onCanvasUpdate( \
|
||||||
|
newSize=self.canvasSize, newUndoLevel=-1)
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -34,7 +34,7 @@ import os, wx
|
|||||||
class MiRCARTFrame(MiRCARTGeneralFrame):
|
class MiRCARTFrame(MiRCARTGeneralFrame):
|
||||||
"""XXX"""
|
"""XXX"""
|
||||||
panelCanvas = None
|
panelCanvas = None
|
||||||
lastCellPos = lastColours = lastPathName = lastUndoLevel = None
|
lastCellPos = lastColours = lastPathName = lastSize = lastUndoLevel = None
|
||||||
|
|
||||||
# {{{ Commands
|
# {{{ Commands
|
||||||
# Id Type Id Labels Icon bitmap Accelerator [Initial state]
|
# Id Type Id Labels Icon bitmap Accelerator [Initial state]
|
||||||
@ -158,20 +158,24 @@ class MiRCARTFrame(MiRCARTGeneralFrame):
|
|||||||
else:
|
else:
|
||||||
self.itemsById[eventId][7](self.panelCanvas.canvasInterface, event)
|
self.itemsById[eventId][7](self.panelCanvas.canvasInterface, event)
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ onCanvasUpdate(self, newCellPos=None, newColours=None, newPathName=None, newUndoLevel=None): XXX
|
# {{{ onCanvasUpdate(self, newCellPos=None, newColours=None, newPathName=None, newSize=None, newUndoLevel=None): XXX
|
||||||
def onCanvasUpdate(self, newCellPos=None, newColours=None, newPathName=None, newUndoLevel=None):
|
def onCanvasUpdate(self, newCellPos=None, newColours=None, newPathName=None, newSize=None, newUndoLevel=None):
|
||||||
if newCellPos != None:
|
if newCellPos != None:
|
||||||
self.lastCellPos = newCellPos
|
self.lastCellPos = newCellPos
|
||||||
if newColours != None:
|
if newColours != None:
|
||||||
self.lastColours = newColours
|
self.lastColours = newColours
|
||||||
if newPathName != None:
|
if newPathName != None:
|
||||||
self.lastPathName = newPathName
|
self.lastPathName = newPathName
|
||||||
|
if newSize != None:
|
||||||
|
self.lastSize = newSize
|
||||||
if newUndoLevel != None:
|
if newUndoLevel != None:
|
||||||
self.lastUndoLevel = newUndoLevel
|
self.lastUndoLevel = newUndoLevel
|
||||||
textItems = []
|
textItems = []
|
||||||
if self.lastCellPos != None:
|
if self.lastCellPos != None:
|
||||||
textItems.append("X: {:03d} Y: {:03d}".format( \
|
textItems.append("X: {:03d} Y: {:03d}".format( \
|
||||||
*self.lastCellPos))
|
*self.lastCellPos))
|
||||||
|
if self.lastSize != None:
|
||||||
|
textItems.append("W: {:03d} H: {:03d}".format(*self.lastSize))
|
||||||
if self.lastColours != None:
|
if self.lastColours != None:
|
||||||
textItems.append("FG: {:02d}, BG: {:02d}".format( \
|
textItems.append("FG: {:02d}, BG: {:02d}".format( \
|
||||||
*self.lastColours))
|
*self.lastColours))
|
||||||
|
Loading…
Reference in New Issue
Block a user