Skip to content

Commit

Permalink
Fixing reload of tile picker ui
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaskelly committed Apr 26, 2020
1 parent fb9c310 commit eb05c6b
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,7 @@ public void create() {
Gdx.input.setCursorCatched(false);

initTextures();
setupHud(wallTextures);


pickedWallTextureAtlas = pickedWallBottomTextureAtlas = pickedFloorTextureAtlas = pickedCeilingTextureAtlas =
TextureAtlas.cachedRepeatingAtlases.firstKey();
Expand Down Expand Up @@ -2457,11 +2457,14 @@ public void initTextures() {
spriteAtlases.put(Entity.ArtType.door, loadAtlas("textures.png", 4, false));
spriteAtlases.put(Entity.ArtType.texture, loadAtlas("textures.png", 4, false));
spriteAtlases.put(Entity.ArtType.particle, loadAtlas("particles.png", 8, false));

setupHud(wallTextures);
}

private void setupHud(TextureRegion[] wallTextures) {

ui = new EditorUi();
if (ui == null) {
ui = new EditorUi();
}

wallPickerButton = new Image(new TextureRegionDrawable(wallTextures[0]));
wallPickerButton.setScaling(Scaling.stretch);
Expand Down

0 comments on commit eb05c6b

Please sign in to comment.