Feat/gui enhancements (#54)

fix slider sounds
fix button sounds in settings page

---------

Co-authored-by: DrPerkyLegit <116128211+DrPerkyLegit@users.noreply.github.com>
Reviewed-on: https://git.neolegacy.dev/neoStudiosLCE/neoLegacy/pulls/54
Co-authored-by: DrPerkyLegit <6+drperkylegit@noreply.neolegacy.dev>
Co-committed-by: DrPerkyLegit <6+drperkylegit@noreply.neolegacy.dev>
This commit is contained in:
DrPerkyLegit
2026-07-19 15:42:27 +01:00
committed by TheHuckle
co-authored by DrPerkyLegit
parent a248586ad9
commit 18136070c1
7 changed files with 36 additions and 10 deletions
@@ -169,10 +169,35 @@ void UIControl_MultiList::AddNewSlider(const wstring &label, int id, int minVal,
IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result,
getIggyValuePath(), m_funcAddNewItem_Slider, 5, value);
m_sliderValues.emplace(id, initialVal);
m_itemIds.push_back(id);
++m_itemCount;
}
void UIControl_MultiList::handleSliderMove(int id, int newValue) {
auto it = m_sliderValues.find(id);
if (it == m_sliderValues.end()) return;
if (newValue != it->second) {
int valueCount = 1;
if (g_KBMInput.IsKBMActive() && g_KBMInput.HasAnyInput()) {
if (newValue % 10 == 0) {
ui.PlayUISFX(eSFX_Scroll);
it->second = newValue;
} else if (valueCount <= 20) {
ui.PlayUISFX(eSFX_Scroll);
it->second = newValue;
}
} else {
ui.PlayUISFX(eSFX_Scroll);
it->second = newValue;
}
}
}
void UIControl_MultiList::AddNewTextInput(const wstring &label, int id)
{
IggyDataValue result;
@@ -324,6 +349,7 @@ void UIControl_MultiList::clearList()
getIggyValuePath(), m_removeAllItemsFunc, 0, nullptr);
m_itemIds.clear();
m_sliderValues.clear();
m_itemCount = 0;
m_iCurrentSelection = 0;
}