mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-03-25 14:21:55 +02:00
Compare commits
6 Commits
dac073605f
...
9a6d126ae1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a6d126ae1 | ||
|
|
39e46751bf | ||
|
|
ebab3ec40f | ||
|
|
c1ce97f7be | ||
|
|
603c6ba7cb | ||
|
|
b6e25415ca |
@@ -20,9 +20,9 @@ protected:
|
||||
eGroupTab_Right
|
||||
};
|
||||
|
||||
static const int m_iMaxHSlotC = 12;
|
||||
static const int m_iMaxHCraftingSlotC = 10;
|
||||
static const int m_iMaxVSlotC = 17;
|
||||
static const int m_iMaxHSlotC = 40;
|
||||
static const int m_iMaxHCraftingSlotC = 40;
|
||||
static const int m_iMaxVSlotC = 99;
|
||||
static const int m_iMaxDisplayedVSlotC = 3;
|
||||
static const int m_iIngredients3x3SlotC = 9;
|
||||
static const int m_iIngredients2x2SlotC = 4;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "UI.h"
|
||||
#include "UIControl_TextInput.h"
|
||||
#include "..\..\Screen.h"
|
||||
|
||||
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
|
||||
if (g_KBMInput.IsKeyPressed(VK_LEFT) && m_iCursorPos > 0)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "UI.h"
|
||||
#include "UIScene_Keyboard.h"
|
||||
#include "..\..\Screen.h"
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
// 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)
|
||||
{
|
||||
// Arrow keys, Home, End, Delete for cursor movement
|
||||
|
||||
@@ -222,9 +222,8 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal
|
||||
const int fovValue = sliderValueToFov(value);
|
||||
pMinecraft->gameRenderer->SetFovVal(static_cast<float>(fovValue));
|
||||
app.SetGameSettings(m_iPad, eGameSetting_FOV, value);
|
||||
WCHAR tempString[256];
|
||||
swprintf(tempString, 256, L"FOV: %d", fovValue);
|
||||
m_sliderFOV.setLabel(tempString);
|
||||
swprintf(TempString, 256, L"FOV: %d", fovValue);
|
||||
m_sliderFOV.setLabel(TempString);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Binary file not shown.
@@ -157,7 +157,7 @@ shared_ptr<ItemInstance> AbstractContainerMenu::clicked(int slotIndex, int butto
|
||||
shared_ptr<ItemInstance> clickedEntity = nullptr;
|
||||
shared_ptr<Inventory> inventory = player->inventory;
|
||||
|
||||
if (slotIndex < 0 || slotIndex >= (int)slots.size())
|
||||
if ((slotIndex < 0 && slotIndex != SLOT_CLICKED_OUTSIDE) || slotIndex >= (int)slots.size())
|
||||
return nullptr;
|
||||
|
||||
if (clickType == CLICK_QUICK_CRAFT)
|
||||
|
||||
@@ -21,20 +21,20 @@ void ClothDyeRecipes::addRecipes(Recipes *r)
|
||||
L'#', new ItemInstance(Tile::clayHardened),
|
||||
L'X', new ItemInstance(Item::dye_powder, 1, i),L'D');
|
||||
|
||||
#if 0
|
||||
r->addShapedRecipy(new ItemInstance(Tile::stained_glass, 8, ColoredTile::getItemAuxValueForTileData(i)), //
|
||||
L"sssczczg",
|
||||
L"###",
|
||||
L"#X#",
|
||||
L"###",
|
||||
L'#', new ItemInstance(Tile::glass),
|
||||
L'X', new ItemInstance(Item::dye_powder, 1, i), L'D');
|
||||
r->addShapedRecipy(new ItemInstance(Tile::stained_glass_pane, 16, i), //
|
||||
L"ssczg",
|
||||
L"###",
|
||||
L"###",
|
||||
L'#', new ItemInstance(Tile::stained_glass, 1, i), L'D');
|
||||
#endif
|
||||
//#if 0
|
||||
// r->addShapedRecipy(new ItemInstance(Tile::stained_glass, 8, ColoredTile::getItemAuxValueForTileData(i)), //
|
||||
// L"sssczczg",
|
||||
// L"###",
|
||||
// L"#X#",
|
||||
// L"###",
|
||||
// L'#', new ItemInstance(Tile::glass),
|
||||
// L'X', new ItemInstance(Item::dye_powder, 1, i), L'D');
|
||||
// r->addShapedRecipy(new ItemInstance(Tile::stained_glass_pane, 16, i), //
|
||||
// L"ssczg",
|
||||
// L"###",
|
||||
// L"###",
|
||||
// L'#', new ItemInstance(Tile::stained_glass, 1, i), L'D');
|
||||
//#endif
|
||||
}
|
||||
|
||||
// some dye recipes
|
||||
|
||||
@@ -615,7 +615,7 @@ vector<HtmlString> *ItemInstance::getHoverText(shared_ptr<Player> player, bool a
|
||||
|
||||
if (tag->contains(L"display"))
|
||||
{
|
||||
//CompoundTag *display = tag->getCompound(L"display");
|
||||
CompoundTag *display = tag->getCompound(L"display");
|
||||
|
||||
//if (display->contains(L"color"))
|
||||
//{
|
||||
@@ -631,8 +631,7 @@ vector<HtmlString> *ItemInstance::getHoverText(shared_ptr<Player> player, bool a
|
||||
// }
|
||||
//}
|
||||
|
||||
// 4J: Lore isn't in use in game
|
||||
/*if (display->contains(L"Lore"))
|
||||
if (display->contains(L"Lore"))
|
||||
{
|
||||
ListTag<StringTag> *lore = (ListTag<StringTag> *) display->getList(L"Lore");
|
||||
if (lore->size() > 0)
|
||||
@@ -643,7 +642,7 @@ vector<HtmlString> *ItemInstance::getHoverText(shared_ptr<Player> player, bool a
|
||||
lines->push_back(lore->get(i)->data);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -299,6 +299,7 @@ Recipes::Recipes()
|
||||
pClothDyeRecipes->addRecipes(this);
|
||||
|
||||
|
||||
|
||||
addShapedRecipy(new ItemInstance(Tile::snow, 1), //
|
||||
L"sscig",
|
||||
L"##", //
|
||||
|
||||
@@ -115,6 +115,28 @@ void StructureRecipies::addRecipes(Recipes *r)
|
||||
|
||||
L'#', Tile::glass,
|
||||
L'D');
|
||||
|
||||
|
||||
|
||||
|
||||
// Stained Glass block + pane per color
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
r->addShapedRecipy(new ItemInstance(Tile::stained_glass, 8, ColoredTile::getItemAuxValueForTileData(i)),
|
||||
L"sssczczg",
|
||||
L"###",
|
||||
L"#X#",
|
||||
L"###",
|
||||
L'#', new ItemInstance(Tile::glass),
|
||||
L'X', new ItemInstance(Item::dye_powder, 1, i),
|
||||
L'D');
|
||||
r->addShapedRecipy(new ItemInstance(Tile::stained_glass_pane, 16, ColoredTile::getItemAuxValueForTileData(i)),
|
||||
L"ssczg",
|
||||
L"###",
|
||||
L"###",
|
||||
L'#', new ItemInstance(Tile::stained_glass, 1, ColoredTile::getItemAuxValueForTileData(i)),
|
||||
L'D');
|
||||
}
|
||||
|
||||
r->addShapedRecipy(new ItemInstance(Tile::netherBrick, 1), //
|
||||
L"sscig",
|
||||
|
||||
@@ -371,7 +371,12 @@ void Tile::staticCtor()
|
||||
|
||||
|
||||
Tile::ironFence = (new ThinFenceTile(101, L"iron_bars", L"iron_bars", Material::metal, true)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_fence, Item::eMaterial_iron)->setDestroyTime(5.0f)->setExplodeable(10)->setSoundType(SOUND_METAL)->setDescriptionId(IDS_TILE_IRON_FENCE)->setUseDescriptionId(IDS_DESC_IRON_FENCE);
|
||||
Tile::thinGlass = (new ThinFenceTile(102, L"glass", L"glass_pane_top", Material::glass, false)) ->setDestroyTime(0.3f)->setSoundType(SOUND_GLASS)->setDescriptionId(IDS_TILE_THIN_GLASS)->setUseDescriptionId(IDS_DESC_THIN_GLASS);
|
||||
Tile::thinGlass = (new ThinFenceTile(102, L"glass", L"glass_pane_top", Material::glass, false))
|
||||
->setBaseItemTypeAndMaterial(Item::eBaseItemType_glass, Item::eMaterial_glass)
|
||||
->setDestroyTime(0.3f)
|
||||
->setSoundType(SOUND_GLASS)
|
||||
->setDescriptionId(IDS_TILE_THIN_GLASS)
|
||||
->setUseDescriptionId(IDS_DESC_THIN_GLASS);
|
||||
Tile::melon = (new MelonTile(103)) ->setDestroyTime(1.0f)->setSoundType(SOUND_WOOD)->setIconName(L"melon")->setDescriptionId(IDS_TILE_MELON)->setUseDescriptionId(IDS_DESC_MELON_BLOCK);
|
||||
Tile::pumpkinStem = (new StemTile(104, Tile::pumpkin)) ->setDestroyTime(0.0f)->setSoundType(SOUND_WOOD)->setIconName(L"pumpkin_stem")->setDescriptionId(IDS_TILE_PUMPKIN_STEM)->sendTileData();
|
||||
Tile::melonStem = (new StemTile(105, Tile::melon)) ->setDestroyTime(0.0f)->setSoundType(SOUND_WOOD)->setIconName(L"melon_stem")->setDescriptionId(IDS_TILE_MELON_STEM)->sendTileData();
|
||||
|
||||
Reference in New Issue
Block a user