mirror of
https://github.com/maxartz15/MA_TextureAtlasser.git
synced 2024-11-23 22:15:33 +01:00
Settings, Hotkey bugfix.
null errors.
This commit is contained in:
parent
82efcbb6d0
commit
7990f987dc
@ -211,7 +211,7 @@ namespace MA_TextureAtlasserPro
|
||||
{
|
||||
if(atlas != null && atlas.selectedTextureQuad != null)
|
||||
{
|
||||
CreateTextureQuad(atlas, namePrefix + atlas.selectedTextureQuad.name, atlas.selectedTextureQuad.rect);
|
||||
CreateTextureQuad(atlas, namePrefix + atlas.selectedTextureQuad.name, atlas.selectedTextureQuad.rect, false);
|
||||
|
||||
if(copyData)
|
||||
{
|
||||
|
@ -93,24 +93,27 @@ namespace MA_TextureAtlasserPro
|
||||
//Hotkeys.
|
||||
if (curWindow.settings.useHotkeys)
|
||||
{
|
||||
if (e.type == EventType.KeyDown && e.keyCode == curWindow.settings.addQuadHotKey)
|
||||
if(curWindow.textureAtlas != null)
|
||||
{
|
||||
MA_TextureAtlasserProUtils.CreateTextureQuad(curWindow.textureAtlas, "new Quad", new Rect(0, 0, 128, 128), curWindow.settings.autoFocus);
|
||||
e.Use();
|
||||
}
|
||||
|
||||
if (curWindow.textureAtlas.selectedTextureQuad != null)
|
||||
{
|
||||
if (e.type == EventType.KeyDown && e.keyCode == curWindow.settings.removeQuadHotKey)
|
||||
if (e.type == EventType.KeyDown && e.keyCode == curWindow.settings.addQuadHotKey)
|
||||
{
|
||||
MA_TextureAtlasserProUtils.RemoveTextureQuad(curWindow.textureAtlas, curWindow.settings.autoFocus);
|
||||
MA_TextureAtlasserProUtils.CreateTextureQuad(curWindow.textureAtlas, "new Quad", new Rect(0, 0, 128, 128), curWindow.settings.autoFocus);
|
||||
e.Use();
|
||||
}
|
||||
|
||||
if (e.type == EventType.KeyDown && e.keyCode == curWindow.settings.duplicateHotKey)
|
||||
if (curWindow.textureAtlas.selectedTextureQuad != null)
|
||||
{
|
||||
MA_TextureAtlasserProUtils.DuplicateTextureQuad(curWindow.textureAtlas, curWindow.settings.autoFocus);
|
||||
e.Use();
|
||||
if (e.type == EventType.KeyDown && e.keyCode == curWindow.settings.removeQuadHotKey)
|
||||
{
|
||||
MA_TextureAtlasserProUtils.RemoveTextureQuad(curWindow.textureAtlas, curWindow.settings.autoFocus);
|
||||
e.Use();
|
||||
}
|
||||
|
||||
if (e.type == EventType.KeyDown && e.keyCode == curWindow.settings.duplicateHotKey)
|
||||
{
|
||||
MA_TextureAtlasserProUtils.DuplicateTextureQuad(curWindow.textureAtlas, curWindow.settings.autoFocus, curWindow.settings.copySelectedQuadData, curWindow.settings.duplicatedQuadNamePrefix);
|
||||
e.Use();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user