Skip to content

Commit

Permalink
terrain editor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tritonas00 committed Feb 17, 2021
1 parent 29cc1f3 commit b73c2b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions source/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ int main(int argc, char *argv[])
App::GetOverlayWrapper()->update(dt);
if (App::sim_state->GetEnum<SimState>() == SimState::EDITOR_MODE)
{
App::GetGameContext()->UpdateSimInputEvents(dt);
App::GetSimTerrain()->GetTerrainEditor()->UpdateInputEvents(dt);
}
else if (App::sim_state->GetEnum<SimState>() == SimState::RUNNING)
Expand Down
2 changes: 1 addition & 1 deletion source/main/terrain/TerrainEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void TerrainEditor::UpdateInputEvents(float dt)
auto& object_list = App::GetSimTerrain()->getObjectManager()->GetEditorObjects();
bool update = false;

if (ImGui::IsMouseClicked(1)) // Middle button
if (ImGui::IsMouseClicked(2)) // Middle button
{
ImVec2 mouse_screen = ImGui::GetIO().MousePos / ImGui::GetIO().DisplaySize;
Ogre::Ray terrain_editor_mouse_ray = App::GetCameraManager()->GetCamera()->getCameraToViewportRay(mouse_screen.x, mouse_screen.y);
Expand Down

0 comments on commit b73c2b7

Please # to comment.