-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from ahoirg/develop
Develop
- Loading branch information
Showing
11 changed files
with
1,855 additions
and
16 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
Assets/_UDVT/Scripts/Runtime/MenuScripts/ChooseKdeParameters.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.SceneManagement; | ||
using UnityEngine.UI; | ||
using System; | ||
|
||
/// <summary> | ||
/// It includes input buttons to obtaining the parameters required in KDE calculations from the user. | ||
/// </summary> | ||
public class ChooseKdeParameters : MonoBehaviour | ||
{ | ||
public InputField sigmaValue; | ||
public InputField stepsValue; | ||
|
||
public void OnChangeSigmaValue() | ||
{ | ||
string inputText = (string) sigmaValue.text; | ||
|
||
if (double.TryParse(inputText, out double doubleValue)) | ||
CurrentParams.kdeSigmaValue = doubleValue; | ||
else | ||
CurrentParams.SetDefaultKdeSigmaValue(); // set default | ||
} | ||
|
||
public void OnChangeStepsValue() | ||
{ | ||
string inputText = (string)stepsValue.text; | ||
|
||
if (Int32.TryParse(inputText, out int intValue)) | ||
CurrentParams.kdeStepsValue = intValue; | ||
else | ||
CurrentParams.SetDefaultKdeStepsValue(); // set default | ||
} | ||
|
||
public void SaveValuesAndRedirect() | ||
{ | ||
SceneManager.LoadScene("LoadData"); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/_UDVT/Scripts/Runtime/MenuScripts/ChooseKdeParameters.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters