def _update(self, timeSinceLastFrame): """Translate update message to child items """ ObjectOverlay._update(self, timeSinceLastFrame) for child in self.childs: child._update(timeSinceLastFrame)
def __init__(self): ObjectOverlay.__init__(self) self.width = 550 self.height = 100 self.viewer = logic_viewer.TextViewer() self._widget = render_engine.Gui.createWidgetT("Window", "Panel", mygui.IntCoord( (render_engine.Window.width) / 2 - (self.width) / 2, render_engine.Window.height - self.height, self.width, self.height), mygui.Align()) self.setVisible(False) self.infoText = self._widget.createWidgetT("Edit", "Edit", mygui.IntCoord(15, 15, self.width - 30, self.height - 30), mygui.Align()) self.infoText.setCaption("Logic Edit Panel") self.setVisible(True) self.setEnabled(True) self.button = self._widget.createWidgetT("Button", "Button", mygui.IntCoord(self.width-100, self.height-45, 80, 25), mygui.Align()) self.button.subscribeEventMouseButtonClick(self, 'textAccept') self.button.setCaption("Enter") self.button.setVisible(True) self.button.setEnabled(True) # flag to update information self.needInfoUpdate = False
def _updateView(self): """Update view representation of menu item """ ObjectOverlay._updateView(self) # updating view in child items for item in self.childs: item._updateView()
def _updateView(self): ObjectOverlay._updateView(self) if self.needInfoUpdate: if self.object is not None: self.infoText.setCaption(self.object.getPropertiesAsString()) else: self.infoText.setCaption("") self.needInfoUpdate = False
def __init__(self): ObjectOverlay.__init__(self) self.parent = None self.childs = [] self.callback = None self._auto_move = True self._createWidget()
def _updateView(self): """Update view message """ ObjectOverlay._updateView(self) if self.needImageUpdate: self.needImageUpdate = False self._updateImage() if self.needCheckUpdate: self.needCheckUpdate = False self._updateCheck()
def _updateView(self): """Update toolbar view """ ObjectOverlay._updateView(self) if self.needLayoutUpdate: self.needLayoutUpdate = False self.updateLayout() if self.needButtonsUpdate: self.needButtonsUpdate = False self.updateButtons()
def __init__(self): ObjectOverlay.__init__(self) self.buttons_size = 32 # buttons size (buttons are squares) self.needLayoutUpdate = True # flag to update size self.needButtonsUpdate = False # flag to update buttons self.align = ToolBar.Left # alignment self.min_length = 100 # minimal length self.max_length = 550 # maximum length self.createWidget()
def __init__(self): ObjectOverlay.__init__(self) self.width = 250 self.height = 450 self._widget = render_engine.Gui.createWidgetT("Window", "Panel", mygui.IntCoord(-10, (render_engine.Window.height - self.height) / 2, self.width, self.height), mygui.Align()) self.infoText = self._widget.createWidgetT("StaticText", "StaticText", mygui.IntCoord(15, 15, self.width - 30, self.height - 30), mygui.Align()) self.setVisible(False) self.setEnabled(True) self.object = None # flag to update information self.needInfoUpdate = False
def __init__(self): ObjectOverlay.__init__(self) self.width = 250 self.height = 450 self._widget = render_engine.Gui.createWidgetT( "Window", "Panel", mygui.IntCoord(-10, (render_engine.Window.height - self.height) / 2, self.width, self.height), mygui.Align()) self.infoText = self._widget.createWidgetT( "StaticText", "StaticText", mygui.IntCoord(15, 15, self.width - 30, self.height - 30), mygui.Align()) self.setVisible(False) self.setEnabled(True) self.object = None # flag to update information self.needInfoUpdate = False
def __init__(self, parent, texture_name, index, tile_size, image_coord): """Constructor @param parent: parent object @type parent: ObjectOverlay @param texture_name: name of texture to get image @type taxture_name: str @param index: tile index @type index: int @param tile_size: size of image tile @type tile_size: (int, int) @param image_coord: coordinates on image to get tiles @type image_coord: (int, int, int, int) -> (let, top, width, height) """ ObjectOverlay.__init__(self, parent) self.autoSize = False self.static_image = None self.needImageUpdate = True self.texture = texture_name self.index = index self.tile_size = tile_size self.image_coord = image_coord self.checkable = False # flag to use button as check button self.checked = False # check state self.user_data = None # user data to associate with button self.eventPush = None self.needCheckUpdate = False # flag to update check state self.createWidget()
def _update(self, timeSinceLastFrame): """Update object """ ObjectOverlay._update(self, timeSinceLastFrame)
def __del__(self): ObjectOverlay.__del__(self)
def delete(self): ObjectOverlay.__del__(self) self.destroyWidget()
def setVisible(self, _value): """@see: suit.objects.OverlayObject.setVisible """ ObjectOverlay.setVisible(self, _value) self.needEnabledUpdate = True
def delete(self): ObjectOverlay.delete(self)
def delete(self): ObjectOverlay.delete(self) self.viewer.delete()
def _updateView(self): ObjectOverlay._updateView(self) #TODO update