Remove outdated Apple-specific code
This commit is contained in:
parent
2660a5b332
commit
b85d84c9dd
@ -39,7 +39,6 @@ DebugSliderDialog::DebugSliderDialog() : ModalDialog(0.85f, 0.25f, MODAL_DIALOG_
|
||||
loadFromFile("debug_slider.stkgui");
|
||||
}
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
void DebugSliderDialog::setSliderHook(std::string id, unsigned min, unsigned max, std::function<int()> G, std::function<void(int)> S)
|
||||
{
|
||||
getWidget<SpinnerWidget>(id.c_str())->setValue(G());
|
||||
@ -47,7 +46,6 @@ void DebugSliderDialog::setSliderHook(std::string id, unsigned min, unsigned max
|
||||
getWidget<SpinnerWidget>(id.c_str())->setMax(max);
|
||||
Setters[id] = S;
|
||||
}
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -66,7 +64,6 @@ void DebugSliderDialog::onEnterPressedInternal()
|
||||
|
||||
GUIEngine::EventPropagation DebugSliderDialog::processEvent(const std::string& eventSource)
|
||||
{
|
||||
#if !defined(__APPLE__)
|
||||
if (Setters.find(eventSource) == Setters.end())
|
||||
return GUIEngine::EVENT_LET;
|
||||
|
||||
@ -74,9 +71,6 @@ GUIEngine::EventPropagation DebugSliderDialog::processEvent(const std::string& e
|
||||
Log::info("DebugSlider", "Value for <%s> : %i", eventSource.c_str(), value);
|
||||
Setters[eventSource](value);
|
||||
return GUIEngine::EVENT_BLOCK;
|
||||
#else
|
||||
return GUIEngine::EVENT_LET;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
@ -33,17 +33,13 @@ class DebugSliderDialog : public GUIEngine::ModalDialog
|
||||
private:
|
||||
|
||||
std::string m_id;
|
||||
#if !defined(__APPLE__)
|
||||
std::map<std::string, std::function<void(int)> >Setters;
|
||||
#endif
|
||||
|
||||
public:
|
||||
DebugSliderDialog();
|
||||
|
||||
~DebugSliderDialog() {};
|
||||
#if !defined(__APPLE__)
|
||||
void setSliderHook(std::string id, unsigned min, unsigned max, std::function<int()> G, std::function<void(int)> S);
|
||||
#endif
|
||||
void changeLabel(std::string id, std::string new_label);
|
||||
|
||||
virtual void onEnterPressedInternal() OVERRIDE;
|
||||
|
@ -543,7 +543,6 @@ bool handleContextMenuAction(s32 cmd_id)
|
||||
break;
|
||||
case DEBUG_VISUAL_VALUES:
|
||||
{
|
||||
#if !defined(__APPLE__)
|
||||
DebugSliderDialog *dsd = new DebugSliderDialog();
|
||||
dsd->setSliderHook("red_slider", 0, 255,
|
||||
[](){ return int(irr_driver->getAmbientLight().r * 255.f); },
|
||||
@ -578,12 +577,10 @@ bool handleContextMenuAction(s32 cmd_id)
|
||||
[](){ return int(irr_driver->getSSAOSigma() * 10.f); },
|
||||
[](int v){irr_driver->setSSAOSigma(v / 10.f); }
|
||||
);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case DEBUG_ADJUST_LIGHTS:
|
||||
{
|
||||
#if !defined(__APPLE__)
|
||||
// Some sliders use multipliers because the spinner widget
|
||||
// only supports integers
|
||||
DebugSliderDialog *dsd = new DebugSliderDialog();
|
||||
@ -637,7 +634,6 @@ bool handleContextMenuAction(s32 cmd_id)
|
||||
[](int v){ findNearestLight()->setRadius(float(v)); }
|
||||
);
|
||||
dsd->changeLabel("SSAO Sigma", "[None]");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case DEBUG_SCRIPT_CONSOLE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user