Skip to content

Commit

Permalink
#194 Active tiles working for all flat grid systems on flat projection.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich2 committed Aug 17, 2022
1 parent 658f007 commit a5f2727
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Tiling/ExsSrc/gOne/GOneGui.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ case class GOneGui(canv: CanvasPlatform, scenStart: OneScen, viewIn: HGView) ext
/** We could of used the mapHCen method and produced the units and the hexstrs graphics at the same time, but its easier to keep them separate. */
def units: Arr[PolygonCompound] = players.someHCOptMap { (p, hc) => proj.transCoord(hc).map { pt =>
val str = ptScale.scaledStr(170, p.toString + "\n" + hc.strComma, 150, p.charStr + "\n" + hc.strComma, 60, p.charStr)
urect.scale(120).slate(pt).fillDrawTextActive(p.colour, HPlayer(hc, p), str, 24, 2.0)
urect.scale(80).slate(pt).fillDrawTextActive(p.colour, HPlayer(hc, p), str, 24, 2.0)
}
}

Expand Down
5 changes: 3 additions & 2 deletions Tiling/src/prid/phex/HSysProjectionFlat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ final case class HSysProjectionFlat(gridSys: HGridSys, panel: Panel) extends HSy
case _ =>
}

override def tiles: PolygonArr = gridSys.map(_.polygonReg).slate(-focus).scale(cPScale)
override def tiles: PolygonArr = gridSys.map(_.hVertPolygon.map(gridSys.hCoordToPt2(_)).slate(-focus).scale(cPScale))

override def tileActives: Arr[PolygonActive] = gridSys.map(hc => hc.polygonReg.slate(-focus).scale(cPScale).active(hc))
override def tileActives: Arr[PolygonActive] =
gridSys.map(hc => hc.hVertPolygon.map(gridSys.hCoordToPt2(_)).slate(-focus).scale(cPScale).active(hc))
override def sides: LineSegArr = gridSys.sideLines.slate(-focus).scale(cPScale)
override def innerSides: LineSegArr = gridSys.innerSideLines.slate(-focus).scale(cPScale)
override def outerSides: LineSegArr = gridSys.outerSideLines.slate(-focus).scale(cPScale)
Expand Down

0 comments on commit a5f2727

Please sign in to comment.