Skip to content

Commit

Permalink
[HaCreator] Responsive UI layout for MapBrowser, & auto fill mini map…
Browse files Browse the repository at this point in the history
… preview to UI size
  • Loading branch information
lastbattle committed Jun 27, 2021
1 parent 5abb50c commit 0d38a28
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 36 deletions.
20 changes: 12 additions & 8 deletions HaCreator/CustomControls/MapBrowser.Designer.cs

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

14 changes: 6 additions & 8 deletions HaCreator/CustomControls/MapBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using MapleLib.WzLib;
using MapleLib.WzLib.WzProperties;
using System.Threading;
Expand All @@ -29,6 +25,8 @@ public partial class MapBrowser : UserControl
public MapBrowser()
{
InitializeComponent();

this.minimapBox.SizeMode = PictureBoxSizeMode.Zoom;
}

public bool LoadAvailable
Expand Down Expand Up @@ -188,7 +186,7 @@ private void mapNamesBox_SelectedIndexChanged(object sender, EventArgs e)
{
linkLabel.Visible = false;
mapNotExist.Visible = false;
minimapBox.Image = (Image)new Bitmap(1, 1);
minimapBox.Image = new Bitmap(1, 1);
load = mapNamesBox.SelectedItem != null;
}
else
Expand All @@ -212,7 +210,7 @@ private void mapNamesBox_SelectedIndexChanged(object sender, EventArgs e)
{
linkLabel.Visible = true;
mapNotExist.Visible = false;
minimapBox.Image = (Image)new Bitmap(1, 1);
minimapBox.Image = new Bitmap(1, 1);
load = false;
}
else
Expand All @@ -223,11 +221,11 @@ private void mapNamesBox_SelectedIndexChanged(object sender, EventArgs e)
WzCanvasProperty minimap = (WzCanvasProperty)mapImage.GetFromPath("miniMap/canvas");
if (minimap != null)
{
minimapBox.Image = (Image)minimap.GetLinkedWzCanvasBitmap();
minimapBox.Image = minimap.GetLinkedWzCanvasBitmap();
}
else
{
minimapBox.Image = (Image)new Bitmap(1, 1);
minimapBox.Image = new Bitmap(1, 1);
}
load = true;
}
Expand Down
89 changes: 69 additions & 20 deletions HaCreator/GUI/Load.designer.cs

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

0 comments on commit 0d38a28

Please sign in to comment.