aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/Tutorial/LookAtEntityHint.cpp
blob: 3b4680ce0d5abbe9270c4364bd4fd543d800fb79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "stdafx.h"
#include "Tutorial.h"
#include "LookAtEntityHint.h"


LookAtEntityHint::LookAtEntityHint(eTutorial_Hint id, Tutorial *tutorial, int descriptionId, int titleId, eINSTANCEOF type)
	: TutorialHint(id, tutorial, descriptionId, e_Hint_LookAtEntity)
{
	m_type = type;
	m_titleId = titleId;
}

bool LookAtEntityHint::onLookAtEntity(eINSTANCEOF type)
{
	if(m_type == type)
	{
		// Display hint
		Tutorial::PopupMessageDetails *message = new Tutorial::PopupMessageDetails();
		message->m_messageId = m_descriptionId;
		message->m_titleId = m_titleId;
		message->m_delay = true;
		return m_tutorial->setMessage(this, message);
	}
	return false;
}