diff --git a/.github/workflows/nightly-server.yml b/.github/workflows/nightly-server.yml index 23ea2cb7..5450de9a 100644 --- a/.github/workflows/nightly-server.yml +++ b/.github/workflows/nightly-server.yml @@ -50,7 +50,7 @@ jobs: buildPresetAdditionalArgs: "['--target', 'Minecraft.Server']" - name: Zip Build - run: 7z a -r LCEServer${{ matrix.platform }}.zip ./build/${{ env.MATRIX_PLATFORM }}/Minecraft.Server/Release/* -x!*.ipdb -x!*.iobj + run: 7z a -r LCEServer${{ matrix.platform }}.zip ./build/${{ env.MATRIX_PLATFORM }}/Minecraft.Server/Release/* "-x!*.ipdb" "-x!*.iobj" - name: Stage artifacts run: | @@ -93,7 +93,7 @@ jobs: files: | artifacts/* - docker-publish: + docker: name: Build and Push Docker Image runs-on: ubuntu-latest needs: build @@ -157,7 +157,7 @@ jobs: MC_RUNTIME_DIR=runtime cleanup: - needs: [build, release] + needs: [build, release, docker] if: always() runs-on: ubuntu-latest steps: diff --git a/Minecraft.Client/Common/UI/UIControl_Slider.cpp b/Minecraft.Client/Common/UI/UIControl_Slider.cpp index 2d56a29c..c9b773a7 100644 --- a/Minecraft.Client/Common/UI/UIControl_Slider.cpp +++ b/Minecraft.Client/Common/UI/UIControl_Slider.cpp @@ -66,12 +66,44 @@ void UIControl_Slider::init(UIString label, int id, int min, int max, int curren #endif } +bool IsUsingKeyboardMouse() +{ +#ifdef _WINDOWS64 + + if (g_KBMInput.IsKBMActive()) return true; + + return g_KBMInput.HasAnyInput(); +#else + return false; +#endif +} + void UIControl_Slider::handleSliderMove(int newValue) { if (m_current!=newValue) { - ui.PlayUISFX(eSFX_Scroll); - m_current = newValue; + int valueCount = 1; + if (!m_allPossibleLabels.empty()) { + valueCount = static_cast(m_allPossibleLabels.size()); + } + else { + long long range = static_cast(m_max) - static_cast(m_min) + 1; + if (range <= 0) range = 1; + valueCount = static_cast(range); + } + + if (IsUsingKeyboardMouse() == true) { + if (newValue % 10 == 0) { + ui.PlayUISFX(eSFX_Scroll); + m_current = newValue; + } else if (valueCount <= 20) { + ui.PlayUISFX(eSFX_Scroll); + m_current = newValue; + } + } else { + ui.PlayUISFX(eSFX_Scroll); + m_current = newValue; + } if(newValue < m_allPossibleLabels.size()) {