mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
page numbering does not appear with no pages
This commit is contained in:
parent
3783e34a70
commit
89c58265aa
@ -221,10 +221,18 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
|
||||
m_Text.clear();
|
||||
|
||||
char buffer[255];
|
||||
if (m_AutoColors)
|
||||
_snprintf(buffer, sizeof(buffer)-1, "\\y%s %d/%d\n\\w\n", m_Title.c_str(), page + 1, pages);
|
||||
else
|
||||
_snprintf(buffer, sizeof(buffer)-1, "%s %d/%d\n\n", m_Title.c_str(), page + 1, pages);
|
||||
if (items_per_page && (pages != 1))
|
||||
{
|
||||
if (m_AutoColors)
|
||||
_snprintf(buffer, sizeof(buffer)-1, "\\y%s %d/%d\n\\w\n", m_Title.c_str(), page + 1, pages);
|
||||
else
|
||||
_snprintf(buffer, sizeof(buffer)-1, "%s %d/%d\n\n", m_Title.c_str(), page + 1, pages);
|
||||
} else {
|
||||
if (m_AutoColors)
|
||||
_snprintf(buffer, sizeof(buffer)-1, "\\y%s\n\\w\n", m_Title.c_str());
|
||||
else
|
||||
_snprintf(buffer, sizeof(buffer)-1, "%s\n\n", m_Title.c_str());
|
||||
}
|
||||
|
||||
m_Text.append(buffer);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user