Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49c1f2c1da |
No files matched your search
@@ -878,8 +878,7 @@ enum EControllerActions
|
|||||||
MINECRAFT_ACTION_SPAWN_CREEPER,
|
MINECRAFT_ACTION_SPAWN_CREEPER,
|
||||||
MINECRAFT_ACTION_CHANGE_SKIN,
|
MINECRAFT_ACTION_CHANGE_SKIN,
|
||||||
MINECRAFT_ACTION_FLY_TOGGLE,
|
MINECRAFT_ACTION_FLY_TOGGLE,
|
||||||
MINECRAFT_ACTION_RENDER_DEBUG,
|
MINECRAFT_ACTION_RENDER_DEBUG
|
||||||
MINECRAFT_ACTION_SCREENSHOT
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum eMCLang
|
enum eMCLang
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "UI.h"
|
#include "UI.h"
|
||||||
#include "UIControl_TextInput.h"
|
#include "UIControl_TextInput.h"
|
||||||
|
#include "..\..\Screen.h"
|
||||||
|
|
||||||
UIControl_TextInput::UIControl_TextInput()
|
UIControl_TextInput::UIControl_TextInput()
|
||||||
{
|
{
|
||||||
@@ -211,6 +212,31 @@ UIControl_TextInput::EDirectEditResult UIControl_TextInput::tickDirectEdit()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Paste from clipboard
|
||||||
|
if (g_KBMInput.IsKeyPressed('V') && g_KBMInput.IsKeyDown(VK_CONTROL))
|
||||||
|
{
|
||||||
|
wstring pasted = Screen::getClipboard();
|
||||||
|
wstring sanitized;
|
||||||
|
sanitized.reserve(pasted.length());
|
||||||
|
|
||||||
|
for (wchar_t pc : pasted)
|
||||||
|
{
|
||||||
|
if (pc >= 0x20) // Keep printable characters
|
||||||
|
{
|
||||||
|
if (m_iCharLimit > 0 && (m_editBuffer.length() + sanitized.length()) >= (size_t)m_iCharLimit)
|
||||||
|
break;
|
||||||
|
sanitized += pc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!sanitized.empty())
|
||||||
|
{
|
||||||
|
m_editBuffer.insert(m_iCursorPos, sanitized);
|
||||||
|
m_iCursorPos += (int)sanitized.length();
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Arrow keys, Home, End, Delete for cursor movement
|
// Arrow keys, Home, End, Delete for cursor movement
|
||||||
if (g_KBMInput.IsKeyPressed(VK_LEFT) && m_iCursorPos > 0)
|
if (g_KBMInput.IsKeyPressed(VK_LEFT) && m_iCursorPos > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "UI.h"
|
#include "UI.h"
|
||||||
#include "UIScene_Keyboard.h"
|
#include "UIScene_Keyboard.h"
|
||||||
|
#include "..\..\Screen.h"
|
||||||
|
|
||||||
#ifdef _WINDOWS64
|
#ifdef _WINDOWS64
|
||||||
// Global buffer that stores the text entered in the native keyboard scene.
|
// Global buffer that stores the text entered in the native keyboard scene.
|
||||||
@@ -224,6 +225,38 @@ void UIScene_Keyboard::tick()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Paste from clipboard
|
||||||
|
if (g_KBMInput.IsKeyPressed('V') && g_KBMInput.IsKeyDown(VK_CONTROL))
|
||||||
|
{
|
||||||
|
wstring pasted = Screen::getClipboard();
|
||||||
|
wstring sanitized;
|
||||||
|
sanitized.reserve(pasted.length());
|
||||||
|
|
||||||
|
for (wchar_t pc : pasted)
|
||||||
|
{
|
||||||
|
if (pc >= 0x20) // Keep printable characters
|
||||||
|
{
|
||||||
|
if (static_cast<int>(m_win64TextBuffer.length() + sanitized.length()) >= m_win64MaxChars)
|
||||||
|
break;
|
||||||
|
sanitized += pc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!sanitized.empty())
|
||||||
|
{
|
||||||
|
if (m_bPCMode)
|
||||||
|
{
|
||||||
|
m_win64TextBuffer.insert(m_iCursorPos, sanitized);
|
||||||
|
m_iCursorPos += (int)sanitized.length();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_win64TextBuffer += sanitized;
|
||||||
|
}
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (m_bPCMode)
|
if (m_bPCMode)
|
||||||
{
|
{
|
||||||
// Arrow keys, Home, End, Delete for cursor movement
|
// Arrow keys, Home, End, Delete for cursor movement
|
||||||
|
|||||||
@@ -1549,9 +1549,6 @@ void Minecraft::run_middle()
|
|||||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_RENDER_DEBUG;
|
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_RENDER_DEBUG;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g_KBMInput.IsKeyPressed(KeyboardMouseInput::KEY_SCREENSHOT))
|
|
||||||
localplayers[i]->ullButtonsPressed|=1LL<<MINECRAFT_ACTION_SCREENSHOT;
|
|
||||||
|
|
||||||
// In flying mode, Shift held = sneak/descend
|
// In flying mode, Shift held = sneak/descend
|
||||||
if(g_KBMInput.IsKBMActive() && g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_SNEAK))
|
if(g_KBMInput.IsKBMActive() && g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_SNEAK))
|
||||||
{
|
{
|
||||||
@@ -3740,13 +3737,6 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
|
|||||||
//options->thirdPersonView = !options->thirdPersonView;
|
//options->thirdPersonView = !options->thirdPersonView;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WINDOWS64
|
|
||||||
if(player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_SCREENSHOT))
|
|
||||||
{
|
|
||||||
RenderManager.DoScreenGrabOnNextPresent();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if((player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_GAME_INFO)) && gameMode->isInputAllowed(MINECRAFT_ACTION_GAME_INFO))
|
if((player->ullButtonsPressed&(1LL<<MINECRAFT_ACTION_GAME_INFO)) && gameMode->isInputAllowed(MINECRAFT_ACTION_GAME_INFO))
|
||||||
{
|
{
|
||||||
ui.NavigateToScene(iPad,eUIScene_InGameInfoMenu);
|
ui.NavigateToScene(iPad,eUIScene_InGameInfoMenu);
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ public:
|
|||||||
static const int KEY_DEBUG_CONSOLE = VK_F6;
|
static const int KEY_DEBUG_CONSOLE = VK_F6;
|
||||||
static const int KEY_HOST_SETTINGS = VK_F8;
|
static const int KEY_HOST_SETTINGS = VK_F8;
|
||||||
static const int KEY_FULLSCREEN = VK_F11;
|
static const int KEY_FULLSCREEN = VK_F11;
|
||||||
|
|
||||||
|
// todo: implement and shi
|
||||||
static const int KEY_SCREENSHOT = VK_F2;
|
static const int KEY_SCREENSHOT = VK_F2;
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
|
|||||||
Reference in new issue
Block a user