Ok point me in the right direction again … I need to draw a semi-transparent bar graph on my main window. What construct would I use to draw the simple little box? I use LineSegs for line graphs and that works fine …
Thanks,
Paul
Ok point me in the right direction again … I need to draw a semi-transparent bar graph on my main window. What construct would I use to draw the simple little box? I use LineSegs for line graphs and that works fine …
Thanks,
Paul
Try CardMaker.
David
Oh man awesome, THANKS!
Bar Graph Creation …
cm = CardMaker('DecorationCard')
self.mThrustCard = render2d.attachNewNode(cm.generate())
self.mThrustCard.setScale(0.03, 0.2, 0.8)
self.mThrustCard.setPos(-0.97,0,-0.95)
self.mThrustCard.setLightOff()
self.mThrustCard.setColor(1.000, 0.788, 0.000, 0.5)
self.mThrustCard.setTransparency(1)
self.mVelocityCard = render2d.attachNewNode(cm.generate())
self.mVelocityCard.setScale(0.03, 0.2, 0.8)
self.mVelocityCard.setPos(-0.90,0,-0.95)
self.mVelocityCard.setLightOff()
self.mVelocityCard.setColor(0.522, 0.910, 0.800, 0.5)
self.mVelocityCard.setTransparency(1)
Bar Graph Update …
ts = self.__MissileExt.getScaledThrust()
self.mThrustCard.setScale(0.05, 0.2, ts)
vs = self.__MissileExt.getScaledVelocity()
self.mVelocityCard.setScale(0.05, 0.2, vs)