Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Commit

Permalink
Add usespeedvariant check box, add showspeed checkbox, fix some text
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian committed Aug 22, 2016
1 parent 12ea398 commit 89ee4ba
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 25 deletions.
72 changes: 49 additions & 23 deletions PokemonGo.RocketBot.Window/Forms/SettingForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions PokemonGo.RocketBot.Window/Forms/SettingForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using PokemonGo.RocketBot.Logic;
using PokemonGo.RocketBot.Window.Helpers;
using POGOProtos.Enums;
using System.Reflection;

namespace PokemonGo.RocketBot.Window.Forms
{
Expand Down Expand Up @@ -258,8 +259,10 @@ private void SettingsForm_Load(object sender, EventArgs e)
#region Advance Settings

cbDisableHumanWalking.Checked = _setting.DisableHumanWalking;
tbWalkingSpeedOffSetInKilometerPerHour.Text =
cbUseWalkingSpeedVariant.Checked = _setting.UseWalkingSpeedVariant;
tbWalkingSpeedVariantInKilometerPerHour.Text =
_setting.WalkingSpeedVariant.ToString(CultureInfo.InvariantCulture);
cbShowWalkingSpeed.Checked = _setting.ShowVariantWalking;
tbMaxSpawnLocationOffset.Text = _setting.MaxSpawnLocationOffset.ToString();
tbMaxTravelDistanceInMeters.Text = _setting.MaxTravelDistanceInMeters.ToString();

Expand Down Expand Up @@ -569,7 +572,9 @@ private void saveBtn_Click(object sender, EventArgs e)
#region Advanced Settings

_setting.DisableHumanWalking = cbDisableHumanWalking.Checked;
_setting.WalkingSpeedVariant = ConvertStringToDouble(tbWalkingSpeedOffSetInKilometerPerHour.Text);
_setting.UseWalkingSpeedVariant = cbUseWalkingSpeedVariant.Checked;
_setting.WalkingSpeedVariant = ConvertStringToDouble(tbWalkingSpeedVariantInKilometerPerHour.Text);
_setting.ShowVariantWalking = cbShowWalkingSpeed.Checked;
_setting.MaxSpawnLocationOffset = ConvertStringToInt(tbMaxSpawnLocationOffset.Text);
_setting.MaxTravelDistanceInMeters = ConvertStringToInt(tbMaxTravelDistanceInMeters.Text);

Expand Down

0 comments on commit 89ee4ba

Please sign in to comment.