| 111 | } |
| 112 | |
| 113 | void 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 | |
| 147 | void ListBox::eventOccured(Event *e) |
| 148 | { |