Skip to content

Commit

Permalink
Add ExtraMoves tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Manu098vm committed Sep 28, 2023
1 parent e55a5df commit 7c745b9
Show file tree
Hide file tree
Showing 13 changed files with 93 additions and 54 deletions.
35 changes: 23 additions & 12 deletions TeraFinder.Core/Classes/ExtraMoves.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,31 @@ namespace TeraFinder.Core;

public class ExtraMoves
{
public Move ExtraMove1;
public Move ExtraMove2;
public Move ExtraMove3;
public Move ExtraMove4;
public Move ExtraMove5;
public Move ExtraMove6;
public HashSet<Move> ExtraMoveList { get; private init; }

public Move ExtraMove1 { get => ExtraMoveList.Count > 0 ? ExtraMoveList.ElementAt(0) : Move.None; }
public Move ExtraMove2 { get => ExtraMoveList.Count > 1 ? ExtraMoveList.ElementAt(1) : Move.None; }
public Move ExtraMove3 { get => ExtraMoveList.Count > 2 ? ExtraMoveList.ElementAt(2) : Move.None; }
public Move ExtraMove4 { get => ExtraMoveList.Count > 3 ? ExtraMoveList.ElementAt(3) : Move.None; }
public Move ExtraMove5 { get => ExtraMoveList.Count > 4 ? ExtraMoveList.ElementAt(4) : Move.None; }
public Move ExtraMove6 { get => ExtraMoveList.Count > 5 ? ExtraMoveList.ElementAt(5) : Move.None; }

public ExtraMoves(ushort extra1 = 0, ushort extra2 = 0, ushort extra3 = 0, ushort extra4 = 0, ushort extra5 = 0, ushort extra6 = 0)
{
ExtraMove1 = (Move)extra1;
ExtraMove2 = (Move)extra2;
ExtraMove3 = (Move)extra3;
ExtraMove4 = (Move)extra4;
ExtraMove5 = (Move)extra5;
ExtraMove6 = (Move)extra6;
ExtraMoveList = new HashSet<Move>();
if (extra1 != 0)
ExtraMoveList.Add((Move)extra1);
if (extra2 != 0)
ExtraMoveList.Add((Move)extra2);
if (extra3 != 0)
ExtraMoveList.Add((Move)extra3);
if (extra4 != 0)
ExtraMoveList.Add((Move)extra4);
if (extra5 != 0)
ExtraMoveList.Add((Move)extra5);
if (extra6 != 0)
ExtraMoveList.Add((Move)extra6);
}

public Move GetExtraMove(int index) => ExtraMoveList.ElementAt(index);
}
1 change: 1 addition & 0 deletions TeraFinder.Core/Resources/translations/lang_de.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=Reward Calculator
EditorForm.LblLvl=Lvl.
EditorForm.CmbRaid=Raid
EditorForm.lblMap=Location Map:
EditorForm.toolTipMoves=Extra Raid Moves:

ShinifyForm.lblValue=Progress:

Expand Down
1 change: 1 addition & 0 deletions TeraFinder.Core/Resources/translations/lang_en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ EditorForm.btnOpenRewardCalculator=Reward Calculator
EditorForm.LblLvl=Lvl.
EditorForm.CmbRaid=Raid
EditorForm.lblMap=Location Map:
EditorForm.toolTipMoves=Extra Raid Moves:

ShinifyForm.lblValue=Progress:

Expand Down
1 change: 1 addition & 0 deletions TeraFinder.Core/Resources/translations/lang_es.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=Calculadora Recompensas
EditorForm.LblLvl=Nvl.
EditorForm.CmbRaid=Teraincursión
EditorForm.lblMap=Location Map:
EditorForm.toolTipMoves=Extra Raid Moves:

ShinifyForm.lblValue=Progreso:

Expand Down
1 change: 1 addition & 0 deletions TeraFinder.Core/Resources/translations/lang_fr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=Reward Calculator
EditorForm.LblLvl=Lvl.
EditorForm.CmbRaid=Raid
EditorForm.lblMap=Location Map:
EditorForm.toolTipMoves=Extra Raid Moves:

ShinifyForm.lblValue=Progress:

Expand Down
1 change: 1 addition & 0 deletions TeraFinder.Core/Resources/translations/lang_it.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=Calcolatore Ricompense
EditorForm.LblLvl=Lvl.
EditorForm.CmbRaid=Raid
EditorForm.lblMap=Mappa:
EditorForm.toolTipMoves=Mosse Extra da Raid:

ShinifyForm.lblValue=Progress:

Expand Down
1 change: 1 addition & 0 deletions TeraFinder.Core/Resources/translations/lang_ja.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=Reward Calculator
EditorForm.LblLvl=Lvl.
EditorForm.CmbRaid=Raid
EditorForm.lblMap=Location Map:
EditorForm.toolTipMoves=Extra Raid Moves:

ShinifyForm.lblValue=Progress:

Expand Down
1 change: 1 addition & 0 deletions TeraFinder.Core/Resources/translations/lang_ko.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=보상 계산기
EditorForm.LblLvl=Lvl.
EditorForm.CmbRaid=레이드
EditorForm.lblMap=Location Map:
EditorForm.toolTipMoves=Extra Raid Moves:

ShinifyForm.lblValue=Progress:

Expand Down
1 change: 1 addition & 0 deletions TeraFinder.Core/Resources/translations/lang_zh.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=奖励计算器
EditorForm.LblLvl=等级:
EditorForm.CmbRaid=太晶洞窟
EditorForm.lblMap=定位图:
EditorForm.toolTipMoves=Extra Raid Moves:

ShinifyForm.lblValue=进程:

Expand Down
1 change: 1 addition & 0 deletions TeraFinder.Core/Resources/translations/lang_zh2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=獎勵計算器
EditorForm.LblLvl=等級:
EditorForm.CmbRaid=太晶洞窟
EditorForm.lblMap=定位图:
EditorForm.toolTipMoves=Extra Raid Moves:

ShinifyForm.lblValue=Progress:

Expand Down
85 changes: 44 additions & 41 deletions TeraFinder.Plugins/Forms/EditorForm.Designer.cs

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

13 changes: 13 additions & 0 deletions TeraFinder.Plugins/Forms/EditorForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ private void GenerateDictionary()
{ "Plugin.Main", "Main" },
{ "Plugin.DLC1", "DLC1" },
{ "Plugin.DLC2", "DLC2" },
{ "EditorForm.toolTipMoves", "Extra Raid Moves:" },
};
}

Expand Down Expand Up @@ -445,6 +446,15 @@ private void UpdatePKMInfo(TeraRaidDetail raid)

SetStarSymbols(rngres.Stars);
SetLevelLabel(rngres.Level);

var movestring = $"{Strings["EditorForm.toolTipMoves"]}";
if (encounter.ExtraMoves.ExtraMoveList.Count > 0)
foreach (var extramove in encounter.ExtraMoves.ExtraMoveList)
movestring += $"{Environment.NewLine}- {moves[(ushort)extramove]}";
else
movestring += $"{Environment.NewLine}- {moves[0]}";
toolTipMoves.SetToolTip(grpMoves, movestring);

return;
}
}
Expand Down Expand Up @@ -478,6 +488,9 @@ private void UpdatePKMInfo(TeraRaidDetail raid)
CurrTera = null;
SetStarSymbols();
SetLevelLabel();

var extramoves = $"{Strings["EditorForm.toolTipMoves"]}{Environment.NewLine}- {GameInfo.GetStrings(Language).movelist[0]}";
toolTipMoves.SetToolTip(grpMoves, extramoves);
}

private void SetStarSymbols(int stars = 0)
Expand Down
5 changes: 4 additions & 1 deletion TeraFinder.Plugins/Forms/EditorForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolTipMoves.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>152, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Expand Down

0 comments on commit 7c745b9

Please sign in to comment.