v0.8.2c: fixed WndBag resizing using the wrong camera

This commit is contained in:
Evan Debenham 2020-08-27 14:27:45 -04:00
parent 61e7ccd40e
commit 50a80aba44

View File

@ -60,7 +60,6 @@ import com.watabou.gltextures.TextureCache;
import com.watabou.input.KeyBindings; import com.watabou.input.KeyBindings;
import com.watabou.input.KeyEvent; import com.watabou.input.KeyEvent;
import com.watabou.noosa.BitmapText; import com.watabou.noosa.BitmapText;
import com.watabou.noosa.Camera;
import com.watabou.noosa.ColorBlock; import com.watabou.noosa.ColorBlock;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
import com.watabou.noosa.Image; import com.watabou.noosa.Image;
@ -152,12 +151,12 @@ public class WndBag extends WndTabbed {
int windowHeight = TITLE_HEIGHT + slotHeight * nRows + SLOT_MARGIN * (nRows - 1); int windowHeight = TITLE_HEIGHT + slotHeight * nRows + SLOT_MARGIN * (nRows - 1);
if (PixelScene.landscape()){ if (PixelScene.landscape()){
while (windowHeight + 20 > Camera.main.height){ while (windowHeight + 20 > PixelScene.uiCamera.height){
slotHeight--; slotHeight--;
windowHeight -= nRows; windowHeight -= nRows;
} }
} else { } else {
while (windowWidth > Camera.main.width){ while (windowWidth > PixelScene.uiCamera.width){
slotWidth--; slotWidth--;
windowWidth -= nCols; windowWidth -= nCols;
} }