| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-06-14 13:32:16 +0200 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-06-14 13:32:16 +0200 | 
| commit | ea51e73fe9e989146789bb5db26b781114a1f1d9 (patch) | |
| tree | 61a003f73e8a5e7e31e7dc0a27dc33a3ffb81dce | |
| parent | c451def956eb7678cf304ba3f4aa72215a60ba0d (diff) | |
Still working on those markers...
At the moment,
Controller Character:
- Move: old marker
- Attack: old marker
- Can't Defend (Move): Diagonal dashes on the old marker
- Can't Defend (Attack): Diagonal dashes on the old marker
Targeted Character:
- Move: half-tile sized pawprint, centered.
- Attack: half-tile sized blade, centered.
- Can't Defend (Move): ???
- Can't Defend (Attack): ???
Also, clicking on the Targeted Character's markers should still be
considered as an input on the tile (or marker) below.
| -rw-r--r-- | src/asset/www/svg/marker/blade.svg | 90 | ||||
| -rw-r--r-- | src/asset/www/svg/marker/pawprint.svg (renamed from src/asset/www/svg/pawprint.svg) | 0 | ||||
| -rw-r--r-- | src/battlemap/src/Struct/Tile.elm | 2 | ||||
| -rw-r--r-- | src/battlemap/src/View/Battlemap/Navigator.elm | 23 | ||||
| -rw-r--r-- | src/battlemap/www/style.css | 28 | 
5 files changed, 131 insertions, 12 deletions
| diff --git a/src/asset/www/svg/marker/blade.svg b/src/asset/www/svg/marker/blade.svg new file mode 100644 index 0000000..e84734e --- /dev/null +++ b/src/asset/www/svg/marker/blade.svg @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg +   xmlns:dc="http://purl.org/dc/elements/1.1/" +   xmlns:cc="http://creativecommons.org/ns#" +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" +   xmlns:svg="http://www.w3.org/2000/svg" +   xmlns="http://www.w3.org/2000/svg" +   xmlns:xlink="http://www.w3.org/1999/xlink" +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" +   width="32mm" +   height="32mm" +   viewBox="0 0 32 32" +   version="1.1" +   id="svg8" +   inkscape:version="0.92.2 5c3e80d, 2017-08-06" +   sodipodi:docname="badsword2.svg"> +  <defs +     id="defs2" /> +  <sodipodi:namedview +     id="base" +     pagecolor="#ffffff" +     bordercolor="#666666" +     borderopacity="1.0" +     inkscape:pageopacity="0.0" +     inkscape:pageshadow="2" +     inkscape:zoom="5.6568543" +     inkscape:cx="50.958187" +     inkscape:cy="78.857285" +     inkscape:document-units="mm" +     inkscape:current-layer="layer1" +     showgrid="false" +     inkscape:window-width="1678" +     inkscape:window-height="1029" +     inkscape:window-x="1" +     inkscape:window-y="516" +     inkscape:window-maximized="0" +     inkscape:pagecheckerboard="true" +     inkscape:snap-global="false" /> +  <metadata +     id="metadata5"> +    <rdf:RDF> +      <cc:Work +         rdf:about=""> +        <dc:format>image/svg+xml</dc:format> +        <dc:type +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> +        <dc:title></dc:title> +      </cc:Work> +    </rdf:RDF> +  </metadata> +  <g +     inkscape:groupmode="layer" +     id="layer2" +     inkscape:label="Layer 2" +     style="display:inline" /> +  <g +     inkscape:label="Layer 1" +     inkscape:groupmode="layer" +     id="layer1" +     transform="translate(0,-265)" +     style="display:inline"> +    <circle +       style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.48571736;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:170.07873535;stroke-opacity:1;paint-order:fill markers stroke" +       id="path881" +       cx="16" +       cy="281" +       r="16" /> +    <g +       id="g829" +       transform="rotate(45,13.546346,299.58838)"> +      <path +         sodipodi:nodetypes="ccccccc" +         inkscape:connector-curvature="0" +         id="path823" +         d="m 2.1373732,297.49657 c 0,0 -2.10381576,0.15519 -1.53434333,-0.76717 -0.45131311,-2.94842 -0.36702427,-4.82563 0,-6.13737 C -1.6345111,291.24124 -2.4935043,289.59288 -4,289.02369 c 1.7466918,-0.26608 3.5260131,-0.13533 3.83585823,-1.50035 -0.38175582,-6.72005 1.53434327,-11.25184 2.30151497,-16.87777 z" +         style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.40596163px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> +      <use +         height="100%" +         width="100%" +         transform="matrix(-1,0,0,1,4.2747463,0)" +         id="use825" +         xlink:href="#path823" +         y="0" +         x="0" /> +    </g> +  </g> +</svg> diff --git a/src/asset/www/svg/pawprint.svg b/src/asset/www/svg/marker/pawprint.svg index a391da6..a391da6 100644 --- a/src/asset/www/svg/pawprint.svg +++ b/src/asset/www/svg/marker/pawprint.svg diff --git a/src/battlemap/src/Struct/Tile.elm b/src/battlemap/src/Struct/Tile.elm index 92abc19..984fc04 100644 --- a/src/battlemap/src/Struct/Tile.elm +++ b/src/battlemap/src/Struct/Tile.elm @@ -50,7 +50,7 @@ get_location tile = tile.location  get_icon_id : Type -> String  get_icon_id tile =     -- Just to see how it looks with SVG -   (toString (rem tile.crossing_cost 3)) +   (toString (rem tile.crossing_cost 4))  get_cost : Type -> Int  get_cost tile = tile.crossing_cost diff --git a/src/battlemap/src/View/Battlemap/Navigator.elm b/src/battlemap/src/View/Battlemap/Navigator.elm index 85a3bea..f5bf209 100644 --- a/src/battlemap/src/View/Battlemap/Navigator.elm +++ b/src/battlemap/src/View/Battlemap/Navigator.elm @@ -64,16 +64,25 @@ marker_get_html is_interactive (loc_ref, marker) =           ]           ++           ( -            if (is_interactive && (marker == Struct.Marker.CanGoTo)) +            if (is_interactive)              then +               if (marker == Struct.Marker.CanGoTo) +               then +                  [ +                     (Html.Attributes.class "battlemap-navigator-interactive"), +                     (Html.Attributes.class "clickable"), +                     (Html.Events.onClick +                        (Struct.Event.TileSelected loc_ref) +                     ) +                  ] +               else +                  [ +                     (Html.Attributes.class "battlemap-navigator-interactive") +                  ] +            else                 [ -                  (Html.Attributes.class "clickable"), -                  (Html.Events.onClick -                     (Struct.Event.TileSelected loc_ref) -                  ) +                  (Html.Attributes.class "battlemap-navigator-non-interactive")                 ] -            else -               []           )        )        [ diff --git a/src/battlemap/www/style.css b/src/battlemap/www/style.css index 6b802b3..e22d606 100644 --- a/src/battlemap/www/style.css +++ b/src/battlemap/www/style.css @@ -463,6 +463,7 @@  .battlemap-marker-icon     {z-index: 2;}  .battlemap-path-icon-above-markers {z-index: 3;}  .battlemap-character-icon  {z-index: 4;} +.battlemap-marker-icon.battlemap-navigator-non-interactive     {z-index: 5;}  .battlemap-marker-icon,  .battlemap-character-icon, @@ -515,7 +516,16 @@     transform: scale(-1, 1);  } -.battlemap-marker-icon +.battlemap-marker-icon.battlemap-navigator-non-interactive +{ +   box-sizing: border-box; +   width: 16px; +   height: 16px; +   background-size: 100%; +   opacity: 0.7; +} + +.battlemap-marker-icon.battlemap-navigator-interactive  {     box-sizing: border-box;     width: 24px; @@ -532,20 +542,20 @@        0px -1px 2px #333;  } -.battlemap-can-go-to-marker +.battlemap-can-go-to-marker.battlemap-navigator-interactive  {     background-color: #FFF;     opacity: 0.3;     transition: opacity 0.3s ease-out;  } -.battlemap-can-go-to-marker:hover +.battlemap-can-go-to-marker.battlemap-navigator-interactive:hover  {     background-color: rgba(255, 255, 255, 0.9);     opacity: 1;  } -.battlemap-can-attack-marker +.battlemap-can-attack-marker.battlemap-navigator-interactive  {     background-color:rgba(0,0,0,0.7);     width: 28px; @@ -556,6 +566,16 @@     border-radius: 0;  } +.battlemap-can-attack-marker.battlemap-navigator-non-interactive +{ +   background-image: url(/asset/svg/marker/blade.svg); +} + +.battlemap-can-go-to-marker.battlemap-navigator-non-interactive +{ +   background-image: url(/asset/svg/marker/pawprint.svg); +} +  .battlemap-cant-defend-marker  {     background: | 


