Skip to content

Commit

Permalink
Release 0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ngld committed Jul 29, 2020
1 parent f82cb37 commit 03766db
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 7 deletions.
2 changes: 1 addition & 1 deletion HtmlRenderer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.14.1.0")]
[assembly: AssemblyVersion("0.15.0.0")]
2 changes: 1 addition & 1 deletion OverlayPlugin.Common/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.14.1.0")]
[assembly: AssemblyVersion("0.15.0.0")]
32 changes: 30 additions & 2 deletions OverlayPlugin.Core/Controls/NewOverlayDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;

namespace RainbowMage.OverlayPlugin
{
Expand Down Expand Up @@ -58,7 +59,11 @@ public NewOverlayDialog(PluginMain pluginMain)
}

cbType.DisplayMember = "Key";
cbType.SelectedIndex = 0;
// Workaround for the special case where no overlay type has been registered.
// That still indicates a bug but showing an empty combo box is better than crashing.
if (cbType.Items.Count > 0)
cbType.SelectedIndex = 0;

presets = PreparePresetCombo(cbPreset);

lblType.Visible = false;
Expand Down Expand Up @@ -169,6 +174,16 @@ private void buttonOK_Click(object sender, EventArgs e)

// Reconstruct the overlay to reset the preview state.
SelectedOverlay = new Overlays.MiniParseOverlay(config, name);
if (config.Url == "")
{
// If the preview didn't load, we try again here to avoid ending up with an empty overlay.
#if DEBUG
var resourcesPath = "file:///" + PluginMain.PluginDirectory.Replace('\\', '/') + "/libs/resources";
#else
var resourcesPath = "file:///" + PluginMain.PluginDirectory.Replace('\\', '/') + "/resources";
#endif
SelectedOverlay.Navigate(preset.Url.Replace("%%", resourcesPath));
}
}
else
{
Expand Down Expand Up @@ -221,9 +236,22 @@ private void cbPreset_SelectedIndexChanged(object sender, EventArgs e)
IsLocked = preset.Locked,
};

var presetUrl = preset.Url.Replace("%%", resourcesPath);
var overlay = new Overlays.MiniParseOverlay(config, config.Name);
overlay.Preview = true;
overlay.Navigate(preset.Url.Replace("%%", resourcesPath));

var first = true;
overlay.Overlay.Renderer.BrowserLoad += (o, ev) =>
{
// Once the placeholder is ready, we load the actual overlay.
if (first)
{
first = false;
overlay.Navigate(presetUrl);
}
};
// Show a placeholder while the actual overlay is loading.
overlay.Navigate(resourcesPath + "/loading.html");

preview = overlay;
break;
Expand Down
2 changes: 2 additions & 0 deletions OverlayPlugin.Core/EventSources/EnmityMemory50.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ private bool GetPointerAddress()
if ((DateTime.Now - lastSigScan) < TimeSpan.FromSeconds(5))
return false;

lastSigScan = DateTime.Now;

bool success = true;
bool bRIP = true;

Expand Down
3 changes: 3 additions & 0 deletions OverlayPlugin.Core/OverlayPlugin.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@
<Content Include="resources\label.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\loading.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\miniparse.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
2 changes: 1 addition & 1 deletion OverlayPlugin.Core/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.14.1.0")]
[assembly: AssemblyVersion("0.15.0.0")]
2 changes: 1 addition & 1 deletion OverlayPlugin.Updater/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.14.1.0")]
[assembly: AssemblyVersion("0.15.0.0")]
2 changes: 1 addition & 1 deletion OverlayPlugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.14.1.0")]
[assembly: AssemblyVersion("0.15.0.0")]
3 changes: 3 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ try {
}

$ENV:PATH = "$VS_PATH\MSBuild\Current\Bin;${ENV:PATH}";
if (Test-Path "C:\Program Files\7-Zip\7z.exe") {
$ENV:PATH = "C:\Program Files\7-Zip;${ENV:PATH}";
}

if ( -not (Test-Path .\OverlayPlugin.Updater\Resources\libcurl.dll)) {
echo "==> Building cURL..."
Expand Down

0 comments on commit 03766db

Please sign in to comment.