| 231 | } |
| 232 | |
| 233 | void Snapshots::DrawModuleUnclipped() |
| 234 | { |
| 235 | if (mDisplayMode == DisplayMode::Grid) |
| 236 | { |
| 237 | int hover = mGrid->CurrentHover(); |
| 238 | if (hover >= 0 && hover < mSnapshotCollection.size()) |
| 239 | { |
| 240 | std::string tooltip = mSnapshotCollection[hover].mLabel; |
| 241 | ofVec2f pos = mGrid->GetCellPosition(hover % mGrid->GetCols(), hover / mGrid->GetCols()) + mGrid->GetPosition(true); |
| 242 | pos.x += (mGrid->GetWidth() / mGrid->GetCols()) + 3; |
| 243 | pos.y += (mGrid->GetHeight() / mGrid->GetRows()) / 2; |
| 244 | |
| 245 | float width = GetStringWidth(tooltip); |
| 246 | |
| 247 | ofFill(); |
| 248 | ofSetColor(50, 50, 50); |
| 249 | ofRect(pos.x, pos.y, width + 10, 15); |
| 250 | |
| 251 | ofNoFill(); |
| 252 | ofSetColor(255, 255, 255); |
| 253 | ofRect(pos.x, pos.y, width + 10, 15); |
| 254 | |
| 255 | ofSetColor(255, 255, 255); |
| 256 | DrawTextNormal(tooltip, pos.x + 5, pos.y + 12); |
| 257 | } |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | bool Snapshots::HasSnapshot(int index) const |
| 262 | { |
nothing calls this directly
no test coverage detected