editor update: camera picker icon added
This commit is contained in:
@@ -858,6 +858,7 @@ void EditorComponent::Load()
|
||||
decalTex = *(Texture2D*)Content.add("images/decal.dds");
|
||||
forceFieldTex = *(Texture2D*)Content.add("images/forcefield.dds");
|
||||
emitterTex = *(Texture2D*)Content.add("images/emitter.dds");
|
||||
cameraTex = *(Texture2D*)Content.add("images/camera.dds");
|
||||
}
|
||||
void EditorComponent::Start()
|
||||
{
|
||||
@@ -1608,6 +1609,37 @@ void EditorComponent::Compose()
|
||||
}
|
||||
}
|
||||
|
||||
if (rendererWnd->GetPickType() & PICK_CAMERA)
|
||||
{
|
||||
for (auto& y : x->cameras)
|
||||
{
|
||||
float dist = wiMath::Distance(y->translation, wiRenderer::getCamera()->translation) * 0.08f;
|
||||
|
||||
wiImageEffects fx;
|
||||
fx.pos = y->translation;
|
||||
fx.siz = XMFLOAT2(dist, dist);
|
||||
fx.typeFlag = ImageType::WORLD;
|
||||
fx.pivot = XMFLOAT2(0.5f, 0.5f);
|
||||
fx.col = XMFLOAT4(1, 1, 1, 0.5f);
|
||||
|
||||
if (hovered.camera == y)
|
||||
{
|
||||
fx.col = XMFLOAT4(1, 1, 1, 1);
|
||||
}
|
||||
for (auto& picked : selected)
|
||||
{
|
||||
if (picked->camera == y)
|
||||
{
|
||||
fx.col = XMFLOAT4(1, 1, 0, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
wiImage::Draw(&cameraTex, fx, GRAPHICSTHREAD_IMMEDIATE);
|
||||
}
|
||||
}
|
||||
|
||||
if (rendererWnd->GetPickType() & PICK_EMITTER)
|
||||
{
|
||||
for (auto& y : x->objects)
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ class Editor;
|
||||
class EditorComponent : public Renderable2DComponent
|
||||
{
|
||||
private:
|
||||
wiGraphicsTypes::Texture2D pointLightTex, spotLightTex, dirLightTex, areaLightTex, decalTex, forceFieldTex, emitterTex;
|
||||
wiGraphicsTypes::Texture2D pointLightTex, spotLightTex, dirLightTex, areaLightTex, decalTex, forceFieldTex, emitterTex, cameraTex;
|
||||
public:
|
||||
MaterialWindow* materialWnd;
|
||||
PostprocessWindow* postprocessWnd;
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -71,7 +71,7 @@ runProcess(function()
|
||||
|
||||
if(input.Press(VK_F8)) then
|
||||
tt = 0.0
|
||||
play = true
|
||||
play = not play
|
||||
end
|
||||
if(play) then
|
||||
local prox = {}
|
||||
|
||||
Reference in New Issue
Block a user