* @brief Get the current value for the slider */
| 390 | * @brief Get the current value for the slider |
| 391 | */ |
| 392 | int gmenu_slider_get(TMenuItem *pItem, int min, int max) |
| 393 | { |
| 394 | int nSteps, step; |
| 395 | |
| 396 | step = pItem->dwFlags & 0xFFF; |
| 397 | nSteps = (int)(pItem->dwFlags & 0xFFF000) >> 12; |
| 398 | if (nSteps < 2) |
| 399 | nSteps = 2; |
| 400 | return min + (step * (max - min) + (nSteps - 1) / 2) / nSteps; |
| 401 | } |
| 402 | |
| 403 | /** |
| 404 | * @brief Set the number of steps for the slider |
no outgoing calls
no test coverage detected