1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

F1 toggles HUD, F2 toggles chat, F5 toggles debug info, F6 toggles profiler pages

This commit is contained in:
Kahrl 2012-02-01 00:56:30 +01:00
parent 0e8bd531c2
commit 0c3d39357b
4 changed files with 326 additions and 106 deletions

View file

@ -99,12 +99,31 @@ public:
}
void print(std::ostream &o)
{
printPage(o, 1, 1);
}
void printPage(std::ostream &o, u32 page, u32 pagecount)
{
JMutexAutoLock lock(m_mutex);
u32 minindex, maxindex;
paging(m_data.size(), page, pagecount, minindex, maxindex);
for(core::map<std::string, float>::Iterator
i = m_data.getIterator();
i.atEnd() == false; i++)
{
if(maxindex == 0)
break;
maxindex--;
if(minindex != 0)
{
minindex--;
continue;
}
std::string name = i.getNode()->getKey();
int avgcount = 1;
core::map<std::string, int>::Node *n = m_avgcounts.find(name);