|
@@ -518,8 +518,6 @@ bool SceneView3D::OnEvent(const TBWidgetEvent &ev)
|
|
|
|
|
|
|
|
void SceneView3D::HandleUpdate(StringHash eventType, VariantMap& eventData)
|
|
void SceneView3D::HandleUpdate(StringHash eventType, VariantMap& eventData)
|
|
|
{
|
|
{
|
|
|
- int FARCLIP_INCREMENT = 8;
|
|
|
|
|
-
|
|
|
|
|
// parent is the contentRoot for our tab, when tab isn't active it will not be visible
|
|
// parent is the contentRoot for our tab, when tab isn't active it will not be visible
|
|
|
if (!GetParent() || GetParent()->GetVisibility() != UI_WIDGET_VISIBILITY_VISIBLE)
|
|
if (!GetParent() || GetParent()->GetVisibility() != UI_WIDGET_VISIBILITY_VISIBLE)
|
|
|
{
|
|
{
|
|
@@ -537,31 +535,8 @@ void SceneView3D::HandleUpdate(StringHash eventType, VariantMap& eventData)
|
|
|
QueueUpdate();
|
|
QueueUpdate();
|
|
|
|
|
|
|
|
if (gridEnabled_)
|
|
if (gridEnabled_)
|
|
|
- {
|
|
|
|
|
- int cameraYPos = cameraNode_->GetPosition().y_;
|
|
|
|
|
- int farClip = camera_->GetFarClip();
|
|
|
|
|
-
|
|
|
|
|
- if (cameraYPos == newCameraYPos_)
|
|
|
|
|
- {
|
|
|
|
|
- farClip = camera_->GetFarClip();
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- if (cameraYPos > newCameraYPos_)
|
|
|
|
|
- {
|
|
|
|
|
- farClip += FARCLIP_INCREMENT;
|
|
|
|
|
- camera_->SetFarClip(farClip);
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- farClip -= FARCLIP_INCREMENT;
|
|
|
|
|
- camera_->SetFarClip(farClip);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- newCameraYPos_ = cameraYPos;
|
|
|
|
|
-
|
|
|
|
|
debugRenderer_->CreateGrid(Color::GRAY, true, cameraNode_->GetPosition());
|
|
debugRenderer_->CreateGrid(Color::GRAY, true, cameraNode_->GetPosition());
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
if (preloadResourceScene_.NotNull())
|
|
if (preloadResourceScene_.NotNull())
|
|
|
{
|
|
{
|