| 226 | } |
| 227 | |
| 228 | void StoreUtils::DrawQueueMenu(const int queueIndex) { |
| 229 | Gui::Draw_Rect(40, 0, 280, 25, UIThemes->EntryBar()); |
| 230 | Gui::Draw_Rect(40, 25, 280, 1, UIThemes->EntryOutline()); |
| 231 | Gui::DrawStringCentered(17, 2, 0.6, UIThemes->TextColor(), Lang::get("QUEUE"), 273, 0, font); |
| 232 | |
| 233 | if (!queueEntries.empty()) { |
| 234 | Gui::Draw_Rect(QueueBoxes[0].x, QueueBoxes[0].y, QueueBoxes[0].w, QueueBoxes[0].h, UIThemes->MarkSelected()); |
| 235 | |
| 236 | const C2D_Image tempImg = queueEntries[0]->icn; |
| 237 | const uint8_t offsetW = (48 - tempImg.subtex->width) / 2; // Center W. |
| 238 | const uint8_t offsetH = (48 - tempImg.subtex->height) / 2; // Center H. |
| 239 | C2D_DrawImageAt(tempImg, QueueBoxes[0].x + 5 + offsetW, QueueBoxes[0].y + 21 + offsetH, 0.5f); |
| 240 | |
| 241 | DrawStatus(queueEntries[0]->status); |
| 242 | GFX::DrawIcon(sprites_cancel_idx, QueueBoxes[2].x, QueueBoxes[2].y, UIThemes->TextColor()); |
| 243 | |
| 244 | /* The next Queue Entries being displayed below. */ |
| 245 | if ((1 + queueMenuIdx) < (int)queueEntries.size()) { |
| 246 | Gui::Draw_Rect(QueueBoxes[1].x, QueueBoxes[1].y, QueueBoxes[1].w, QueueBoxes[1].h, UIThemes->MarkUnselected()); |
| 247 | |
| 248 | const C2D_Image tempImg2 = queueEntries[1 + queueMenuIdx]->icn; |
| 249 | const uint8_t offsetW2 = (48 - tempImg2.subtex->width) / 2; // Center W. |
| 250 | const uint8_t offsetH2 = (48 - tempImg2.subtex->height) / 2; // Center H. |
| 251 | C2D_DrawImageAt(tempImg2, QueueBoxes[1].x + 5 + offsetW2, QueueBoxes[1].y + 21 + offsetH2, 0.5f); |
| 252 | |
| 253 | Gui::DrawString(QueueBoxes[1].x + 10, QueueBoxes[1].y + 5, 0.4f, UIThemes->TextColor(), queueEntries[1 + queueMenuIdx]->name, 230, 0, font); |
| 254 | |
| 255 | Gui::DrawString(QueueBoxes[1].x + 60, QueueBoxes[1].y + 30, 0.4f, UIThemes->TextColor(), Lang::get("QUEUE_POSITION") + ": " + std::to_string(queueMenuIdx + 1), 0, 0, font); |
| 256 | |
| 257 | /* Cancel. */ |
| 258 | GFX::DrawIcon(sprites_cancel_idx, QueueBoxes[3].x, QueueBoxes[3].y, UIThemes->TextColor()); |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | void StoreUtils::QueueMenuHandle(int &queueIndex, int &storeMode) { |
| 264 | if (!queueEntries.empty()) { |
nothing calls this directly
no test coverage detected