Skip to content

Commit

Permalink
Fixed mouse zoom for WebGL (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
patches34 authored Dec 7, 2023
1 parent 328f8d6 commit d771ace
Show file tree
Hide file tree
Showing 29 changed files with 12 additions and 2,059 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ sysinfo.txt
# Builds
*.apk
*.unitypackage

Logs/
14 changes: 7 additions & 7 deletions Assets/Scripts/Singletons/MenuManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using System.Collections.Generic;
using System.Collections;
using UnityEngine.UI;
Expand Down Expand Up @@ -102,6 +102,7 @@ void AddScreen(UIMenu screen)
void Update()
{
#region Zooming
#if UNITY_ANDROID
if(Input.touchCount >= 2)
{
// Store both touches.
Expand All @@ -121,24 +122,23 @@ void Update()

SetZoom(deltaMagnitudeDiff, zoomSpeed);
}

#if UNITY_EDITOR
#else
if(Input.mouseScrollDelta.y != 0)
{
SetZoom(-Input.mouseScrollDelta.y, mouseWheelSpeed);
}
#endif
#endregion
#endif
#endregion

#region Game Buttons Activation Status
#region Game Buttons Activation Status
playerPassBtn.interactable = GameManager.Instance.IsPlayerTurn();

playerForfeitBtn.interactable = GameManager.Instance.IsGameActive();

playerInputBlock.SetActive(!GameManager.Instance.IsPlayerTurn());

playerRetryBtn.interactable = GameManager.Instance.IsGameActive();
#endregion
#endregion
}

void SetZoom(float delta, float zoomSpeed)
Expand Down
371 changes: 0 additions & 371 deletions Logs/AssetImportWorker0.log

This file was deleted.

407 changes: 0 additions & 407 deletions Logs/AssetImportWorker1.log

This file was deleted.

384 changes: 0 additions & 384 deletions Logs/AssetImportWorker2.log

This file was deleted.

347 changes: 0 additions & 347 deletions Logs/AssetImportWorker3.log

This file was deleted.

14 changes: 0 additions & 14 deletions Logs/Packages-Update.log

This file was deleted.

6 changes: 0 additions & 6 deletions Logs/shadercompiler-AssetImportWorker0.log

This file was deleted.

238 changes: 0 additions & 238 deletions Logs/shadercompiler-UnityShaderCompiler.exe0.log

This file was deleted.

19 changes: 0 additions & 19 deletions Logs/shadercompiler-UnityShaderCompiler.exe1.log

This file was deleted.

7 changes: 0 additions & 7 deletions Logs/shadercompiler-UnityShaderCompiler.exe10.log

This file was deleted.

10 changes: 0 additions & 10 deletions Logs/shadercompiler-UnityShaderCompiler.exe11.log

This file was deleted.

7 changes: 0 additions & 7 deletions Logs/shadercompiler-UnityShaderCompiler.exe12.log

This file was deleted.

7 changes: 0 additions & 7 deletions Logs/shadercompiler-UnityShaderCompiler.exe13.log

This file was deleted.

13 changes: 0 additions & 13 deletions Logs/shadercompiler-UnityShaderCompiler.exe14.log

This file was deleted.

7 changes: 0 additions & 7 deletions Logs/shadercompiler-UnityShaderCompiler.exe15.log

This file was deleted.

Loading

0 comments on commit d771ace

Please sign in to comment.