mirror of
https://github.com/maxartz15/MA_TextureAtlasser.git
synced 2025-06-30 13:56:07 +02:00
Merged goto01 and reworked some code.
Implemented the texture scaler provided by goto01 (Kiryl Tkachou) and removed the old ones. Implmented the mesh export bugfixes. Changed mesh export names. Changed texture export names. Updated the the export window. Updated export functionality. Updated hotkeys. Fixed quad duplication bug. Minor visual changes. Co-Authored-By: Kiryl Tkachou <goto01@users.noreply.github.com>
This commit is contained in:
@ -33,7 +33,7 @@ namespace MA_TextureAtlasserPro
|
||||
curWindow.workView.ResetWindow();
|
||||
}
|
||||
|
||||
if(curWindow.textureAtlas != null)
|
||||
if (curWindow.textureAtlas != null)
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
//GUILayout.Label(curWindow.textureAtlas.textureAtlasSize.ToString());
|
||||
|
@ -19,7 +19,7 @@ namespace MA_TextureAtlasserPro
|
||||
private const float kZoomMax = 2.0f;
|
||||
private Rect zoomArea;
|
||||
private float zoom = 1.0f;
|
||||
public float Zoom { get { return zoom; } }
|
||||
public float Zoom { get { return zoom; } set { zoom = Mathf.Clamp(value, kZoomMin, kZoomMax); } }
|
||||
private Vector2 zoomCoordsOrigin = Vector2.zero;
|
||||
|
||||
public override void UpdateView(Event e, Rect editorViewRect)
|
||||
@ -96,21 +96,32 @@ namespace MA_TextureAtlasserPro
|
||||
{
|
||||
if(curWindow.textureAtlas != null)
|
||||
{
|
||||
if (e.type == EventType.KeyDown && e.keyCode == curWindow.settings.addQuadHotKey)
|
||||
if (curWindow.settings.GetHotKey(e, curWindow.settings.addQuadHotKey))
|
||||
{
|
||||
MA_TextureAtlasserProUtils.CreateTextureQuad(curWindow.textureAtlas, "new Quad", new Rect(0, 0, 128, 128), curWindow.settings.autoFocus);
|
||||
e.Use();
|
||||
}
|
||||
|
||||
if(curWindow.settings.GetHotKey(e, curWindow.settings.zoomInHotKey))
|
||||
{
|
||||
Zoom += 0.25f;
|
||||
e.Use();
|
||||
}
|
||||
if(curWindow.settings.GetHotKey(e, curWindow.settings.zoomOutHotKey))
|
||||
{
|
||||
Zoom -= 0.25f;
|
||||
e.Use();
|
||||
}
|
||||
|
||||
if (curWindow.textureAtlas.selectedTextureQuad != null)
|
||||
{
|
||||
if (e.type == EventType.KeyDown && e.keyCode == curWindow.settings.removeQuadHotKey)
|
||||
if (curWindow.settings.GetHotKey(e, curWindow.settings.removeQuadHotKey))
|
||||
{
|
||||
MA_TextureAtlasserProUtils.RemoveTextureQuad(curWindow.textureAtlas, curWindow.settings.autoFocus);
|
||||
e.Use();
|
||||
}
|
||||
|
||||
if (e.type == EventType.KeyDown && e.keyCode == curWindow.settings.duplicateHotKey)
|
||||
if (curWindow.settings.GetHotKey(e, curWindow.settings.duplicateHotKey))
|
||||
{
|
||||
MA_TextureAtlasserProUtils.DuplicateTextureQuad(curWindow.textureAtlas, curWindow.settings.autoFocus, curWindow.settings.copySelectedQuadData, curWindow.settings.duplicatedQuadNamePrefix);
|
||||
e.Use();
|
||||
|
Reference in New Issue
Block a user