MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / setButtonImages

Method setButtonImages

source/windowing/StarScrollArea.cpp:114–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void 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
131Vec2I ScrollBar::size() const {
132 if (m_parent)

Callers 1

scrollAreaHandlerMethod · 0.80

Calls 3

getStringMethod · 0.80
setImagesMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected