1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:53:51 +00:00

add indication which filter is selected

This commit is contained in:
scrawl 2012-05-12 22:00:15 +02:00
parent 902309a554
commit 822e5fbe1e
2 changed files with 14 additions and 0 deletions

View file

@ -66,6 +66,8 @@ namespace MWGui
mFilterApparel->eventMouseButtonClick += MyGUI::newDelegate(this, &InventoryWindow::onFilterChanged); mFilterApparel->eventMouseButtonClick += MyGUI::newDelegate(this, &InventoryWindow::onFilterChanged);
mFilterMagic->eventMouseButtonClick += MyGUI::newDelegate(this, &InventoryWindow::onFilterChanged); mFilterMagic->eventMouseButtonClick += MyGUI::newDelegate(this, &InventoryWindow::onFilterChanged);
mFilterMisc->eventMouseButtonClick += MyGUI::newDelegate(this, &InventoryWindow::onFilterChanged); mFilterMisc->eventMouseButtonClick += MyGUI::newDelegate(this, &InventoryWindow::onFilterChanged);
mFilterAll->setStateSelected(true);
} }
void InventoryWindow::openInventory() void InventoryWindow::openInventory()
@ -92,6 +94,14 @@ namespace MWGui
setFilter(ContainerBase::Filter_Magic); setFilter(ContainerBase::Filter_Magic);
else if (_sender == mFilterMisc) else if (_sender == mFilterMisc)
setFilter(ContainerBase::Filter_Misc); setFilter(ContainerBase::Filter_Misc);
mFilterAll->setStateSelected(false);
mFilterWeapon->setStateSelected(false);
mFilterApparel->setStateSelected(false);
mFilterMagic->setStateSelected(false);
mFilterMisc->setStateSelected(false);
static_cast<MyGUI::Button*>(_sender)->setStateSelected(true);
} }
} }

View file

@ -62,6 +62,10 @@
<State name="normal" colour="0.75 0.6 0.35" shift="0"/> <State name="normal" colour="0.75 0.6 0.35" shift="0"/>
<State name="highlighted" colour="0.85 0.76 0.60" shift="0"/> <State name="highlighted" colour="0.85 0.76 0.60" shift="0"/>
<State name="pushed" colour="1 1 1" shift="0"/> <State name="pushed" colour="1 1 1" shift="0"/>
<State name="disabled_checked" colour="0.33 0.38 0.67" shift="0"/>
<State name="normal_checked" colour="0.33 0.38 0.67" shift="0"/>
<State name="highlighted_checked" colour="0.33 0.38 0.67" shift="0"/>
<State name="pushed_checked" colour="0.33 0.38 0.67" shift="0"/>
</BasisSkin> </BasisSkin>
</Skin> </Skin>
</MyGUI> </MyGUI>