From ba5f6c2ddf1745a14929bc2c72ddea42dc899545 Mon Sep 17 00:00:00 2001 From: turanszkij Date: Sat, 8 Apr 2017 01:44:49 +0200 Subject: [PATCH] added some more sripttips to editor --- ScriptingAPI-Documentation.md | 1 + WickedEngine/RendererWindow.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/ScriptingAPI-Documentation.md b/ScriptingAPI-Documentation.md index ea798e44d..18ea021d5 100644 --- a/ScriptingAPI-Documentation.md +++ b/ScriptingAPI-Documentation.md @@ -121,6 +121,7 @@ You can use the Renderer with the following functions, all of which are in the g - SetDebugPartitionTreeEnabled(bool enabled) - SetDebugBonesEnabled(bool enabled) - SetVSyncEnabled(opt bool enabled) +- SetOcclusionCullingEnabled(bool enabled) - SetPhysicsParams(opt bool rigidBodyPhysicsEnabled, opt bool softBodyPhysicsEnabled, opt int softBodyIterationCount) - Pick(Ray ray, opt PICKTYPE pickType, opt string id="", opt string disableID="") : Object? object, Vector position,normal, float distance - DrawLine(Vector origin,end, opt Vector color) diff --git a/WickedEngine/RendererWindow.cpp b/WickedEngine/RendererWindow.cpp index 2b805db76..3523e2c83 100644 --- a/WickedEngine/RendererWindow.cpp +++ b/WickedEngine/RendererWindow.cpp @@ -24,6 +24,7 @@ RendererWindow::RendererWindow(Renderable3DComponent* component) vsyncCheckBox = new wiCheckBox("VSync: "); vsyncCheckBox->SetTooltip("Toggle vertical sync"); + vsyncCheckBox->SetScriptTip("SetVSyncEnabled(opt bool enabled)"); vsyncCheckBox->SetPos(XMFLOAT2(x, y += step)); vsyncCheckBox->OnClick([](wiEventArgs args) { wiRenderer::GetDevice()->SetVSyncEnabled(args.bValue); @@ -33,6 +34,7 @@ RendererWindow::RendererWindow(Renderable3DComponent* component) occlusionCullingCheckBox = new wiCheckBox("Occlusion Culling: "); occlusionCullingCheckBox->SetTooltip("Toggle occlusion culling. This can boost framerate if many objects are occluded in the scene."); + occlusionCullingCheckBox->SetScriptTip("SetOcclusionCullingEnabled(bool enabled)"); occlusionCullingCheckBox->SetPos(XMFLOAT2(x, y += step)); occlusionCullingCheckBox->OnClick([](wiEventArgs args) { wiRenderer::SetOcclusionCullingEnabled(args.bValue); @@ -109,6 +111,7 @@ RendererWindow::RendererWindow(Renderable3DComponent* component) partitionBoxesCheckBox = new wiCheckBox("SPTree visualizer: "); partitionBoxesCheckBox->SetTooltip("Visualize the world space partitioning tree as boxes"); + partitionBoxesCheckBox->SetScriptTip("SetDebugPartitionTreeEnabled(bool enabled)"); partitionBoxesCheckBox->SetPos(XMFLOAT2(x, y += step)); partitionBoxesCheckBox->OnClick([](wiEventArgs args) { wiRenderer::SetToDrawDebugPartitionTree(args.bValue); @@ -118,6 +121,7 @@ RendererWindow::RendererWindow(Renderable3DComponent* component) boneLinesCheckBox = new wiCheckBox("Bone line visualizer: "); boneLinesCheckBox->SetTooltip("Visualize bones of armatures"); + boneLinesCheckBox->SetScriptTip("SetDebugBonesEnabled(bool enabled)"); boneLinesCheckBox->SetPos(XMFLOAT2(x, y += step)); boneLinesCheckBox->OnClick([](wiEventArgs args) { wiRenderer::SetToDrawDebugBoneLines(args.bValue); @@ -252,6 +256,7 @@ RendererWindow::RendererWindow(Renderable3DComponent* component) shadowProps2DComboBox->SetSelected(3); shadowProps2DComboBox->SetEnabled(true); shadowProps2DComboBox->SetTooltip("Choose a shadow quality preset for 2D shadow maps (spotlights, directional lights..."); + shadowProps2DComboBox->SetScriptTip("SetShadowProps2D(int resolution, int count, int softShadowQuality)"); rendererWindow->AddWidget(shadowProps2DComboBox); shadowPropsCubeComboBox = new wiComboBox("Cube Shadowmap resolution:"); @@ -291,6 +296,7 @@ RendererWindow::RendererWindow(Renderable3DComponent* component) shadowPropsCubeComboBox->SetSelected(1); shadowPropsCubeComboBox->SetEnabled(true); shadowPropsCubeComboBox->SetTooltip("Choose a shadow quality preset for cube shadow maps (pointlights, area lights)..."); + shadowPropsCubeComboBox->SetScriptTip("SetShadowPropsCube(int resolution, int count)"); rendererWindow->AddWidget(shadowPropsCubeComboBox); MSAAComboBox = new wiComboBox("MSAA:");