Fix occasional crashes upon opening settings
By zero-initializing pointers in OptionsView so they don't crash when they don't get initialized, which up until very recently they always had. In the cases of the emscripten and android ports, certain components are never created.
This commit is contained in:
parent
8cfe7cdd93
commit
1a8ebd0981
@ -15,31 +15,31 @@ class OptionsModel;
|
||||
class OptionsController;
|
||||
class OptionsView: public ui::Window
|
||||
{
|
||||
OptionsController * c;
|
||||
ui::Checkbox * heatSimulation;
|
||||
ui::Checkbox * ambientHeatSimulation;
|
||||
ui::Checkbox * newtonianGravity;
|
||||
ui::Checkbox * waterEqualisation;
|
||||
ui::DropDown * airMode;
|
||||
ui::Textbox * ambientAirTemp;
|
||||
ui::Button * ambientAirTempPreview;
|
||||
ui::DropDown * gravityMode;
|
||||
ui::DropDown * edgeMode;
|
||||
ui::DropDown * temperatureScale;
|
||||
ui::DropDown * scale;
|
||||
ui::Checkbox * resizable;
|
||||
ui::Checkbox * fullscreen;
|
||||
ui::Checkbox * changeResolution;
|
||||
ui::Checkbox * forceIntegerScaling;
|
||||
ui::Checkbox * fastquit = nullptr;
|
||||
ui::DropDown * decoSpace;
|
||||
ui::Checkbox * showAvatars;
|
||||
ui::Checkbox * momentumScroll;
|
||||
ui::Checkbox * mouseClickRequired;
|
||||
ui::Checkbox * includePressure;
|
||||
ui::Checkbox * perfectCircle;
|
||||
ui::Checkbox * graveExitsConsole;
|
||||
ui::ScrollPanel * scrollPanel;
|
||||
OptionsController *c{};
|
||||
ui::Checkbox *heatSimulation{};
|
||||
ui::Checkbox *ambientHeatSimulation{};
|
||||
ui::Checkbox *newtonianGravity{};
|
||||
ui::Checkbox *waterEqualisation{};
|
||||
ui::DropDown *airMode{};
|
||||
ui::Textbox *ambientAirTemp{};
|
||||
ui::Button *ambientAirTempPreview{};
|
||||
ui::DropDown *gravityMode{};
|
||||
ui::DropDown *edgeMode{};
|
||||
ui::DropDown *temperatureScale{};
|
||||
ui::DropDown *scale{};
|
||||
ui::Checkbox *resizable{};
|
||||
ui::Checkbox *fullscreen{};
|
||||
ui::Checkbox *changeResolution{};
|
||||
ui::Checkbox *forceIntegerScaling{};
|
||||
ui::Checkbox *fastquit{};
|
||||
ui::DropDown *decoSpace{};
|
||||
ui::Checkbox *showAvatars{};
|
||||
ui::Checkbox *momentumScroll{};
|
||||
ui::Checkbox *mouseClickRequired{};
|
||||
ui::Checkbox *includePressure{};
|
||||
ui::Checkbox *perfectCircle{};
|
||||
ui::Checkbox *graveExitsConsole{};
|
||||
ui::ScrollPanel *scrollPanel{};
|
||||
float customGravityX, customGravityY;
|
||||
void UpdateAmbientAirTempPreview(float airTemp, bool isValid);
|
||||
void AmbientAirTempToTextBox(float airTemp);
|
||||
|
Loading…
Reference in New Issue
Block a user