mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-22 07:53:30 +00:00
Merge remote-tracking branch 'refs/remotes/origin/main'
This commit is contained in:
@@ -855,11 +855,18 @@ void Minecraft::tickInput() {
|
||||
gameMode->stopDestroyBlock();
|
||||
}
|
||||
|
||||
if (!Mouse::isButtonDown(MouseAction::ACTION_RIGHT)) {
|
||||
gameMode->releaseUsingItem(player);
|
||||
}
|
||||
|
||||
if (useTouchscreen()) {
|
||||
// Touch: gesture recognizer classifies the action type (turn/destroy/build)
|
||||
BuildActionIntention bai;
|
||||
|
||||
if (inputHolder && inputHolder->getBuildInput()->tickBuild(player, &bai)) {
|
||||
handleBuildAction(&bai);
|
||||
} else {
|
||||
gameMode->stopDestroyBlock();
|
||||
}
|
||||
} else {
|
||||
// Desktop: left mouse = destroy/attack
|
||||
|
||||
@@ -109,6 +109,8 @@ public:
|
||||
|
||||
bool isLevelGenerated();
|
||||
|
||||
void handleMouseDown(int button, bool down);
|
||||
|
||||
void audioEngineOn();
|
||||
void audioEngineOff();
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ OptionsScreen::OptionsScreen()
|
||||
}
|
||||
|
||||
OptionsScreen::~OptionsScreen() {
|
||||
|
||||
if (btnClose != NULL) {
|
||||
delete btnClose;
|
||||
btnClose = NULL;
|
||||
@@ -53,7 +52,6 @@ OptionsScreen::~OptionsScreen() {
|
||||
}
|
||||
|
||||
void OptionsScreen::init() {
|
||||
|
||||
bHeader = new Touch::THeader(0, "Options");
|
||||
|
||||
btnClose = new ImageButton(1, "");
|
||||
@@ -89,7 +87,6 @@ void OptionsScreen::init() {
|
||||
}
|
||||
|
||||
void OptionsScreen::setupPositions() {
|
||||
|
||||
int buttonHeight = btnClose->height;
|
||||
|
||||
btnClose->x = width - btnClose->width;
|
||||
@@ -134,7 +131,6 @@ void OptionsScreen::setupPositions() {
|
||||
|
||||
|
||||
void OptionsScreen::render(int xm, int ym, float a) {
|
||||
|
||||
renderBackground();
|
||||
|
||||
int xmm = xm * width / minecraft->width;
|
||||
@@ -150,7 +146,6 @@ void OptionsScreen::removed() {
|
||||
}
|
||||
|
||||
void OptionsScreen::buttonClicked(Button* button) {
|
||||
|
||||
if (button == btnClose) {
|
||||
minecraft->options.save();
|
||||
if (minecraft->screen != NULL) {
|
||||
@@ -169,7 +164,6 @@ void OptionsScreen::buttonClicked(Button* button) {
|
||||
}
|
||||
|
||||
void OptionsScreen::selectCategory(int index) {
|
||||
|
||||
int currentIndex = 0;
|
||||
|
||||
for (std::vector<Touch::TButton*>::iterator it = categoryButtons.begin(); it != categoryButtons.end(); ++it) {
|
||||
@@ -235,7 +229,6 @@ void OptionsScreen::generateOptionScreens() {
|
||||
}
|
||||
|
||||
void OptionsScreen::mouseClicked(int x, int y, int buttonNum) {
|
||||
|
||||
if (currentOptionsGroup != NULL)
|
||||
currentOptionsGroup->mouseClicked(minecraft, x, y, buttonNum);
|
||||
|
||||
@@ -243,7 +236,6 @@ void OptionsScreen::mouseClicked(int x, int y, int buttonNum) {
|
||||
}
|
||||
|
||||
void OptionsScreen::mouseReleased(int x, int y, int buttonNum) {
|
||||
|
||||
if (currentOptionsGroup != NULL)
|
||||
currentOptionsGroup->mouseReleased(minecraft, x, y, buttonNum);
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ void TouchscreenInput_TestFps::onConfigChanged(const Config& c) {
|
||||
|
||||
float maxPixels = _minecraft->pixelCalc.millimetersToPixels(10);
|
||||
// float btnSize = Mth::Min(18 * Gui::GuiScale, maxPixels);
|
||||
float btnSize = pc.millimetersToPixels(50);
|
||||
float btnSize = pc.millimetersToPixels(18 * Gui::GuiScale);
|
||||
_model.addArea(AREA_PAUSE, aPause = new RectangleArea(w - 4 - btnSize, 4, w - 4, 4 + btnSize));
|
||||
_model.addArea(AREA_CHAT, aChat = new RectangleArea(w - 8 - btnSize * 2, 4, w - 8 - btnSize, 4 + btnSize));
|
||||
|
||||
@@ -320,6 +320,7 @@ void TouchscreenInput_TestFps::tick( Player* player )
|
||||
if (Multitouch::isReleased(p)) {
|
||||
_minecraft->soundEngine->playUI("random.click", 1, 1);
|
||||
_minecraft->screenChooser.setScreen(SCREEN_CONSOLE);
|
||||
_minecraft->platform()->showKeyboard();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ PlayerRenderer::PlayerRenderer( HumanoidModel* humanoidModel, float shadow )
|
||||
: super(humanoidModel, shadow),
|
||||
playerModel64(humanoidModel),
|
||||
playerModel32(new HumanoidModel(0, 0, 64, 32)),
|
||||
armorParts1(new HumanoidModel(1.0f, 0, 64, 64)),
|
||||
armorParts2(new HumanoidModel(0.5f, 0, 64, 64))
|
||||
armorParts1(new HumanoidModel(1.0f, 0, 64, 32)),
|
||||
armorParts2(new HumanoidModel(0.5f, 0, 64, 32))
|
||||
{
|
||||
// default to legacy skin path until we know the exact texture size
|
||||
model = playerModel32;
|
||||
@@ -77,10 +77,10 @@ void PlayerRenderer::render(Entity* mob_, float x, float y, float z, float rot,
|
||||
model = desired;
|
||||
humanoidModel = desired;
|
||||
}
|
||||
// LOGI("[PlayerRenderer] %s: skin=%s, modelTex=%dx%d, desired=%s\n",
|
||||
// ((Player*)mob)->name.c_str(), mob->getTexture().c_str(),
|
||||
// humanoidModel->texWidth, humanoidModel->texHeight,
|
||||
// (desired == playerModel64 ? "64" : "32"));
|
||||
LOGI("[PlayerRenderer] %s: skin=%s, modelTex=%dx%d, desired=%s\n",
|
||||
((Player*)mob)->name.c_str(), mob->getTexture().c_str(),
|
||||
humanoidModel->texWidth, humanoidModel->texHeight,
|
||||
(desired == playerModel64 ? "64" : "32"));
|
||||
HumanoidMobRenderer::render(mob_, x, y, z, rot, a);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user