| 112 | } |
| 113 | |
| 114 | void ScrollBar::setButtonImages(Json const& images) { |
| 115 | String directionString; |
| 116 | if (m_direction == GuiDirection::Vertical) { |
| 117 | directionString = "vertical"; |
| 118 | } else { |
| 119 | directionString = "horizontal"; |
| 120 | } |
| 121 | |
| 122 | m_forward->setImages(images.get(directionString).get("forward").getString("base"), |
| 123 | images.get(directionString).get("forward").getString("hover"), |
| 124 | images.get(directionString).get("forward").getString("pressed")); |
| 125 | |
| 126 | m_backward->setImages(images.get(directionString).get("backward").getString("base"), |
| 127 | images.get(directionString).get("backward").getString("hover"), |
| 128 | images.get(directionString).get("backward").getString("pressed")); |
| 129 | } |
| 130 | |
| 131 | Vec2I ScrollBar::size() const { |
| 132 | if (m_parent) |
no test coverage detected