mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-01-26 17:54:46 +01:00
Added support for reloadableText type="collectionIndexSize". This will print
<selected item index>/<collection size>.
This commit is contained in:
parent
4da301802b
commit
822ce8d462
@ -188,17 +188,33 @@ void ReloadableText::ReloadTexture()
|
||||
{
|
||||
if (page.getSelectedIndex() == 0)
|
||||
{
|
||||
ss << singlePrefix_ << page.getSelectedIndex() << pluralPostfix_;
|
||||
ss << singlePrefix_ << (page.getSelectedIndex()+1) << pluralPostfix_;
|
||||
}
|
||||
else if (page.getSelectedIndex() == 1)
|
||||
{
|
||||
ss << singlePrefix_ << page.getSelectedIndex() << singlePostfix_;
|
||||
ss << singlePrefix_ << (page.getSelectedIndex()+1) << singlePostfix_;
|
||||
}
|
||||
else
|
||||
{
|
||||
ss << pluralPrefix_ << page.getSelectedIndex() << pluralPostfix_;
|
||||
ss << pluralPrefix_ << (page.getSelectedIndex()+1) << pluralPostfix_;
|
||||
}
|
||||
} else if (!selectedItem->leaf) // item is not a leaf
|
||||
}
|
||||
else if (type_ == "collectionIndexSize")
|
||||
{
|
||||
if (page.getSelectedIndex() == 0)
|
||||
{
|
||||
ss << singlePrefix_ << (page.getSelectedIndex()+1) << "/" << page.getCollectionSize() << pluralPostfix_;
|
||||
}
|
||||
else if (page.getSelectedIndex() == 1)
|
||||
{
|
||||
ss << singlePrefix_ << (page.getSelectedIndex()+1) << "/" << page.getCollectionSize() << singlePostfix_;
|
||||
}
|
||||
else
|
||||
{
|
||||
ss << pluralPrefix_ << (page.getSelectedIndex()+1) << "/" << page.getCollectionSize() << pluralPostfix_;
|
||||
}
|
||||
}
|
||||
else if (!selectedItem->leaf) // item is not a leaf
|
||||
{
|
||||
(void)config_.getProperty("collections." + selectedItem->name + "." + type_, text );
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user