Skip to content

Commit

Permalink
Fix name of BgImagePos member
Browse files Browse the repository at this point in the history
  • Loading branch information
Lojemiru committed Mar 7, 2023
1 parent f189731 commit 7cb461d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/electron.renderer/data/Level.hx
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ class Level {
sx = pxWid / baseTileWid;
sy = pxHei/ baseTileHei;

case Tile:
case Repeat:
// Do nothing, tiling shenanigans are handled in createBgTiledTexture.
}

Expand Down Expand Up @@ -423,7 +423,7 @@ class Level {
var t = h2d.Tile.fromTexture( bgInf.imgData.tex );
t = t.sub(bgInf.tx, bgInf.ty, bgInf.tw, bgInf.th);

var tile = (bgPos == ldtk.Json.BgImagePos.Tile);
var tile = (bgPos == ldtk.Json.BgImagePos.Repeat);

var w = tile ? pxWid : Std.int(bgInf.tw);
var h = tile ? pxHei : Std.int(bgInf.th);
Expand Down
2 changes: 1 addition & 1 deletion src/electron.renderer/ui/LevelInstanceForm.hx
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ class LevelInstanceForm {
case Contain: Lang.t._("Fit inside (keep aspect ratio)");
case Cover: Lang.t._("Cover level (keep aspect ratio)");
case CoverDirty: Lang.t._("Cover (dirty scaling)");
case Tile: Lang.t._("Repeat");
case Repeat: Lang.t._("Repeat");
});
}
jSelect.val( level.bgPos.getName() );
Expand Down

0 comments on commit 7cb461d

Please sign in to comment.