def setForegroundColor(self, color): Widget.setForegroundColor(self, color) cursor = self.widget.guiItem.getCursorDef().getChild(0).node() writer = panda.GeomVertexWriter(cursor.modifyGeom(0).modifyVertexData(), "color") writer.setData4f(panda.Vec4(*color)) writer.setData4f(panda.Vec4(*color))
def getBounds(self, node = None): if self.frame: bounds = self.getFrame(node) return (panda.Point2(bounds[0], bounds[2]), panda.Point2(bounds[1], bounds[3])) else: return Widget.getBounds(self, node)