From c70cd428fda4bb4287c69704773ca9cfe516f3d7 Mon Sep 17 00:00:00 2001 From: Kolyah35 Date: Sat, 4 Apr 2026 12:11:33 +0300 Subject: [PATCH 1/2] FIX: other platforms compilation --- src/client/gui/components/OptionsPane.cpp | 17 +++++++++-------- src/client/gui/components/OptionsPane.h | 6 +++--- src/client/gui/screens/JoinByIPScreen.h | 4 ++-- .../gui/screens/crafting/PaneCraftingScreen.cpp | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/client/gui/components/OptionsPane.cpp b/src/client/gui/components/OptionsPane.cpp index e7e6aa2..217a8b2 100644 --- a/src/client/gui/components/OptionsPane.cpp +++ b/src/client/gui/components/OptionsPane.cpp @@ -4,6 +4,7 @@ #include "ImageButton.h" #include "Slider.h" #include "../../Minecraft.h" +#include "client/Options.h" OptionsPane::OptionsPane() { @@ -28,7 +29,7 @@ OptionsGroup& OptionsPane::createOptionsGroup( std::string label ) { return *newGroup; } -void OptionsPane::createToggle( unsigned int group, std::string label, const Option* option ) { +void OptionsPane::createToggle( unsigned int group, std::string label, OptionId option ) { if(group > children.size()) return; ImageDef def; def.setSrc(IntRectangle(160, 206, 39, 20)); @@ -37,27 +38,27 @@ void OptionsPane::createToggle( unsigned int group, std::string label, const Opt def.height = 20 * 0.7f; OptionButton* element = new OptionButton(option); element->setImageDef(def, true); - OptionsItem* item = new OptionsItem(label, element); + OptionsItem* item = new OptionsItem(option, label, element); ((OptionsGroup*)children[group])->addChild(item); setupPositions(); } -void OptionsPane::createProgressSlider( Minecraft* minecraft, unsigned int group, std::string label, const Option* option, float progressMin/*=1.0f*/, float progressMax/*=1.0f */ ) { +void OptionsPane::createProgressSlider( Minecraft* minecraft, unsigned int group, std::string label, OptionId option, float progressMin/*=1.0f*/, float progressMax/*=1.0f */ ) { if(group > children.size()) return; - Slider* element = new Slider(minecraft, option, progressMin, progressMax); + Slider* element = new SliderFloat(minecraft, option); element->width = 100; element->height = 20; - OptionsItem* item = new OptionsItem(label, element); + OptionsItem* item = new OptionsItem(option, label, element); ((OptionsGroup*)children[group])->addChild(item); setupPositions(); } -void OptionsPane::createStepSlider( Minecraft* minecraft, unsigned int group, std::string label, const Option* option, const std::vector& stepVec ) { +void OptionsPane::createStepSlider( Minecraft* minecraft, unsigned int group, std::string label, OptionId option, const std::vector& stepVec ) { if(group > children.size()) return; - Slider* element = new Slider(minecraft, option, stepVec); + Slider* element = new SliderInt(minecraft, option); element->width = 100; element->height = 20; - OptionsItem* item = new OptionsItem(label, element); + OptionsItem* item = new OptionsItem(option, label, element); ((OptionsGroup*)children[group])->addChild(item); setupPositions(); } diff --git a/src/client/gui/components/OptionsPane.h b/src/client/gui/components/OptionsPane.h index cf16b26..e6f7607 100644 --- a/src/client/gui/components/OptionsPane.h +++ b/src/client/gui/components/OptionsPane.h @@ -21,9 +21,9 @@ class OptionsPane: public GuiElementContainer public: OptionsPane(); OptionsGroup& createOptionsGroup( std::string label ); - void createToggle( unsigned int group, std::string label, const Option* option ); - void createProgressSlider(Minecraft* minecraft, unsigned int group, std::string label, const Option* option, float progressMin=1.0f, float progressMax=1.0f ); - void createStepSlider(Minecraft* minecraft, unsigned int group, std::string label, const Option* option, const std::vector& stepVec ); + void createToggle( unsigned int group, std::string label, OptionId option ); + void createProgressSlider(Minecraft* minecraft, unsigned int group, std::string label, OptionId option, float progressMin=1.0f, float progressMax=1.0f ); + void createStepSlider(Minecraft* minecraft, unsigned int group, std::string label, OptionId option, const std::vector& stepVec ); void setupPositions(); }; diff --git a/src/client/gui/screens/JoinByIPScreen.h b/src/client/gui/screens/JoinByIPScreen.h index 4b17543..7333b39 100644 --- a/src/client/gui/screens/JoinByIPScreen.h +++ b/src/client/gui/screens/JoinByIPScreen.h @@ -2,8 +2,8 @@ #include "../Screen.h" #include "../components/Button.h" #include "../../Minecraft.h" -#include "ImageButton.h" -#include "TextBox.h" +#include "../components/ImageButton.h" +#include "../components/TextBox.h" class JoinByIPScreen: public Screen { diff --git a/src/client/gui/screens/crafting/PaneCraftingScreen.cpp b/src/client/gui/screens/crafting/PaneCraftingScreen.cpp index c0ec6a9..4e3d025 100755 --- a/src/client/gui/screens/crafting/PaneCraftingScreen.cpp +++ b/src/client/gui/screens/crafting/PaneCraftingScreen.cpp @@ -16,7 +16,7 @@ #include "../../../../world/level/Level.h" #include "../../../../world/item/DyePowderItem.h" #include "../../../../world/item/crafting/Recipe.h" -#include "Keyboard.h" +#include "platform/input/Keyboard.h" static NinePatchLayer* guiPaneFrame = NULL; -- 2.47.3 From ce52bfd35c217539b4e217847a7401428ebed5e0 Mon Sep 17 00:00:00 2001 From: Kolyah35 Date: Sat, 4 Apr 2026 14:26:57 +0300 Subject: [PATCH 2/2] FIX: web and android compilation --- src/client/renderer/gles.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/renderer/gles.h b/src/client/renderer/gles.h index 9a74c07..c6d4bec 100755 --- a/src/client/renderer/gles.h +++ b/src/client/renderer/gles.h @@ -17,8 +17,8 @@ #import #import #elif defined(ANDROID) || defined(__EMSCRIPTEN__) - #import - #import + #import + #import #else #include -- 2.47.3