Get widths in order, various other things
This commit is contained in:
parent
bc5fd4ffc8
commit
5391fc3ee0
@ -22,16 +22,36 @@
|
|||||||
#include "graphics/Graphics.h"
|
#include "graphics/Graphics.h"
|
||||||
|
|
||||||
OptionsView::OptionsView():
|
OptionsView::OptionsView():
|
||||||
ui::Window(ui::Point(-1, -1), ui::Point(320, 389)){
|
ui::Window(ui::Point(-1, -1), ui::Point(320, 340)){
|
||||||
|
|
||||||
ui::Label * tempLabel = new ui::Label(ui::Point(4, 5), ui::Point(Size.X-8, 14), "Simulation Options");
|
|
||||||
tempLabel->SetTextColour(style::Colour::InformationTitle);
|
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
|
||||||
AddComponent(tempLabel);
|
|
||||||
|
|
||||||
|
|
||||||
int currentY = 10;
|
auto autowidth = [this](ui::Component *c) {
|
||||||
scrollPanel = new ui::ScrollPanel(ui::Point(1, 17), ui::Point(Size.X-2, Size.Y-33));
|
c->Size.X = Size.X - c->Position.X - 12;
|
||||||
|
};
|
||||||
|
|
||||||
|
ui::Label * tempLabel = new ui::Label(ui::Point(4, 1), ui::Point(Size.X-8, 22), "Simulation Options");
|
||||||
|
tempLabel->SetTextColour(style::Colour::InformationTitle);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
|
autowidth(tempLabel);
|
||||||
|
AddComponent(tempLabel);
|
||||||
|
|
||||||
|
class Separator : public ui::Component
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Separator(ui::Point position, ui::Point size) : Component(position, size){}
|
||||||
|
virtual ~Separator(){}
|
||||||
|
|
||||||
|
void Draw(const ui::Point& screenPos)
|
||||||
|
{
|
||||||
|
GetGraphics()->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 180);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Separator *tmpSeparator = new Separator(ui::Point(0, 22), ui::Point(Size.X, 1));
|
||||||
|
AddComponent(tmpSeparator);
|
||||||
|
|
||||||
|
int currentY = 6;
|
||||||
|
scrollPanel = new ui::ScrollPanel(ui::Point(1, 23), ui::Point(Size.X-2, Size.Y-39));
|
||||||
|
|
||||||
AddComponent(scrollPanel);
|
AddComponent(scrollPanel);
|
||||||
|
|
||||||
@ -45,12 +65,15 @@ OptionsView::OptionsView():
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
heatSimulation = new ui::Checkbox(ui::Point(8, currentY), ui::Point(Size.X-6, 16), "Heat simulation \bgIntroduced in version 34", "");
|
heatSimulation = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Heat simulation \bgIntroduced in version 34", "");
|
||||||
|
autowidth(heatSimulation);
|
||||||
heatSimulation->SetActionCallback(new HeatSimulationAction(this));
|
heatSimulation->SetActionCallback(new HeatSimulationAction(this));
|
||||||
scrollPanel->AddChild(heatSimulation);
|
scrollPanel->AddChild(heatSimulation);
|
||||||
currentY+=14;
|
currentY+=14;
|
||||||
tempLabel = new ui::Label(ui::Point(24, currentY), ui::Point(Size.X-28, 16), "\bgCan cause odd behaviour when disabled");
|
tempLabel = new ui::Label(ui::Point(24, currentY), ui::Point(1, 16), "\bgCan cause odd behaviour when disabled");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
|
|
||||||
class AmbientHeatSimulationAction: public ui::CheckboxAction
|
class AmbientHeatSimulationAction: public ui::CheckboxAction
|
||||||
@ -63,13 +86,16 @@ OptionsView::OptionsView():
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
currentY+=16;
|
currentY+=16;
|
||||||
ambientHeatSimulation = new ui::Checkbox(ui::Point(8, currentY), ui::Point(Size.X-6, 16), "Ambient heat simulation \bgIntroduced in version 50", "");
|
ambientHeatSimulation = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Ambient heat simulation \bgIntroduced in version 50", "");
|
||||||
|
autowidth(ambientHeatSimulation);
|
||||||
ambientHeatSimulation->SetActionCallback(new AmbientHeatSimulationAction(this));
|
ambientHeatSimulation->SetActionCallback(new AmbientHeatSimulationAction(this));
|
||||||
scrollPanel->AddChild(ambientHeatSimulation);
|
scrollPanel->AddChild(ambientHeatSimulation);
|
||||||
currentY+=14;
|
currentY+=14;
|
||||||
tempLabel = new ui::Label(ui::Point(24, currentY), ui::Point(Size.X-28, 16), "\bgCan cause odd / broken behaviour with many saves");
|
tempLabel = new ui::Label(ui::Point(24, currentY), ui::Point(1, 16), "\bgCan cause odd / broken behaviour with many saves");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
|
|
||||||
class NewtonianGravityAction: public ui::CheckboxAction
|
class NewtonianGravityAction: public ui::CheckboxAction
|
||||||
@ -82,13 +108,16 @@ OptionsView::OptionsView():
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
currentY+=16;
|
currentY+=16;
|
||||||
newtonianGravity = new ui::Checkbox(ui::Point(8, currentY), ui::Point(Size.X-6, 16), "Newtonian gravity \bgIntroduced in version 48", "");
|
newtonianGravity = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Newtonian gravity \bgIntroduced in version 48", "");
|
||||||
|
autowidth(newtonianGravity);
|
||||||
newtonianGravity->SetActionCallback(new NewtonianGravityAction(this));
|
newtonianGravity->SetActionCallback(new NewtonianGravityAction(this));
|
||||||
scrollPanel->AddChild(newtonianGravity);
|
scrollPanel->AddChild(newtonianGravity);
|
||||||
currentY+=14;
|
currentY+=14;
|
||||||
tempLabel = new ui::Label(ui::Point(24, currentY), ui::Point(Size.X-28, 16), "\bgMay cause poor performance on older computers");
|
tempLabel = new ui::Label(ui::Point(24, currentY), ui::Point(1, 16), "\bgMay cause poor performance on older computers");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
|
|
||||||
class WaterEqualisationAction: public ui::CheckboxAction
|
class WaterEqualisationAction: public ui::CheckboxAction
|
||||||
@ -101,13 +130,16 @@ OptionsView::OptionsView():
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
currentY+=16;
|
currentY+=16;
|
||||||
waterEqualisation = new ui::Checkbox(ui::Point(8, currentY), ui::Point(Size.X-6, 16), "Water equalisation \bgIntroduced in version 61", "");
|
waterEqualisation = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Water equalisation \bgIntroduced in version 61", "");
|
||||||
|
autowidth(waterEqualisation);
|
||||||
waterEqualisation->SetActionCallback(new WaterEqualisationAction(this));
|
waterEqualisation->SetActionCallback(new WaterEqualisationAction(this));
|
||||||
scrollPanel->AddChild(waterEqualisation);
|
scrollPanel->AddChild(waterEqualisation);
|
||||||
currentY+=14;
|
currentY+=14;
|
||||||
tempLabel = new ui::Label(ui::Point(24, currentY), ui::Point(Size.X-28, 16), "\bgMay cause poor performance with a lot of water");
|
tempLabel = new ui::Label(ui::Point(24, currentY), ui::Point(1, 16), "\bgMay cause poor performance with a lot of water");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
|
|
||||||
class AirModeChanged: public ui::DropDownAction
|
class AirModeChanged: public ui::DropDownAction
|
||||||
@ -119,7 +151,7 @@ OptionsView::OptionsView():
|
|||||||
v->c->SetAirMode(option.second);
|
v->c->SetAirMode(option.second);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
currentY+=19;
|
currentY+=19;
|
||||||
airMode = new ui::DropDown(ui::Point(Size.X-95, currentY), ui::Point(80, 16));
|
airMode = new ui::DropDown(ui::Point(Size.X-95, currentY), ui::Point(80, 16));
|
||||||
scrollPanel->AddChild(airMode);
|
scrollPanel->AddChild(airMode);
|
||||||
airMode->AddOption(std::pair<String, int>("On", 0));
|
airMode->AddOption(std::pair<String, int>("On", 0));
|
||||||
@ -130,7 +162,8 @@ OptionsView::OptionsView():
|
|||||||
airMode->SetActionCallback(new AirModeChanged(this));
|
airMode->SetActionCallback(new AirModeChanged(this));
|
||||||
|
|
||||||
tempLabel = new ui::Label(ui::Point(8, currentY), ui::Point(Size.X-96, 16), "Air Simulation Mode");
|
tempLabel = new ui::Label(ui::Point(8, currentY), ui::Point(Size.X-96, 16), "Air Simulation Mode");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
|
|
||||||
class GravityModeChanged: public ui::DropDownAction
|
class GravityModeChanged: public ui::DropDownAction
|
||||||
@ -143,7 +176,7 @@ OptionsView::OptionsView():
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
currentY+=20;
|
currentY+=20;
|
||||||
gravityMode = new ui::DropDown(ui::Point(Size.X-95, currentY), ui::Point(80, 16));
|
gravityMode = new ui::DropDown(ui::Point(Size.X-95, currentY), ui::Point(80, 16));
|
||||||
scrollPanel->AddChild(gravityMode);
|
scrollPanel->AddChild(gravityMode);
|
||||||
gravityMode->AddOption(std::pair<String, int>("Vertical", 0));
|
gravityMode->AddOption(std::pair<String, int>("Vertical", 0));
|
||||||
@ -152,7 +185,8 @@ OptionsView::OptionsView():
|
|||||||
gravityMode->SetActionCallback(new GravityModeChanged(this));
|
gravityMode->SetActionCallback(new GravityModeChanged(this));
|
||||||
|
|
||||||
tempLabel = new ui::Label(ui::Point(8, currentY), ui::Point(Size.X-96, 16), "Gravity Simulation Mode");
|
tempLabel = new ui::Label(ui::Point(8, currentY), ui::Point(Size.X-96, 16), "Gravity Simulation Mode");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
|
|
||||||
class EdgeModeChanged: public ui::DropDownAction
|
class EdgeModeChanged: public ui::DropDownAction
|
||||||
@ -164,7 +198,7 @@ OptionsView::OptionsView():
|
|||||||
v->c->SetEdgeMode(option.second);
|
v->c->SetEdgeMode(option.second);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
currentY+=20;
|
currentY+=20;
|
||||||
edgeMode = new ui::DropDown(ui::Point(Size.X-95, currentY), ui::Point(80, 16));
|
edgeMode = new ui::DropDown(ui::Point(Size.X-95, currentY), ui::Point(80, 16));
|
||||||
scrollPanel->AddChild(edgeMode);
|
scrollPanel->AddChild(edgeMode);
|
||||||
edgeMode->AddOption(std::pair<String, int>("Void", 0));
|
edgeMode->AddOption(std::pair<String, int>("Void", 0));
|
||||||
@ -173,23 +207,12 @@ OptionsView::OptionsView():
|
|||||||
edgeMode->SetActionCallback(new EdgeModeChanged(this));
|
edgeMode->SetActionCallback(new EdgeModeChanged(this));
|
||||||
|
|
||||||
tempLabel = new ui::Label(ui::Point(8, currentY), ui::Point(Size.X-96, 16), "Edge Mode");
|
tempLabel = new ui::Label(ui::Point(8, currentY), ui::Point(Size.X-96, 16), "Edge Mode");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
|
|
||||||
class Separator : public ui::Component
|
currentY+=20;
|
||||||
{
|
tmpSeparator = new Separator(ui::Point(0, currentY), ui::Point(Size.X, 1));
|
||||||
public:
|
|
||||||
Separator(ui::Point position, ui::Point size) : Component(position, size){}
|
|
||||||
virtual ~Separator(){}
|
|
||||||
|
|
||||||
void Draw(const ui::Point& screenPos)
|
|
||||||
{
|
|
||||||
GetGraphics()->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 180);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
currentY+=20;
|
|
||||||
Separator *tmpSeparator = new Separator(ui::Point(0, currentY), ui::Point(Size.X, 1));
|
|
||||||
scrollPanel->AddChild(tmpSeparator);
|
scrollPanel->AddChild(tmpSeparator);
|
||||||
|
|
||||||
class ScaleAction: public ui::DropDownAction
|
class ScaleAction: public ui::DropDownAction
|
||||||
@ -201,7 +224,7 @@ OptionsView::OptionsView():
|
|||||||
v->c->SetScale(option.second);
|
v->c->SetScale(option.second);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
currentY+=4;
|
currentY+=4;
|
||||||
scale = new ui::DropDown(ui::Point(8, currentY), ui::Point(40, 16));
|
scale = new ui::DropDown(ui::Point(8, currentY), ui::Point(40, 16));
|
||||||
{
|
{
|
||||||
int current_scale = ui::Engine::Ref().GetScale();
|
int current_scale = ui::Engine::Ref().GetScale();
|
||||||
@ -221,8 +244,9 @@ OptionsView::OptionsView():
|
|||||||
scale->SetActionCallback(new ScaleAction(this));
|
scale->SetActionCallback(new ScaleAction(this));
|
||||||
scrollPanel->AddChild(scale);
|
scrollPanel->AddChild(scale);
|
||||||
|
|
||||||
tempLabel = new ui::Label(ui::Point(scale->Position.X+scale->Size.X+3, currentY), ui::Point(Size.X-28, 16), "\bg- Window scale factor for larger screens");
|
tempLabel = new ui::Label(ui::Point(scale->Position.X+scale->Size.X+3, currentY), ui::Point(Size.X-40, 16), "\bg- Window scale factor for larger screens");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
|
|
||||||
|
|
||||||
@ -236,11 +260,14 @@ OptionsView::OptionsView():
|
|||||||
v->c->SetResizable(sender->GetChecked());
|
v->c->SetResizable(sender->GetChecked());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
currentY+=20;
|
currentY+=20;
|
||||||
resizable = new ui::Checkbox(ui::Point(8, currentY), ui::Point(Size.X-6, 16), "Resizable", "");
|
resizable = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Resizable", "");
|
||||||
|
autowidth(resizable);
|
||||||
resizable->SetActionCallback(new ResizableAction(this));
|
resizable->SetActionCallback(new ResizableAction(this));
|
||||||
tempLabel = new ui::Label(ui::Point(resizable->Position.X+Graphics::textwidth(resizable->GetText().c_str())+20, currentY), ui::Point(Size.X-28, 16), "\bg- Allow resizing and maximizing window");
|
tempLabel = new ui::Label(ui::Point(resizable->Position.X+Graphics::textwidth(resizable->GetText())+20, currentY), ui::Point(1, 16), "\bg- Allow resizing and maximizing window");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
scrollPanel->AddChild(resizable);
|
scrollPanel->AddChild(resizable);
|
||||||
|
|
||||||
@ -255,11 +282,14 @@ OptionsView::OptionsView():
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
currentY+=20;
|
currentY+=20;
|
||||||
fullscreen = new ui::Checkbox(ui::Point(8, currentY), ui::Point(Size.X-6, 16), "Fullscreen", "");
|
fullscreen = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Fullscreen", "");
|
||||||
|
autowidth(fullscreen);
|
||||||
fullscreen->SetActionCallback(new FullscreenAction(this));
|
fullscreen->SetActionCallback(new FullscreenAction(this));
|
||||||
tempLabel = new ui::Label(ui::Point(fullscreen->Position.X+Graphics::textwidth(fullscreen->GetText().c_str())+20, currentY), ui::Point(Size.X-28, 16), "\bg- Fill the entire screen");
|
tempLabel = new ui::Label(ui::Point(fullscreen->Position.X+Graphics::textwidth(fullscreen->GetText())+20, currentY), ui::Point(1, 16), "\bg- Fill the entire screen");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
scrollPanel->AddChild(fullscreen);
|
scrollPanel->AddChild(fullscreen);
|
||||||
|
|
||||||
@ -273,11 +303,14 @@ OptionsView::OptionsView():
|
|||||||
v->c->SetAltFullscreen(sender->GetChecked());
|
v->c->SetAltFullscreen(sender->GetChecked());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
currentY+=20;
|
currentY+=20;
|
||||||
altFullscreen = new ui::Checkbox(ui::Point(23, currentY), ui::Point(Size.X-6, 16), "Change Resolution", "");
|
altFullscreen = new ui::Checkbox(ui::Point(23, currentY), ui::Point(1, 16), "Change Resolution", "");
|
||||||
|
autowidth(altFullscreen);
|
||||||
altFullscreen->SetActionCallback(new AltFullscreenAction(this));
|
altFullscreen->SetActionCallback(new AltFullscreenAction(this));
|
||||||
tempLabel = new ui::Label(ui::Point(altFullscreen->Position.X+Graphics::textwidth(altFullscreen->GetText().c_str())+20, currentY), ui::Point(Size.X-28, 16), "\bg- Set optimial screen resolution");
|
tempLabel = new ui::Label(ui::Point(altFullscreen->Position.X+Graphics::textwidth(altFullscreen->GetText())+20, currentY), ui::Point(1, 16), "\bg- Set optimial screen resolution");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
scrollPanel->AddChild(altFullscreen);
|
scrollPanel->AddChild(altFullscreen);
|
||||||
|
|
||||||
@ -292,11 +325,14 @@ OptionsView::OptionsView():
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
currentY+=20;
|
currentY+=20;
|
||||||
forceIntegerScaling = new ui::Checkbox(ui::Point(23, currentY), ui::Point(Size.X-6, 16), "Force Integer Scaling", "");
|
forceIntegerScaling = new ui::Checkbox(ui::Point(23, currentY), ui::Point(1, 16), "Force Integer Scaling", "");
|
||||||
|
autowidth(forceIntegerScaling);
|
||||||
forceIntegerScaling->SetActionCallback(new ForceIntegerScalingAction(this));
|
forceIntegerScaling->SetActionCallback(new ForceIntegerScalingAction(this));
|
||||||
tempLabel = new ui::Label(ui::Point(altFullscreen->Position.X+Graphics::textwidth(forceIntegerScaling->GetText().c_str())+20, currentY), ui::Point(Size.X-28, 16), "\bg- less blurry");
|
tempLabel = new ui::Label(ui::Point(altFullscreen->Position.X+Graphics::textwidth(forceIntegerScaling->GetText())+20, currentY), ui::Point(1, 16), "\bg- Less blurry");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
scrollPanel->AddChild(forceIntegerScaling);
|
scrollPanel->AddChild(forceIntegerScaling);
|
||||||
|
|
||||||
@ -310,11 +346,14 @@ OptionsView::OptionsView():
|
|||||||
v->c->SetFastQuit(sender->GetChecked());
|
v->c->SetFastQuit(sender->GetChecked());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
currentY+=20;
|
currentY+=20;
|
||||||
fastquit = new ui::Checkbox(ui::Point(8, currentY), ui::Point(Size.X-6, 16), "Fast Quit", "");
|
fastquit = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Fast Quit", "");
|
||||||
|
autowidth(fastquit);
|
||||||
fastquit->SetActionCallback(new FastQuitAction(this));
|
fastquit->SetActionCallback(new FastQuitAction(this));
|
||||||
tempLabel = new ui::Label(ui::Point(fastquit->Position.X+Graphics::textwidth(fastquit->GetText().c_str())+20, currentY), ui::Point(Size.X-28, 16), "\bg- Always exit completely when hitting close");
|
tempLabel = new ui::Label(ui::Point(fastquit->Position.X+Graphics::textwidth(fastquit->GetText())+20, currentY), ui::Point(1, 16), "\bg- Always exit completely when hitting close");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
scrollPanel->AddChild(fastquit);
|
scrollPanel->AddChild(fastquit);
|
||||||
|
|
||||||
@ -327,11 +366,14 @@ OptionsView::OptionsView():
|
|||||||
v->c->SetShowAvatars(sender->GetChecked());
|
v->c->SetShowAvatars(sender->GetChecked());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
currentY+=20;
|
currentY+=20;
|
||||||
showAvatars = new ui::Checkbox(ui::Point(8, currentY), ui::Point(Size.X-6, 16), "Show Avatars", "");
|
showAvatars = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Show Avatars", "");
|
||||||
|
autowidth(showAvatars);
|
||||||
showAvatars->SetActionCallback(new ShowAvatarsAction(this));
|
showAvatars->SetActionCallback(new ShowAvatarsAction(this));
|
||||||
tempLabel = new ui::Label(ui::Point(showAvatars->Position.X+Graphics::textwidth(showAvatars->GetText().c_str())+20, currentY), ui::Point(Size.X-28, 16), "\bg- Disable if you have a slow connection");
|
tempLabel = new ui::Label(ui::Point(showAvatars->Position.X+Graphics::textwidth(showAvatars->GetText())+20, currentY), ui::Point(1, 16), "\bg- Disable if you have a slow connection");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
scrollPanel->AddChild(showAvatars);
|
scrollPanel->AddChild(showAvatars);
|
||||||
|
|
||||||
@ -344,11 +386,14 @@ OptionsView::OptionsView():
|
|||||||
v->c->SetMouseClickrequired(sender->GetChecked());
|
v->c->SetMouseClickrequired(sender->GetChecked());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
currentY+=20;
|
currentY+=20;
|
||||||
mouseClickRequired = new ui::Checkbox(ui::Point(8, currentY), ui::Point(Size.X-6, 16), "Sticky Categories", "");
|
mouseClickRequired = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Sticky Categories", "");
|
||||||
|
autowidth(mouseClickRequired);
|
||||||
mouseClickRequired->SetActionCallback(new MouseClickRequiredAction(this));
|
mouseClickRequired->SetActionCallback(new MouseClickRequiredAction(this));
|
||||||
tempLabel = new ui::Label(ui::Point(mouseClickRequired->Position.X+Graphics::textwidth(mouseClickRequired->GetText().c_str())+20, currentY), ui::Point(Size.X-28, 16), "\bg- Switch between categories by clicking");
|
tempLabel = new ui::Label(ui::Point(mouseClickRequired->Position.X+Graphics::textwidth(mouseClickRequired->GetText())+20, currentY), ui::Point(1, 16), "\bg- Switch between categories by clicking");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
scrollPanel->AddChild(mouseClickRequired);
|
scrollPanel->AddChild(mouseClickRequired);
|
||||||
|
|
||||||
@ -373,13 +418,15 @@ OptionsView::OptionsView():
|
|||||||
delete[] workingDirectory;
|
delete[] workingDirectory;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
currentY+=20;
|
currentY+=20;
|
||||||
ui::Button * dataFolderButton = new ui::Button(ui::Point(8, currentY), ui::Point(90, 16), "Open Data Folder");
|
ui::Button * dataFolderButton = new ui::Button(ui::Point(8, currentY), ui::Point(90, 16), "Open Data Folder");
|
||||||
dataFolderButton->SetActionCallback(new DataFolderAction());
|
dataFolderButton->SetActionCallback(new DataFolderAction());
|
||||||
scrollPanel->AddChild(dataFolderButton);
|
scrollPanel->AddChild(dataFolderButton);
|
||||||
|
|
||||||
tempLabel = new ui::Label(ui::Point(dataFolderButton->Position.X+dataFolderButton->Size.X+3, currentY), ui::Point(Size.X-28, 16), "\bg- Open the data and preferences folder");
|
tempLabel = new ui::Label(ui::Point(dataFolderButton->Position.X+dataFolderButton->Size.X+3, currentY), ui::Point(1, 16), "\bg- Open the data and preferences folder");
|
||||||
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
autowidth(tempLabel);
|
||||||
|
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
|
||||||
|
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
scrollPanel->AddChild(tempLabel);
|
scrollPanel->AddChild(tempLabel);
|
||||||
|
|
||||||
class CloseAction: public ui::ButtonAction
|
class CloseAction: public ui::ButtonAction
|
||||||
@ -398,7 +445,7 @@ OptionsView::OptionsView():
|
|||||||
AddComponent(tempButton);
|
AddComponent(tempButton);
|
||||||
SetCancelButton(tempButton);
|
SetCancelButton(tempButton);
|
||||||
SetOkayButton(tempButton);
|
SetOkayButton(tempButton);
|
||||||
currentY+=20;
|
currentY+=20;
|
||||||
scrollPanel->InnerSize = ui::Point(Size.X, currentY);
|
scrollPanel->InnerSize = ui::Point(Size.X, currentY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user