Add some #if !defined(APPLE) in debug screen
This commit is contained in:
parent
b3e6ed03b1
commit
5559a9fd1d
@ -39,6 +39,7 @@ 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());
|
||||
@ -46,6 +47,7 @@ void DebugSliderDialog::setSliderHook(std::string id, unsigned min, unsigned max
|
||||
getWidget<SpinnerWidget>(id.c_str())->setMax(max);
|
||||
Setters[id] = S;
|
||||
}
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -33,14 +33,17 @@ 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
|
||||
|
||||
virtual void onEnterPressedInternal() OVERRIDE;
|
||||
virtual void onUpdate(float dt) OVERRIDE;
|
||||
|
@ -35,8 +35,6 @@
|
||||
#include <IGUIEnvironment.h>
|
||||
#include <IGUIContextMenu.h>
|
||||
|
||||
#include <functional>
|
||||
|
||||
using namespace irr;
|
||||
using namespace gui;
|
||||
|
||||
@ -439,6 +437,7 @@ bool onEvent(const SEvent &event)
|
||||
}
|
||||
else if (cmdID == DEBUG_VISUAL_VALUES)
|
||||
{
|
||||
#if !defined(__APPLE__)
|
||||
DebugSliderDialog *dsd = new DebugSliderDialog();
|
||||
dsd->setSliderHook( "red_slider", 0, 255, [](){ return irr_driver->getAmbientLight().r * 255.; },
|
||||
[](int v){
|
||||
@ -467,6 +466,7 @@ bool onEvent(const SEvent &event)
|
||||
dsd->setSliderHook("ssao_sigma", 0, 100, [](){ return irr_driver->getSSAOSigma() * 10; },
|
||||
[](int v){irr_driver->setSSAOSigma(v / 10.); }
|
||||
);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user