21 Commits

Author SHA1 Message Date
09cc2ceee4 hopefully fixed web world creation 2026-07-20 23:35:32 +03:00
7620d49489 I should go sleep ig 2026-07-20 23:14:59 +03:00
381ef354c6 wtfffffff with git 2026-07-20 23:14:21 +03:00
8be6e381d8 ok i was wrong 2026-07-20 23:12:34 +03:00
3ab30eefa4 Revert "hopefully fixed ios build"
This reverts commit 92f972d320.
2026-07-20 23:10:28 +03:00
325ab94a64 Revert "fuck i forgot ro remove tinted side option too"
This reverts commit c616546e1e.
2026-07-20 23:10:25 +03:00
9434a48ae7 Revert "help me"
This reverts commit 79be815827.
2026-07-20 23:10:21 +03:00
79be815827 help me 2026-07-20 23:01:12 +03:00
c616546e1e fuck i forgot ro remove tinted side option too 2026-07-20 22:56:20 +03:00
92f972d320 hopefully fixed ios build 2026-07-20 22:53:31 +03:00
980fc2ccfb fix build!! 2026-07-20 22:48:38 +03:00
3b82c519d0 Merge pull request 'Add icon for win32' (#18) from yefeng/minecraft-pe-0.6.1:main into main
Reviewed-on: #18
2026-07-20 21:41:45 +02:00
002bb40aae FIX: OpenAL error loop 2026-07-20 22:25:18 +03:00
6f4a07a306 Merge pull request 'Style changes' (#27) from Dram27-fix-settings-scrolling into main
Reviewed-on: #27
2026-07-20 21:14:57 +02:00
d5a3871f56 Merge pull request 'fix-settings-scrolling' (#24) from Dram27/minecraft-pe-0.6.1:fix-settings-scrolling into main
Reviewed-on: #24
2026-07-20 21:13:41 +02:00
0c32f620af Sorry, apple users, I'm temporary removing foliage tinting 2026-07-20 22:11:41 +03:00
93bf97a15e Style changes 2026-07-20 20:05:29 +03:00
b3561e773d Fix to prevent text overlap in options list during scroll 2026-04-26 16:12:56 +02:00
162ec7adfa Fix bottom settings overlapping with Credits button 2026-04-26 16:00:44 +02:00
4cfaa43d77 Added scroll with wheel on PC and touch scroll on Android/IOS 2026-04-26 15:47:52 +02:00
yefengeeeeeeeeeee
f1e8932fbd Add icon for win32 2026-03-28 18:12:34 +08:00
15 changed files with 318 additions and 178 deletions

View File

@@ -320,6 +320,10 @@ target_link_libraries("${PROJECT_NAME}-server" ${CMAKE_THREAD_LIBS_INIT} ${EXTRA
add_executable(${PROJECT_NAME} ${CLIENT_SOURCES}) add_executable(${PROJECT_NAME} ${CLIENT_SOURCES})
if(WIN32)
target_sources(${PROJECT_NAME} PRIVATE data/images/pe.rc)
endif()
target_compile_definitions(${PROJECT_NAME} PUBLIC ${PLATFORM_CPP}) target_compile_definitions(${PROJECT_NAME} PUBLIC ${PLATFORM_CPP})
target_include_directories(${PROJECT_NAME} PUBLIC target_include_directories(${PROJECT_NAME} PUBLIC

BIN
data/images/pe.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

1
data/images/pe.rc Normal file
View File

@@ -0,0 +1 @@
IDI_ICON1 ICON "pe.ico"

View File

@@ -4,12 +4,11 @@ namespace Common {
std::string getGameVersionString(const std::string& versionSuffix /* = "" */) std::string getGameVersionString(const std::string& versionSuffix /* = "" */)
{ {
std::string result = std::string("v0.6.1") + versionSuffix; std::string result = std::string("v0.1.0 (forked from v0.6.1 alpha)") + versionSuffix;
// append 64-bit port marker only on Android 64bit targets // append 64-bit port marker only on Android 64bit targets
#if defined(ANDROID) && (defined(__aarch64__) || defined(__x86_64__)) #if defined(ANDROID) && (defined(__aarch64__) || defined(__x86_64__))
result += " (64-bit port)"; result += " (64-bit)";
#endif #endif
result += " alpha";
return result; return result;
} }

View File

@@ -293,7 +293,7 @@ void Minecraft::setLevel(Level* level, const std::string& message /* ="" */, Loc
level->ops.emplace(op); level->ops.emplace(op);
_hasSignaledGeneratingLevelFinished = false; _hasSignaledGeneratingLevelFinished = false;
#ifdef STANDALONE_SERVER #if defined(STANDALONE_SERVER) || defined(PLATFORM_WEB)
const bool threadedLevelCreation = false; const bool threadedLevelCreation = false;
#else #else
const bool threadedLevelCreation = true; const bool threadedLevelCreation = true;

View File

@@ -65,17 +65,13 @@ OptionBool useVignette("useVignette", true);
OptionBool useTouchscreen("useTouchscreen", true); OptionBool useTouchscreen("useTouchscreen", true);
OptionBool serverVisible("servervisible", true); OptionBool serverVisible("servervisible", true);
OptionBool foliageTint("foliagetint", false);
OptionBool foliageTint("foliagetint", true);
OptionInt fogType("fogType", 0, 0, 2); OptionInt fogType("fogType", 0, 0, 2);
OptionBool javaHud("javaHud", false); OptionBool javaHud("javaHud", false);
OptionBool betaSky("betaSky", false); OptionBool betaSky("betaSky", false);
OptionBool tintedSide("tintedSide", false); OptionBool tintedSide("tintedSide", false);
OptionBool blockOutline("blockOutline", false); OptionBool blockOutline("blockOutline", false);
OptionBool restoredAnims("restoredAnims", true); OptionBool restoredAnims("restoredAnims", true);
@@ -200,16 +196,13 @@ void Options::initTable() {
m_options[OPTIONS_ALLOW_SPRINT] = &allowSprint; m_options[OPTIONS_ALLOW_SPRINT] = &allowSprint;
m_options[OPTIONS_RPI_CURSOR] = &rpiCursor; m_options[OPTIONS_RPI_CURSOR] = &rpiCursor;
m_options[OPTIONS_FOLIAGE_TINT] = &foliageTint; m_options[OPTIONS_FOLIAGE_TINT] = &foliageTint;
// more options yay // more options yay
m_options[OPTIONS_FOG_TYPE] = &fogType; m_options[OPTIONS_FOG_TYPE] = &fogType;
m_options[OPTIONS_DEBUG_STYLE] = &debugStyle; m_options[OPTIONS_DEBUG_STYLE] = &debugStyle;
m_options[OPTIONS_BETA_SKY] = &betaSky; m_options[OPTIONS_BETA_SKY] = &betaSky;
m_options[OPTIONS_TINTED_SIDE] = &tintedSide; m_options[OPTIONS_TINTED_SIDE] = &tintedSide;
m_options[OPTIONS_JAVA_HUD] = &javaHud; m_options[OPTIONS_JAVA_HUD] = &javaHud;
m_options[OPTIONS_AUTOJUMP] = &autoJump; m_options[OPTIONS_AUTOJUMP] = &autoJump;

View File

@@ -89,7 +89,7 @@ enum OptionId {
OPTIONS_RPI_CURSOR, OPTIONS_RPI_CURSOR,
OPTIONS_FOLIAGE_TINT, OPTIONS_FOLIAGE_TINT,
OPTIONS_FOG_TYPE, OPTIONS_FOG_TYPE,
OPTIONS_JAVA_HUD, OPTIONS_JAVA_HUD,
OPTIONS_RESTORED_ANIMS, OPTIONS_RESTORED_ANIMS,
OPTIONS_TINTED_SIDE, OPTIONS_TINTED_SIDE,

View File

@@ -35,6 +35,17 @@ void GuiElementContainer::removeChild( GuiElement* element ) {
children.erase(it); children.erase(it);
} }
bool GuiElementContainer::containsPointInChildren(int x, int y) const {
for (auto it = children.begin(); it != children.end(); ++it) {
GuiElement* child = *it;
if (child == NULL || !child->visible) continue;
if (child->pointInside(x, y)) return true;
const GuiElementContainer* container = dynamic_cast<const GuiElementContainer*>(child);
if (container != NULL && container->containsPointInChildren(x, y)) return true;
}
return false;
}
void GuiElementContainer::tick( Minecraft* minecraft ) { void GuiElementContainer::tick( Minecraft* minecraft ) {
for(std::vector<GuiElement*>::iterator it = children.begin(); it != children.end(); ++it) { for(std::vector<GuiElement*>::iterator it = children.begin(); it != children.end(); ++it) {
(*it)->tick(minecraft); (*it)->tick(minecraft);

View File

@@ -5,16 +5,17 @@
class Tesselator; class Tesselator;
class Minecraft; class Minecraft;
class GuiElementContainer : public GuiElement { class GuiElementContainer : public GuiElement {
public: public:
GuiElementContainer(bool active=false, bool visible=true, int x = 0, int y = 0, int width=24, int height=24); GuiElementContainer(bool active=false, bool visible=true, int x = 0, int y = 0, int width=24, int height=24);
virtual ~GuiElementContainer(); virtual ~GuiElementContainer();
virtual void render(Minecraft* minecraft, int xm, int ym); virtual void render(Minecraft* minecraft, int xm, int ym);
virtual void setupPositions(); virtual void setupPositions();
virtual void addChild(GuiElement* element); virtual void addChild(GuiElement* element);
virtual void removeChild(GuiElement* element); virtual void removeChild(GuiElement* element);
bool containsPointInChildren(int x, int y) const;
virtual void tick( Minecraft* minecraft );
virtual void tick( Minecraft* minecraft );
virtual void mouseClicked( Minecraft* minecraft, int x, int y, int buttonNum ); virtual void mouseClicked( Minecraft* minecraft, int x, int y, int buttonNum );
virtual void mouseReleased( Minecraft* minecraft, int x, int y, int buttonNum ); virtual void mouseReleased( Minecraft* minecraft, int x, int y, int buttonNum );

View File

@@ -1,115 +1,219 @@
#include "OptionsGroup.h" #include "OptionsGroup.h"
#include "../../Minecraft.h" #include "../../Minecraft.h"
#include "ImageButton.h" #include "ImageButton.h"
#include "OptionsItem.h" #include "OptionsItem.h"
#include "Slider.h" #include "Slider.h"
#include "../../../locale/I18n.h" #include "../../../locale/I18n.h"
#include "TextOption.h" #include "TextOption.h"
#include "KeyOption.h" #include "KeyOption.h"
#include <algorithm>
OptionsGroup::OptionsGroup( std::string labelID ) { #include "../Gui.h"
label = I18n::get(labelID); #include "../Screen.h"
} #include "../../../platform/input/Mouse.h"
#include "../../../util/Mth.h"
void OptionsGroup::setupPositions() {
// First we write the header and then we add the items OptionsGroup::OptionsGroup( std::string labelID ) {
int curY = y + 18; label = I18n::get(labelID);
for(std::vector<GuiElement*>::iterator it = children.begin(); it != children.end(); ++it) { }
(*it)->width = width - 5;
void OptionsGroup::setupPositions() {
(*it)->y = curY; const int labelHeight = 18;
(*it)->x = x + 10; const int bottomPadding = 36;
(*it)->setupPositions(); const float requestedScroll = scrollOffsetY;
curY += (*it)->height + 3; const int scrollOffset = (int)requestedScroll;
} int curY = y + labelHeight - scrollOffset;
height = curY; const int contentStartY = y + labelHeight;
}
// First we write the header and then we add the items
void OptionsGroup::render( Minecraft* minecraft, int xm, int ym ) { for(auto it = children.begin(); it != children.end(); ++it) {
float padX = 10.0f; (*it)->width = width - 5;
float padY = 5.0f;
(*it)->y = curY;
minecraft->font->draw(label, (float)x + padX, (float)y + padY, 0xffffffff, false); (*it)->x = x + 10;
(*it)->setupPositions();
super::render(minecraft, xm, ym); curY += (*it)->height + 3;
} }
curY += bottomPadding;
OptionsGroup& OptionsGroup::addOptionItem(OptionId optId, Minecraft* minecraft ) { contentHeight = std::max(0, curY - contentStartY + scrollOffset);
auto option = minecraft->options.getOpt(optId); maxScrollOffsetY = std::max(0, contentHeight - (height - labelHeight));
const float clampedScroll = Mth::clamp(requestedScroll, 0.0f, maxScrollOffsetY);
if (option == nullptr) return *this; if (clampedScroll != requestedScroll) {
scrollOffsetY = clampedScroll;
// TODO: do a options key class to check it faster via dynamic_cast setupPositions();
if (option->getStringId().find("options.key") != std::string::npos) createKey(optId, minecraft); }
else if (dynamic_cast<OptionBool*>(option)) createToggle(optId, minecraft); }
else if (dynamic_cast<OptionFloat*>(option)) createProgressSlider(optId, minecraft);
else if (dynamic_cast<OptionInt*>(option)) createStepSlider(optId, minecraft); void OptionsGroup::render( Minecraft* minecraft, int xm, int ym ) {
else if (dynamic_cast<OptionString*>(option)) createTextbox(optId, minecraft); float padX = 10.0f;
float padY = 5.0f;
return *this; const int labelHeight = 18;
}
minecraft->font->draw(label, (float)x + padX, (float)y + padY, 0xffffffff, false);
// TODO: wrap this copypaste shit into templates
glEnable2(GL_SCISSOR_TEST);
void OptionsGroup::createToggle(OptionId optId, Minecraft* minecraft ) { glScissor(
ImageDef def; Gui::GuiScale * x,
minecraft->height - Gui::GuiScale * (y + height),
def.setSrc(IntRectangle(160, 206, 39, 20)); Gui::GuiScale * width,
def.name = "gui/touchgui.png"; Gui::GuiScale * (height - labelHeight)
def.width = 39 * 0.7f; );
def.height = 20 * 0.7f;
super::render(minecraft, xm, ym);
OptionButton* element = new OptionButton(optId); glDisable2(GL_SCISSOR_TEST);
element->setImageDef(def, true); }
element->updateImage(&minecraft->options);
void OptionsGroup::tick(Minecraft* minecraft) {
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId()); int xm = Mouse::getX();
int ym = Mouse::getY();
OptionsItem* item = new OptionsItem(optId, itemLabel, element); if (minecraft->screen != NULL) {
minecraft->screen->toGUICoordinate(xm, ym);
addChild(item); }
setupPositions();
} bool leftDown = Mouse::isButtonDown(MouseAction::ACTION_LEFT);
void OptionsGroup::createProgressSlider(OptionId optId, Minecraft* minecraft ) { if (trackingScrollGesture && leftDown) {
Slider* element = new SliderFloat(minecraft, optId); int dy = ym - lastDragY;
element->width = 100; int dx = xm - dragStartX;
element->height = 20; if (!scrollingGesture) {
int totalDx = xm - dragStartX;
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId()); int totalDy = ym - dragStartY;
OptionsItem* item = new OptionsItem(optId, itemLabel, element); if (std::abs(totalDx) >= ScrollStartThreshold || std::abs(totalDy) >= ScrollStartThreshold) {
addChild(item); if (std::abs(totalDy) >= std::abs(totalDx)) {
setupPositions(); scrollingGesture = true;
} } else if (!touchDispatched) {
super::mouseClicked(minecraft, touchStartX, touchStartY, MouseAction::ACTION_LEFT);
void OptionsGroup::createStepSlider(OptionId optId, Minecraft* minecraft ) { touchDispatched = true;
Slider* element = new SliderInt(minecraft, optId); }
element->width = 100; }
element->height = 20; }
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId()); if (scrollingGesture && dy != 0) {
OptionsItem* item = new OptionsItem(optId, itemLabel, element); scrollByPixels((float)dy);
addChild(item); }
setupPositions(); lastDragY = ym;
} }
super::tick(minecraft);
void OptionsGroup::createTextbox(OptionId optId, Minecraft* minecraft) { }
TextBox* element = new TextOption(minecraft, optId);
element->width = 100; void OptionsGroup::mouseClicked(Minecraft* minecraft, int x, int y, int buttonNum) {
element->height = 20; trackingScrollGesture = false;
scrollingGesture = false;
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId()); touchDispatched = false;
OptionsItem* item = new OptionsItem(optId, itemLabel, element);
addChild(item); if (buttonNum == MouseAction::ACTION_LEFT && pointInside(x, y)) {
setupPositions(); trackingScrollGesture = true;
} dragStartX = x;
dragStartY = y;
void OptionsGroup::createKey(OptionId optId, Minecraft* minecraft) { lastDragY = y;
KeyOption* element = new KeyOption(minecraft, optId); touchStartX = x;
element->width = 50; touchStartY = y;
element->height = 20; return;
}
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId());
OptionsItem* item = new OptionsItem(optId, itemLabel, element); super::mouseClicked(minecraft, x, y, buttonNum);
addChild(item); }
setupPositions();
} void OptionsGroup::mouseReleased(Minecraft* minecraft, int x, int y, int buttonNum) {
bool wasScrolling = scrollingGesture;
bool wasTracking = trackingScrollGesture;
trackingScrollGesture = false;
scrollingGesture = false;
if (buttonNum == MouseAction::ACTION_LEFT && wasTracking && !touchDispatched && pointInside(touchStartX, touchStartY)) {
super::mouseClicked(minecraft, touchStartX, touchStartY, buttonNum);
touchDispatched = true;
}
if (!wasScrolling) {
super::mouseReleased(minecraft, x, y, buttonNum);
}
}
void OptionsGroup::scrollByPixels(float deltaY) {
if (deltaY == 0.0f || maxScrollOffsetY <= 0.0f) return;
scrollOffsetY = Mth::clamp(scrollOffsetY - deltaY, 0.0f, maxScrollOffsetY);
setupPositions();
}
bool OptionsGroup::isScrollingGestureActive() const {
return trackingScrollGesture || scrollingGesture;
}
OptionsGroup& OptionsGroup::addOptionItem(OptionId optId, Minecraft* minecraft ) {
auto option = minecraft->options.getOpt(optId);
if (option == nullptr) return *this;
// TODO: do a options key class to check it faster via dynamic_cast
if (option->getStringId().find("options.key") != std::string::npos) createKey(optId, minecraft);
else if (dynamic_cast<OptionBool*>(option)) createToggle(optId, minecraft);
else if (dynamic_cast<OptionFloat*>(option)) createProgressSlider(optId, minecraft);
else if (dynamic_cast<OptionInt*>(option)) createStepSlider(optId, minecraft);
else if (dynamic_cast<OptionString*>(option)) createTextbox(optId, minecraft);
return *this;
}
// TODO: wrap this copypaste shit into templates
void OptionsGroup::createToggle(OptionId optId, Minecraft* minecraft ) {
ImageDef def;
def.setSrc(IntRectangle(160, 206, 39, 20));
def.name = "gui/touchgui.png";
def.width = 39 * 0.7f;
def.height = 20 * 0.7f;
OptionButton* element = new OptionButton(optId);
element->setImageDef(def, true);
element->updateImage(&minecraft->options);
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId());
OptionsItem* item = new OptionsItem(optId, itemLabel, element);
addChild(item);
setupPositions();
}
void OptionsGroup::createProgressSlider(OptionId optId, Minecraft* minecraft ) {
Slider* element = new SliderFloat(minecraft, optId);
element->width = 100;
element->height = 20;
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId());
OptionsItem* item = new OptionsItem(optId, itemLabel, element);
addChild(item);
setupPositions();
}
void OptionsGroup::createStepSlider(OptionId optId, Minecraft* minecraft ) {
Slider* element = new SliderInt(minecraft, optId);
element->width = 100;
element->height = 20;
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId());
OptionsItem* item = new OptionsItem(optId, itemLabel, element);
addChild(item);
setupPositions();
}
void OptionsGroup::createTextbox(OptionId optId, Minecraft* minecraft) {
TextBox* element = new TextOption(minecraft, optId);
element->width = 100;
element->height = 20;
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId());
OptionsItem* item = new OptionsItem(optId, itemLabel, element);
addChild(item);
setupPositions();
}
void OptionsGroup::createKey(OptionId optId, Minecraft* minecraft) {
KeyOption* element = new KeyOption(minecraft, optId);
element->width = 50;
element->height = 20;
std::string itemLabel = I18n::get(minecraft->options.getOpt(optId)->getStringId());
OptionsItem* item = new OptionsItem(optId, itemLabel, element);
addChild(item);
setupPositions();
}

View File

@@ -1,32 +1,49 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsGroup_H__ #ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsGroup_H__
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsGroup_H__ #define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsGroup_H__
//package net.minecraft.client.gui; //package net.minecraft.client.gui;
#include <string> #include <string>
#include "GuiElementContainer.h" #include "GuiElementContainer.h"
#include "ScrollingPane.h" #include "ScrollingPane.h"
#include "../../Options.h" #include "../../Options.h"
class Font; class Font;
class Minecraft; class Minecraft;
class OptionsGroup: public GuiElementContainer { class OptionsGroup: public GuiElementContainer {
typedef GuiElementContainer super; typedef GuiElementContainer super;
public: public:
OptionsGroup(std::string labelID); OptionsGroup(std::string labelID);
virtual void setupPositions(); virtual void setupPositions();
virtual void render(Minecraft* minecraft, int xm, int ym); virtual void render(Minecraft* minecraft, int xm, int ym);
OptionsGroup& addOptionItem(OptionId optId, Minecraft* minecraft); virtual void tick(Minecraft* minecraft);
protected: virtual void mouseClicked(Minecraft* minecraft, int x, int y, int buttonNum);
virtual void mouseReleased(Minecraft* minecraft, int x, int y, int buttonNum);
void createToggle(OptionId optId, Minecraft* minecraft); OptionsGroup& addOptionItem(OptionId optId, Minecraft* minecraft);
void createProgressSlider(OptionId optId, Minecraft* minecraft); void scrollByPixels(float deltaY);
void createStepSlider(OptionId optId, Minecraft* minecraft); bool isScrollingGestureActive() const;
void createTextbox(OptionId optId, Minecraft* minecraft); protected:
void createKey(OptionId optId, Minecraft* minecraft);
void createToggle(OptionId optId, Minecraft* minecraft);
std::string label; void createProgressSlider(OptionId optId, Minecraft* minecraft);
}; void createStepSlider(OptionId optId, Minecraft* minecraft);
void createTextbox(OptionId optId, Minecraft* minecraft);
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsGroup_H__*/ void createKey(OptionId optId, Minecraft* minecraft);
std::string label;
int contentHeight = 0;
float scrollOffsetY = 0.f;
float maxScrollOffsetY = 0.f;
bool trackingScrollGesture = false;
bool scrollingGesture = false;
bool touchDispatched = false;
int dragStartX = 0;
int dragStartY = 0;
int lastDragY = 0;
int touchStartX = 0;
int touchStartY = 0;
static const int ScrollStartThreshold = 5;
};
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsGroup_H__*/

View File

@@ -121,6 +121,7 @@ void OptionsScreen::setupPositions() {
(*it)->x = categoryButtons[0]->width; (*it)->x = categoryButtons[0]->width;
(*it)->y = bHeader->height; (*it)->y = bHeader->height;
(*it)->width = width - categoryButtons[0]->width; (*it)->width = width - categoryButtons[0]->width;
(*it)->height = height - bHeader->height;
(*it)->setupPositions(); (*it)->setupPositions();
} }
@@ -237,8 +238,10 @@ void OptionsScreen::generateOptionScreens() {
.addOptionItem(OPTIONS_BAR_ON_TOP, minecraft) .addOptionItem(OPTIONS_BAR_ON_TOP, minecraft)
.addOptionItem(OPTIONS_MENU_STYLE, minecraft) .addOptionItem(OPTIONS_MENU_STYLE, minecraft)
.addOptionItem(OPTIONS_RPI_CURSOR, minecraft) .addOptionItem(OPTIONS_RPI_CURSOR, minecraft)
#ifdef __APPLE__
.addOptionItem(OPTIONS_FOLIAGE_TINT, minecraft) .addOptionItem(OPTIONS_FOLIAGE_TINT, minecraft)
.addOptionItem(OPTIONS_TINTED_SIDE, minecraft) .addOptionItem(OPTIONS_TINTED_SIDE, minecraft)
#endif
.addOptionItem(OPTIONS_JAVA_HUD, minecraft) .addOptionItem(OPTIONS_JAVA_HUD, minecraft)
.addOptionItem(OPTIONS_FOG_TYPE, minecraft) .addOptionItem(OPTIONS_FOG_TYPE, minecraft)
.addOptionItem(OPTIONS_BETA_SKY, minecraft) .addOptionItem(OPTIONS_BETA_SKY, minecraft)
@@ -261,6 +264,12 @@ void OptionsScreen::mouseReleased(int x, int y, int buttonNum) {
super::mouseReleased(x, y, buttonNum); super::mouseReleased(x, y, buttonNum);
} }
void OptionsScreen::mouseWheel(int dx, int dy, int xm, int ym) {
if (currentOptionsGroup != NULL && currentOptionsGroup->pointInside(xm, ym) && dy != 0) {
currentOptionsGroup->scrollByPixels((float)dy * 18.0f);
}
}
void OptionsScreen::keyPressed(int eventKey) { void OptionsScreen::keyPressed(int eventKey) {
if (currentOptionsGroup != NULL) if (currentOptionsGroup != NULL)
currentOptionsGroup->keyPressed(minecraft, eventKey); currentOptionsGroup->keyPressed(minecraft, eventKey);

View File

@@ -27,6 +27,7 @@ public:
virtual void mouseClicked(int x, int y, int buttonNum); virtual void mouseClicked(int x, int y, int buttonNum);
virtual void mouseReleased(int x, int y, int buttonNum); virtual void mouseReleased(int x, int y, int buttonNum);
virtual void mouseWheel(int dx, int dy, int xm, int ym);
virtual void keyPressed(int eventKey); virtual void keyPressed(int eventKey);
virtual void charPressed(char inputChar); virtual void charPressed(char inputChar);

View File

@@ -185,11 +185,14 @@ void LevelRenderer::allChanged()
lastFogType = mc->options.getIntValue(OPTIONS_FOG_TYPE); lastFogType = mc->options.getIntValue(OPTIONS_FOG_TYPE);
#ifndef __APPLE__
bool tint = mc->options.getBooleanValue(OPTIONS_FOLIAGE_TINT); bool tint = mc->options.getBooleanValue(OPTIONS_FOLIAGE_TINT);
bool sideTint = mc->options.getBooleanValue(OPTIONS_TINTED_SIDE);
#else
bool tint = false, sideTint = false;
#endif
FoliageColor::setUseTint(tint); FoliageColor::setUseTint(tint);
GrassColor::setUseTint(tint); GrassColor::setUseTint(tint);
bool sideTint = mc->options.getBooleanValue(OPTIONS_TINTED_SIDE);
TileRenderer::setUseTint(sideTint); TileRenderer::setUseTint(sideTint);

View File

@@ -10,13 +10,10 @@
static const char* errIdString = 0; static const char* errIdString = 0;
void checkError() { void checkError() {
ALenum err = alGetError();
if(err == AL_NO_ERROR) return;
while (1) { LOGI("### SoundSystemAL error: %d ####: %s\n", err, errIdString==0?"(none)":errIdString);
ALenum err = alGetError();
if(err == AL_NO_ERROR) return;
LOGI("### SoundSystemAL error: %d ####: %s\n", err, errIdString==0?"(none)":errIdString);
}
} }
//typedef ALvoid AL_APIENTRY (*alBufferDataStaticProcPtr) (const ALint bid, ALenum format, ALvoid *data, ALsizei size, ALsizei freq); //typedef ALvoid AL_APIENTRY (*alBufferDataStaticProcPtr) (const ALint bid, ALenum format, ALvoid *data, ALsizei size, ALsizei freq);