From e4e368948b0a2f8637f25ee63dc5a0d4ac44cded Mon Sep 17 00:00:00 2001 From: BC Ko Date: Sat, 28 Aug 2021 16:56:26 -0700 Subject: [PATCH] documentation cleanup: gmenu --- Source/gmenu.cpp | 9 --------- Source/gmenu.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index aaa6fef93..589ee1c49 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -347,9 +347,6 @@ void gmenu_enable(TMenuItem *pMenuItem, bool enable) pMenuItem->dwFlags &= ~GMENU_ENABLED; } -/** - * @brief Set the TMenuItem slider position based on the given value - */ void gmenu_slider_set(TMenuItem *pItem, int min, int max, int value) { assert(pItem); @@ -358,9 +355,6 @@ void gmenu_slider_set(TMenuItem *pItem, int min, int max, int value) pItem->dwFlags |= ((max - min - 1) / 2 + (value - min) * nSteps) / (max - min); } -/** - * @brief Get the current value for the slider - */ int gmenu_slider_get(TMenuItem *pItem, int min, int max) { uint16_t step = pItem->dwFlags & 0xFFF; @@ -368,9 +362,6 @@ int gmenu_slider_get(TMenuItem *pItem, int min, int max) return min + (step * (max - min) + (steps - 1) / 2) / steps; } -/** - * @brief Set the number of steps for the slider - */ void gmenu_slider_steps(TMenuItem *pItem, int steps) { pItem->dwFlags &= 0xFF000FFF; diff --git a/Source/gmenu.h b/Source/gmenu.h index c1dcd9fc6..1128d0ccb 100644 --- a/Source/gmenu.h +++ b/Source/gmenu.h @@ -32,8 +32,20 @@ bool gmenu_presskeys(int vkey); bool gmenu_on_mouse_move(); bool gmenu_left_mouse(bool isDown); void gmenu_enable(TMenuItem *pMenuItem, bool enable); + +/** + * @brief Set the TMenuItem slider position based on the given value + */ void gmenu_slider_set(TMenuItem *pItem, int min, int max, int value); + +/** + * @brief Get the current value for the slider + */ int gmenu_slider_get(TMenuItem *pItem, int min, int max); + +/** + * @brief Set the number of steps for the slider + */ void gmenu_slider_steps(TMenuItem *pItem, int steps); } // namespace devilution