Files
GabsPuNs-Project_Zenith_Main/Minecraft.Client/Common/Tutorial/TutorialMessage.cpp
GabsPuNs bc6c09146a New File System and Cleanup some code Part 3
* Remove stdafx.h and some <unordered_set> includes
* Update Minecraft Server Defines and remove more unused folders/files
* Unbloat stdafx.h from Minecraft.World
2026-05-24 22:21:41 -04:00

22 lines
523 B
C++

#include "TutorialMessage.h"
TutorialMessage::TutorialMessage(int messageId, bool limitRepeats /*= false*/, unsigned char numRepeats /*= TUTORIAL_MESSAGE_DEFAULT_SHOW*/)
: messageId( messageId ), limitRepeats( limitRepeats ), numRepeats( numRepeats ), timesShown( 0 )
{
}
bool TutorialMessage::canDisplay()
{
return !limitRepeats || (timesShown < numRepeats);
}
LPCWSTR TutorialMessage::getMessageForDisplay()
{
if(!canDisplay())
return L"";
if(limitRepeats)
++timesShown;
return app.GetString( messageId );
}