mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-20 06:53:30 +00:00
Fix: line changing on signs, game launch on AMD gpus, mouse sensitivity
Feat: inv slots changing on keyboard
This commit is contained in:
@@ -697,12 +697,12 @@ void Minecraft::tickInput() {
|
||||
if (isPressed) {
|
||||
gui.handleKeyPressed(key);
|
||||
|
||||
#if defined(WIN32) || defined(RPI)//|| defined(_DEBUG) || defined(DEBUG)
|
||||
#if defined(WIN32) || defined(RPI) || defined (PLATFORM_DESKTOP)//|| defined(_DEBUG) || defined(DEBUG)
|
||||
if (key >= '0' && key <= '9') {
|
||||
int digit = key - '0';
|
||||
int slot = digit - 1;
|
||||
|
||||
if (slot >= 0 && slot < gui.getNumSlots()-1)
|
||||
if (slot >= 0 && slot < gui.getNumSlots())
|
||||
player->inventory->selectSlot(slot);
|
||||
|
||||
#if defined(WIN32)
|
||||
@@ -728,14 +728,8 @@ void Minecraft::tickInput() {
|
||||
if (!screen && key == Keyboard::KEY_O || key == 250) {
|
||||
releaseMouse();
|
||||
}
|
||||
#endif
|
||||
#if defined(WIN32)
|
||||
if (key == Keyboard::KEY_F) {
|
||||
options.isFlying = !options.isFlying;
|
||||
player->noPhysics = options.isFlying;
|
||||
}
|
||||
|
||||
if (key == Keyboard::KEY_T) {
|
||||
if (key == Keyboard::KEY_F5) {
|
||||
options.thirdPersonView = !options.thirdPersonView;
|
||||
/*
|
||||
ImprovedNoise noise;
|
||||
@@ -743,6 +737,21 @@ void Minecraft::tickInput() {
|
||||
printf("%d\t%f\n", i, noise.grad2(i, 3, 8));
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
#if defined(WIN32)
|
||||
if (key == Keyboard::KEY_F) {
|
||||
options.isFlying = !options.isFlying;
|
||||
player->noPhysics = options.isFlying;
|
||||
}
|
||||
|
||||
// if (key == Keyboard::KEY_T) {
|
||||
// options.thirdPersonView = !options.thirdPersonView;
|
||||
// /*
|
||||
// ImprovedNoise noise;
|
||||
// for (int i = 0; i < 16; ++i)
|
||||
// printf("%d\t%f\n", i, noise.grad2(i, 3, 8));
|
||||
// */
|
||||
// }
|
||||
|
||||
if (key == Keyboard::KEY_O) {
|
||||
useAmbientOcclusion = !useAmbientOcclusion;
|
||||
|
||||
@@ -115,10 +115,11 @@ void Options::initDefaultValues() {
|
||||
keyMenuCancel.key = 4;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_DESKTOP) || defined(RPI)
|
||||
sensitivity *= 0.4f;
|
||||
#endif
|
||||
#if defined(RPI)
|
||||
username = "StevePi";
|
||||
sensitivity *= 0.4f;
|
||||
useMouseForDigging = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -425,13 +425,23 @@ void SelectWorldScreen::render( int xm, int ym, float a )
|
||||
//Performance::watches.get("sws-worlds").start();
|
||||
|
||||
worldsList->setComponentSelected(bWorldView.selected);
|
||||
// #ifdef PLATFORM_DESKTOP
|
||||
|
||||
// We should add scrolling with mouse wheel but currently i dont know how to implement it
|
||||
if (_mouseHasBeenUp)
|
||||
worldsList->render(xm, ym, a);
|
||||
else {
|
||||
worldsList->render(0, 0, a);
|
||||
_mouseHasBeenUp = !Mouse::getButtonState(MouseAction::ACTION_LEFT);
|
||||
}
|
||||
// #else
|
||||
// if (_mouseHasBeenUp)
|
||||
// worldsList->render(xm, ym, a);
|
||||
// else {
|
||||
// worldsList->render(0, 0, a);
|
||||
// _mouseHasBeenUp = !Mouse::getButtonState(MouseAction::ACTION_LEFT);
|
||||
// }
|
||||
// #endif
|
||||
|
||||
//Performance::watches.get("sws-worlds").stop();
|
||||
//Performance::watches.get("sws-screen").start();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "../../../../world/level/Level.h"
|
||||
#include "../../../../world/item/DyePowderItem.h"
|
||||
#include "../../../../world/item/crafting/Recipe.h"
|
||||
#include "platform/input/Keyboard.h"
|
||||
|
||||
static NinePatchLayer* guiPaneFrame = NULL;
|
||||
|
||||
@@ -420,7 +421,7 @@ void PaneCraftingScreen::clearCategoryItems()
|
||||
|
||||
void PaneCraftingScreen::keyPressed( int eventKey )
|
||||
{
|
||||
if (eventKey == Keyboard::KEY_ESCAPE) {
|
||||
if (eventKey == Keyboard::KEY_ESCAPE || eventKey == Keyboard::KEY_E) {
|
||||
minecraft->setScreen(NULL);
|
||||
//minecraft->grabMouse();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user