* OptionList: Fix embarrassing flipped switch bug.

This commit is contained in:
iProgramInCpp
2023-12-20 12:59:51 +02:00
parent d12f6e3848
commit a3c9800bd8
2 changed files with 3 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -195,9 +195,11 @@ bool OptionList::isSelectedItem(int index)
void OptionList::drawOnOffSwitch(int x, int y, bool state, bool disabled)
{
// Obs: The color setting that affected disabled items' texts will also affect this.
m_pMinecraft->m_pTextures->loadAndBindTexture("gui/gui_custom.png");
blit(x, y, 0, state ? 18 : 0, C_ON_OFF_SWITCH_WIDTH, C_ON_OFF_SWITCH_HEIGHT, C_ON_OFF_SWITCH_WIDTH, C_ON_OFF_SWITCH_HEIGHT);
blit(x, y, 0, state ? 0 : 18, C_ON_OFF_SWITCH_WIDTH, C_ON_OFF_SWITCH_HEIGHT, C_ON_OFF_SWITCH_WIDTH, C_ON_OFF_SWITCH_HEIGHT);
m_pMinecraft->m_pTextures->loadAndBindTexture("gui/gui.png");// bind the old texture back
}