aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/UI/UIControl_Touch.cpp
blob: bd57882fa170019c8f1eef6e5aed42f7a9f4779b (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
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "stdafx.h"
#include "UI.h"
#include "UIControl_Touch.h"

UIControl_Touch::UIControl_Touch()
{
}

bool UIControl_Touch::setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName)
{
	UIControl::setControlType(UIControl::eTouchControl);
	bool success = UIControl_Base::setupControl(scene,parent,controlName);

	return success;
}

void UIControl_Touch::init(int iId)
{
	m_id = iId;

	// 4J-TomK - add this touch control to the vita touch box list
	switch(m_parentScene->GetParentLayer()->m_iLayer)
	{
	case eUILayer_Error:
	case eUILayer_Fullscreen:
	case eUILayer_Scene:
	case eUILayer_HUD:
		ui.TouchBoxAdd(this,m_parentScene);
		break;
	}
}

void UIControl_Touch::ReInit()
{
	UIControl_Base::ReInit();

	init(m_id);
}