add indication which filter is selected

actorid
scrawl 13 years ago
parent 902309a554
commit 822e5fbe1e

@ -66,6 +66,8 @@ namespace MWGui
mFilterApparel->eventMouseButtonClick += MyGUI::newDelegate(this, &InventoryWindow::onFilterChanged);
mFilterMagic->eventMouseButtonClick += MyGUI::newDelegate(this, &InventoryWindow::onFilterChanged);
mFilterMisc->eventMouseButtonClick += MyGUI::newDelegate(this, &InventoryWindow::onFilterChanged);
mFilterAll->setStateSelected(true);
}
void InventoryWindow::openInventory()
@ -92,6 +94,14 @@ namespace MWGui
setFilter(ContainerBase::Filter_Magic);
else if (_sender == mFilterMisc)
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);
}
}

@ -62,6 +62,10 @@
<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="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>
</Skin>
</MyGUI>

Loading…
Cancel
Save