void BoxButton::specialDraw() const { // Bind render item before setting values and drawing mpIconRenderItem->bind(); // Super call Button::specialDraw(); // Scale of icon mpIconRenderItem->getShader()->fillValue("iconUVScale", iconAspectRatioCorrection()); // Orientation float orientation = 0; if (getParent() != NULL) { if (getParent()->getOrientation() == Element::Orientation::VERTICAL) { orientation = 1; } } mpIconRenderItem->getShader()->fillValue("orientation", orientation); // Draw render item mpIconRenderItem->draw(); }
void Sensor::specialDraw() const { // Bind render item before setting values and drawing mpRenderItem->bind(); // Super call InteractiveElement::specialDraw(); // Fill other values mpRenderItem->getShader()->fillValue("penetration", mPenetration.getValue()); // Scale of icon mpRenderItem->getShader()->fillValue("iconUVScale", iconAspectRatioCorrection()); // Draw render item mpRenderItem->draw(); }