MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / postRender

Method postRender

forms/listbox.cpp:113–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void ListBox::postRender()
114{
115 Control::postRender();
116 for (auto c = Controls.begin(); c != Controls.end(); c++)
117 {
118 auto ctrl = *c;
119 if (ctrl != scroller && ctrl->isVisible())
120 {
121 if (ctrl == hovered)
122 {
123 if (HoverImage)
124 {
125 fw().renderer->draw(HoverImage, ctrl->Location);
126 }
127 else
128 {
129 fw().renderer->drawRect(ctrl->Location, ctrl->Size, HoverColour);
130 }
131 }
132 if (ctrl == selected)
133 {
134 if (SelectedImage)
135 {
136 fw().renderer->draw(SelectedImage, ctrl->Location);
137 }
138 else
139 {
140 fw().renderer->drawRect(ctrl->Location, ctrl->Size, SelectedColour);
141 }
142 }
143 }
144 }
145}
146
147void ListBox::eventOccured(Event *e)
148{

Callers

nothing calls this directly

Calls 5

endMethod · 0.80
beginMethod · 0.45
isVisibleMethod · 0.45
drawMethod · 0.45
drawRectMethod · 0.45

Tested by

no test coverage detected