| 30 | |
| 31 | |
| 32 | void SvgButton::addFrame(std::shared_ptr<window::Svg> svg) { |
| 33 | frames.push_back(svg); |
| 34 | // If this is our first frame, automatically set SVG and size |
| 35 | if (!sw->svg) { |
| 36 | sw->setSvg(svg); |
| 37 | box.size = sw->box.size; |
| 38 | fb->box.size = sw->box.size; |
| 39 | // Move shadow downward by 10% |
| 40 | shadow->box.size = sw->box.size; |
| 41 | shadow->box.pos = math::Vec(0, sw->box.size.y * 0.10); |
| 42 | fb->setDirty(); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | |
| 47 | void SvgButton::onDragStart(const DragStartEvent& e) { |