v0.4.1a: corrections to inventory window logic

This commit is contained in:
Evan Debenham 2016-08-10 19:04:09 -04:00
parent fd520b7f77
commit 57c6abd730
2 changed files with 4 additions and 4 deletions

View File

@ -570,7 +570,7 @@ public class GameScene extends PixelScene {
banner.camera = uiCamera; banner.camera = uiCamera;
banner.x = align( uiCamera, (uiCamera.width - banner.width) / 2 ); banner.x = align( uiCamera, (uiCamera.width - banner.width) / 2 );
banner.y = align( uiCamera, (uiCamera.height - banner.height) / 3 ); banner.y = align( uiCamera, (uiCamera.height - banner.height) / 3 );
add( banner ); addToFront( banner );
} }
// ------------------------------------------------------- // -------------------------------------------------------
@ -689,7 +689,7 @@ public class GameScene extends PixelScene {
public static void show( Window wnd ) { public static void show( Window wnd ) {
cancelCellSelector(); cancelCellSelector();
scene.add( wnd ); scene.addToFront( wnd );
} }
public static void afterObserve() { public static void afterObserve() {
@ -756,7 +756,7 @@ public class GameScene extends PixelScene {
WndBag.getBag( WandHolster.class, listener, mode, title ) : WndBag.getBag( WandHolster.class, listener, mode, title ) :
WndBag.lastBag( listener, mode, title ); WndBag.lastBag( listener, mode, title );
scene.add( wnd ); scene.addToFront( wnd );
return wnd; return wnd;
} }

View File

@ -79,7 +79,7 @@ public class WndItem extends Window {
@Override @Override
protected void onClick() { protected void onClick() {
hide(); hide();
if (owner != null) owner.hide(); if (owner != null && owner.parent != null) owner.hide();
item.execute( Dungeon.hero, action ); item.execute( Dungeon.hero, action );
}; };
}; };