mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-04-05 15:03:31 +00:00
FIX: other platforms compilation
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#include "ImageButton.h"
|
#include "ImageButton.h"
|
||||||
#include "Slider.h"
|
#include "Slider.h"
|
||||||
#include "../../Minecraft.h"
|
#include "../../Minecraft.h"
|
||||||
|
#include "client/Options.h"
|
||||||
|
|
||||||
OptionsPane::OptionsPane() {
|
OptionsPane::OptionsPane() {
|
||||||
|
|
||||||
@@ -28,7 +29,7 @@ OptionsGroup& OptionsPane::createOptionsGroup( std::string label ) {
|
|||||||
return *newGroup;
|
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;
|
if(group > children.size()) return;
|
||||||
ImageDef def;
|
ImageDef def;
|
||||||
def.setSrc(IntRectangle(160, 206, 39, 20));
|
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;
|
def.height = 20 * 0.7f;
|
||||||
OptionButton* element = new OptionButton(option);
|
OptionButton* element = new OptionButton(option);
|
||||||
element->setImageDef(def, true);
|
element->setImageDef(def, true);
|
||||||
OptionsItem* item = new OptionsItem(label, element);
|
OptionsItem* item = new OptionsItem(option, label, element);
|
||||||
((OptionsGroup*)children[group])->addChild(item);
|
((OptionsGroup*)children[group])->addChild(item);
|
||||||
setupPositions();
|
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;
|
if(group > children.size()) return;
|
||||||
Slider* element = new Slider(minecraft, option, progressMin, progressMax);
|
Slider* element = new SliderFloat(minecraft, option);
|
||||||
element->width = 100;
|
element->width = 100;
|
||||||
element->height = 20;
|
element->height = 20;
|
||||||
OptionsItem* item = new OptionsItem(label, element);
|
OptionsItem* item = new OptionsItem(option, label, element);
|
||||||
((OptionsGroup*)children[group])->addChild(item);
|
((OptionsGroup*)children[group])->addChild(item);
|
||||||
setupPositions();
|
setupPositions();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionsPane::createStepSlider( Minecraft* minecraft, unsigned int group, std::string label, const Option* option, const std::vector<int>& stepVec ) {
|
void OptionsPane::createStepSlider( Minecraft* minecraft, unsigned int group, std::string label, OptionId option, const std::vector<int>& stepVec ) {
|
||||||
if(group > children.size()) return;
|
if(group > children.size()) return;
|
||||||
Slider* element = new Slider(minecraft, option, stepVec);
|
Slider* element = new SliderInt(minecraft, option);
|
||||||
element->width = 100;
|
element->width = 100;
|
||||||
element->height = 20;
|
element->height = 20;
|
||||||
OptionsItem* item = new OptionsItem(label, element);
|
OptionsItem* item = new OptionsItem(option, label, element);
|
||||||
((OptionsGroup*)children[group])->addChild(item);
|
((OptionsGroup*)children[group])->addChild(item);
|
||||||
setupPositions();
|
setupPositions();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ class OptionsPane: public GuiElementContainer
|
|||||||
public:
|
public:
|
||||||
OptionsPane();
|
OptionsPane();
|
||||||
OptionsGroup& createOptionsGroup( std::string label );
|
OptionsGroup& createOptionsGroup( std::string label );
|
||||||
void createToggle( unsigned int group, std::string label, const Option* option );
|
void createToggle( unsigned int group, std::string label, OptionId option );
|
||||||
void createProgressSlider(Minecraft* minecraft, unsigned int group, std::string label, const Option* option, float progressMin=1.0f, float progressMax=1.0f );
|
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, const Option* option, const std::vector<int>& stepVec );
|
void createStepSlider(Minecraft* minecraft, unsigned int group, std::string label, OptionId option, const std::vector<int>& stepVec );
|
||||||
void setupPositions();
|
void setupPositions();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
#include "../Screen.h"
|
#include "../Screen.h"
|
||||||
#include "../components/Button.h"
|
#include "../components/Button.h"
|
||||||
#include "../../Minecraft.h"
|
#include "../../Minecraft.h"
|
||||||
#include "ImageButton.h"
|
#include "../components/ImageButton.h"
|
||||||
#include "TextBox.h"
|
#include "../components/TextBox.h"
|
||||||
|
|
||||||
class JoinByIPScreen: public Screen
|
class JoinByIPScreen: public Screen
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include "../../../../world/level/Level.h"
|
#include "../../../../world/level/Level.h"
|
||||||
#include "../../../../world/item/DyePowderItem.h"
|
#include "../../../../world/item/DyePowderItem.h"
|
||||||
#include "../../../../world/item/crafting/Recipe.h"
|
#include "../../../../world/item/crafting/Recipe.h"
|
||||||
#include "Keyboard.h"
|
#include "platform/input/Keyboard.h"
|
||||||
|
|
||||||
static NinePatchLayer* guiPaneFrame = NULL;
|
static NinePatchLayer* guiPaneFrame = NULL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user