diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/Common/UI/UIControl_Touch.cpp | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.Client/Common/UI/UIControl_Touch.cpp')
| -rw-r--r-- | Minecraft.Client/Common/UI/UIControl_Touch.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Minecraft.Client/Common/UI/UIControl_Touch.cpp b/Minecraft.Client/Common/UI/UIControl_Touch.cpp new file mode 100644 index 00000000..bd57882f --- /dev/null +++ b/Minecraft.Client/Common/UI/UIControl_Touch.cpp @@ -0,0 +1,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); +}
\ No newline at end of file |
