mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
Fix: gui, block destroy
Feat: speed up on left mouse button in credits
This commit is contained in:
@@ -864,6 +864,10 @@ void Minecraft::tickInput() {
|
||||
|
||||
static bool prevMouseDownLeft = false;
|
||||
|
||||
if (Mouse::getButtonState(MouseAction::ACTION_LEFT) == 0) {
|
||||
gameMode->stopDestroyBlock();
|
||||
}
|
||||
|
||||
if (useTouchscreen()) {
|
||||
// Touch: gesture recognizer classifies the action type (turn/destroy/build)
|
||||
BuildActionIntention bai;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "../../Minecraft.h"
|
||||
#include "../components/Button.h"
|
||||
#include "../components/ImageButton.h"
|
||||
#include "platform/input/Mouse.h"
|
||||
|
||||
CreditsScreen::CreditsScreen()
|
||||
: bHeader(NULL), btnBack(NULL)
|
||||
@@ -65,11 +66,16 @@ void CreditsScreen::tick() {
|
||||
if (_scrollY + totalHeight < 0) {
|
||||
_scrollY = height;
|
||||
}
|
||||
|
||||
if (Mouse::isButtonDown(MouseAction::ACTION_LEFT)) {
|
||||
_scrollSpeed = 1.5f;
|
||||
} else {
|
||||
_scrollSpeed = 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
void CreditsScreen::render(int xm, int ym, float a) {
|
||||
renderBackground();
|
||||
super::render(xm, ym, a);
|
||||
int w = width;
|
||||
Font* font = minecraft->font;
|
||||
float y = _scrollY;
|
||||
@@ -87,6 +93,8 @@ void CreditsScreen::render(int xm, int ym, float a) {
|
||||
}
|
||||
y += lineHeight;
|
||||
}
|
||||
|
||||
super::render(xm, ym, a);
|
||||
}
|
||||
|
||||
void CreditsScreen::buttonClicked(Button* button) {
|
||||
|
||||
@@ -77,8 +77,8 @@ void OptionsScreen::init() {
|
||||
categoryButtons.push_back(new Touch::TButton(4, "Controls"));
|
||||
categoryButtons.push_back(new Touch::TButton(5, "Graphics"));
|
||||
|
||||
btnChangeUsername = new Button(10, "Username");
|
||||
btnCredits = new Button(11, "Credits");
|
||||
btnChangeUsername = new Touch::TButton(10, "Username");
|
||||
btnCredits = new Touch::TButton(11, "Credits");
|
||||
|
||||
buttons.push_back(bHeader);
|
||||
buttons.push_back(btnClose);
|
||||
|
||||
Reference in New Issue
Block a user