summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/battlemap/src/View/MessageBoard/Animator/Attack.elm86
-rw-r--r--src/battlemap/src/View/MessageBoard/Error.elm2
-rw-r--r--src/battlemap/src/View/MessageBoard/Help.elm2
-rw-r--r--src/battlemap/www/style.css502
-rw-r--r--src/global/www/style.css6
5 files changed, 293 insertions, 305 deletions
diff --git a/src/battlemap/src/View/MessageBoard/Animator/Attack.elm b/src/battlemap/src/View/MessageBoard/Animator/Attack.elm
index 54c821b..c640979 100644
--- a/src/battlemap/src/View/MessageBoard/Animator/Attack.elm
+++ b/src/battlemap/src/View/MessageBoard/Animator/Attack.elm
@@ -12,8 +12,6 @@ import Struct.Character
import Struct.Event
import Struct.Model
-import Util.Html
-
import View.Controlled.CharacterCard
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
@@ -45,6 +43,15 @@ get_effect_text attack =
)
)
+get_empty_attack_html : (Html.Html Struct.Event.Type)
+get_empty_attack_html =
+ (Html.div
+ [
+ (Html.Attributes.class "battlemap-message-attack-text")
+ ]
+ []
+ )
+
get_attack_html : (
Struct.Character.Type ->
Struct.Character.Type ->
@@ -56,43 +63,45 @@ get_attack_html attacker defender attack =
attacker_name = (Struct.Character.get_name attacker)
defender_name = (Struct.Character.get_name defender)
in
- (Html.div
- []
- [
- (Html.text
- (
- case (attack.order, attack.parried) of
- (Struct.Attack.Counter, True) ->
- (
- defender_name
- ++ " attempted to strike back, but "
- ++ attacker_name
- ++ " parried, and "
- ++ (get_effect_text attack)
- )
+ (Html.div
+ [
+ (Html.Attributes.class "battlemap-message-attack-text")
+ ]
+ [
+ (Html.text
+ (
+ case (attack.order, attack.parried) of
+ (Struct.Attack.Counter, True) ->
+ (
+ defender_name
+ ++ " attempted to strike back, but "
+ ++ attacker_name
+ ++ " parried, and "
+ ++ (get_effect_text attack)
+ )
- (Struct.Attack.Counter, _) ->
- (
- defender_name
- ++ " striked back, and "
- ++ (get_effect_text attack)
- )
+ (Struct.Attack.Counter, _) ->
+ (
+ defender_name
+ ++ " striked back, and "
+ ++ (get_effect_text attack)
+ )
- (_, True) ->
- (
- attacker_name
- ++ " attempted a hit, but "
- ++ defender_name
- ++ " parried, and "
- ++ (get_effect_text attack)
- )
+ (_, True) ->
+ (
+ attacker_name
+ ++ " attempted a hit, but "
+ ++ defender_name
+ ++ " parried, and "
+ ++ (get_effect_text attack)
+ )
- (_, _) ->
- (attacker_name ++ " " ++ (get_effect_text attack))
+ (_, _) ->
+ (attacker_name ++ " " ++ (get_effect_text attack))
+ )
)
- )
- ]
- )
+ ]
+ )
get_attack_animation_class : (
Struct.Attack.Type ->
@@ -150,7 +159,7 @@ get_attacker_card maybe_attack char =
else
[
(Html.Attributes.class "battlemap-animated-portrait-absent"),
- (Html.Attributes.class "battlemap-animated-portrait")
+ (Html.Attributes.class "battlemap-animated-portrait")
]
(Just attack) ->
@@ -246,7 +255,8 @@ get_placeholder_html characters attacker_ix defender_ix maybe_attack =
((Just atkchar), (Just defchar)) ->
(Html.div
[
- (Html.Attributes.class "battlemap-help")
+ (Html.Attributes.class "battlemap-message-board"),
+ (Html.Attributes.class "battlemap-message-attack")
]
(
[
@@ -257,7 +267,7 @@ get_placeholder_html characters attacker_ix defender_ix maybe_attack =
(get_attack_html atkchar defchar attack)
Nothing ->
- (Util.Html.nothing)
+ (get_empty_attack_html)
),
(get_defender_card maybe_attack defchar)
]
diff --git a/src/battlemap/src/View/MessageBoard/Error.elm b/src/battlemap/src/View/MessageBoard/Error.elm
index d1d9072..642634a 100644
--- a/src/battlemap/src/View/MessageBoard/Error.elm
+++ b/src/battlemap/src/View/MessageBoard/Error.elm
@@ -24,7 +24,7 @@ get_html : (
get_html model error =
(Html.div
[
- (Html.Attributes.class "battlemap-help"),
+ (Html.Attributes.class "battlemap-message-board"),
(Html.Attributes.class "battlemap-error")
]
[
diff --git a/src/battlemap/src/View/MessageBoard/Help.elm b/src/battlemap/src/View/MessageBoard/Help.elm
index 8b6ff41..8253c61 100644
--- a/src/battlemap/src/View/MessageBoard/Help.elm
+++ b/src/battlemap/src/View/MessageBoard/Help.elm
@@ -66,7 +66,7 @@ get_html : Struct.Model.Type -> (Html.Html Struct.Event.Type)
get_html model =
(Html.div
[
- (Html.Attributes.class "battlemap-help")
+ (Html.Attributes.class "battlemap-message-board")
]
(get_help_message model)
)
diff --git a/src/battlemap/www/style.css b/src/battlemap/www/style.css
index 2688bdd..358c261 100644
--- a/src/battlemap/www/style.css
+++ b/src/battlemap/www/style.css
@@ -31,7 +31,7 @@
margin: 0 1em 0 1em;
}
-.battlemap-help
+.battlemap-message-board
{
grid-column: col 1 / span 3;
grid-row: row 3;
@@ -50,11 +50,6 @@
justify-content: space-between;
}
-.battlemap-help .battlemap-character-card
-{
- width: 30%;
-}
-
.battlemap-container
{
grid-column: col 2;
@@ -108,70 +103,23 @@
}
/******************************************************************************/
-/** HELP PANEL ****************************************************************/
+/** MESSAGE BOARD *************************************************************/
/******************************************************************************/
.battlemap-error
{
background-color: #550000;
}
-.battlemap-manual-controls
-{
- width: 96px;
- height: 96px;
- display: grid;
- grid-template:
- '. top .'
- 'left go right'
- '. bottom .';
- margin: auto;
-}
-
-.battlemap-manual-controls > div
-{
- width: 32px;
- height: 32px;
- background-image: url(/asset/svg/arrowhead.svg);
- background-size: 100%;
- transition: opacity 0.3s ease-out;
- opacity: 0.5;
-}
-
-.battlemap-manual-controls > div:hover
+.battlemap-message-board .battlemap-character-card
{
- opacity: 1;
+ width: 16em;
}
-.battlemap-manual-controls-go
-{
- margin: auto;
- width: 28px;
- height: 28px;
- border-radius: 100em;
- grid-area: go;
-}
-
-.battlemap-manual-controls-up
-{
- transform: rotate(-90deg);
- grid-area: top;
-}
-
-.battlemap-manual-controls-down
-{
- transform: rotate(90deg);
- grid-area: bottom;
-}
-
-.battlemap-manual-controls-left
-{
- transform: rotate(180deg);
- grid-area: left;
-}
-
-.battlemap-manual-controls-right
+.battlemap-message-attack-text
{
- grid-area: right;
+ width: 100%;
+ text-align: center;
+ font-size: 1.2em;
}
/******************************************************************************/
@@ -186,6 +134,14 @@
justify-content: center;
}
+.battlemap-end-turn-button
+{
+ animation-name: reverse-brown-alarm-bg;
+ animation-duration: 2s;
+ animation-iteration-count: infinite;
+}
+
+/** Character Card ************************************************************/
.battlemap-character-card,
.battlemap-tile-card
{
@@ -206,6 +162,51 @@
margin-top: 0.3em;
}
+.battlemap-character-portrait
+{
+ box-sizing: border-box;
+ border-radius: 5px;
+ background-size: 100% 100%;
+ width: 100px;
+ height: 100px;
+ overflow: hidden;
+}
+
+.battlemap-character-portrait:hover
+{
+ cursor: pointer;
+}
+
+.battlemap-tile-card-icon
+{
+ box-sizing: border-box;
+ border-radius: 5px;
+ background-size: 300% 300%;
+ width: 80px;
+ height: 80px;
+}
+
+.battlemap-character-portrait *
+{
+ box-sizing: border-box;
+ background-size: 100% 100%;
+ width: inherit;
+ height: inherit;
+}
+
+.battlemap-character-portrait-body
+{
+ z-index: 1;
+}
+
+.battlemap-character-portrait-armor
+{
+ position: relative;
+ z-index: 1;
+ top: -100%;
+ background-size: 200% 100%;
+}
+
.battlemap-character-card .battlemap-character-portrait,
.battlemap-tile-card-icon
{
@@ -274,7 +275,7 @@
border-radius: 5px;
z-index: 0;
top: -100%;
- transition: width 1s ease-out;
+ transition: width 3s ease-in-out;
}
.battlemap-character-card-health,
@@ -352,6 +353,66 @@
margin-top: 0.3em;
}
+/** Manual Controls ***********************************************************/
+.battlemap-manual-controls
+{
+ width: 96px;
+ height: 96px;
+ display: grid;
+ grid-template:
+ '. top .'
+ 'left go right'
+ '. bottom .';
+ margin: auto;
+}
+
+.battlemap-manual-controls > div
+{
+ width: 32px;
+ height: 32px;
+ background-image: url(/asset/svg/arrowhead.svg);
+ background-size: 100%;
+ transition: opacity 0.3s ease-out;
+ opacity: 0.5;
+}
+
+.battlemap-manual-controls > div:hover
+{
+ opacity: 1;
+}
+
+.battlemap-manual-controls-go
+{
+ margin: auto;
+ width: 28px;
+ height: 28px;
+ border-radius: 100em;
+ grid-area: go;
+}
+
+.battlemap-manual-controls-up
+{
+ transform: rotate(-90deg);
+ grid-area: top;
+}
+
+.battlemap-manual-controls-down
+{
+ transform: rotate(90deg);
+ grid-area: bottom;
+}
+
+.battlemap-manual-controls-left
+{
+ transform: rotate(180deg);
+ grid-area: left;
+}
+
+.battlemap-manual-controls-right
+{
+ grid-area: right;
+}
+
/******************************************************************************/
/** MAIN MENU *****************************************************************/
/******************************************************************************/
@@ -388,56 +449,7 @@
animation-iteration-count: infinite;
}
-.battlemap-end-turn-button
-{
- animation-name: reverse-brown-alarm-bg;
- animation-duration: 2s;
- animation-iteration-count: infinite;
-}
-
-.battlemap-character-portrait:hover
-{
- cursor: pointer;
-}
-
-.battlemap-character-portrait
-{
- box-sizing: border-box;
- border-radius: 5px;
- background-size: 100% 100%;
- width: 100px;
- height: 100px;
-}
-
-.battlemap-tile-card-icon
-{
- box-sizing: border-box;
- border-radius: 5px;
- background-size: 300% 300%;
- width: 80px;
- height: 80px;
-}
-
-.battlemap-character-portrait *
-{
- box-sizing: border-box;
- background-size: 100% 100%;
- width: inherit;
- height: inherit;
-}
-.battlemap-character-portrait-body
-{
- z-index: 1;
-}
-
-.battlemap-character-portrait-armor
-{
- position: relative;
- z-index: 1;
- top: -100%;
- background-size: 200% 100%;
-}
.battlemap-timeline-element,
.battlemap-characters-element
@@ -557,6 +569,7 @@
transform: scale(-1, 1);
}
+/** Navigator Markers *********************************************************/
.battlemap-marker-icon.battlemap-navigator-non-interactive
{
box-sizing: border-box;
@@ -679,7 +692,7 @@
}
.battlemap-can-attack-can-defend-marker.battlemap-navigator-non-interactive,
-.battlemap-can-attack-cant-defend-marker..battlemap-navigator-non-interactive
+.battlemap-can-attack-cant-defend-marker.battlemap-navigator-non-interactive
{
z-index: 5;
}
@@ -707,101 +720,116 @@
filter: contrast(35%);
}
-.battlemap-animated-character-icon
+
+/**** Selection Classes *******************************************************/
+.battlemap-character-targeted
{
- transition: top linear 0.3s, left linear 0.3s;
+ background-color: rgba(255,0,0,0.7);
+ animation-name: red-alarm-bg;
+ animation-duration: 5s;
+ animation-iteration-count: infinite;
}
-.battlemap-animated-portrait-damaged .battlemap-character-portrait > *
+.battlemap-character-selected
{
- animation: blinking 0.2s steps(2, start) 8;
+ animation-name: strongly-pulsating;
+ animation-duration: 1.5s;
+ animation-iteration-count: infinite;
}
-.battlemap-animated-portrait-absent .battlemap-character-portrait > *
+/**** Path Icons **************************************************************/
+.battlemap-path-icon
{
- visibility: hidden;
+ background-image: url("/asset/svg/arrows.svg");
+ background-size: 96px 32px;
}
-.battlemap-animated-portrait-dodges .battlemap-character-portrait,
-.battlemap-animated-portrait-dies .battlemap-character-portrait,
-.battlemap-animated-portrait-parries .battlemap-character-portrait,
-.battlemap-animated-portrait-attacks .battlemap-character-portrait
+.battlemap-path-icon-UR,
+.battlemap-path-icon-LD,
+.battlemap-path-icon-RD,
+.battlemap-path-icon-UL,
+.battlemap-path-icon-LU,
+.battlemap-path-icon-DR,
+.battlemap-path-icon-DL,
+.battlemap-path-icon-RU
{
- overflow: hidden;
+ /*** Default is -^ ***/
+ background-position: 64px 0;
}
+/*** DL/RU ***/
-.battlemap-animated-portrait
+.battlemap-path-icon-LU,
+.battlemap-path-icon-DR
{
- width: 100%;
- height: 100%;
+ transform: rotate(90deg);
}
-.battlemap-animated-portrait-dodges .battlemap-character-portrait > *
+.battlemap-path-icon-RD,
+.battlemap-path-icon-UL
{
- animation-name: dodges;
- animation-duration: 1s;
- animation-iteration-count: 1;
+ /*** ***/
+ transform: scale(1, -1);
}
-.battlemap-animated-portrait-attacks .battlemap-character-portrait > *
+.battlemap-path-icon-UR,
+.battlemap-path-icon-LD
{
- animation-name: attacks;
- animation-duration: 1s;
- animation-iteration-count: 1;
+ /*** <| ***/
+ transform: rotate(180deg);
}
-.battlemap-animated-portrait-dies .battlemap-character-portrait > *
+.battlemap-path-icon-RR,
+.battlemap-path-icon-LR,
+.battlemap-path-icon-RL,
+.battlemap-path-icon-LL
{
- animation-name: blinking, dies;
- animation-duration: 1s, 2s;
- animation-delay: 0s, 1s;
- animation-iteration-count: 1, 1;
- animation-fill: default, forwards;
+ background-position: 0 0;
}
-.battlemap-animated-portrait-parries .battlemap-character-portrait > *
+.battlemap-path-icon-markN,
+.battlemap-path-icon-NU,
+.battlemap-path-icon-ND,
+.battlemap-path-icon-NL,
+.battlemap-path-icon-NR
{
- animation-name: parries;
- animation-duration: 1s;
- animation-iteration-count: 1;
+ display: none;
}
-.battlemap-animation-move-1
-.battlemap-animation-move-R,
-.battlemap-animation-move-L,
-.battlemap-animation-move-U,
-.battlemap-animation-move-D
+.battlemap-path-icon-UU,
+.battlemap-path-icon-UD,
+.battlemap-path-icon-DU,
+.battlemap-path-icon-DD
{
- animation-duration: 0.3s;
- animation-iteration-count: 1;
- animation-fill-mode: forwards;
+ background-position: 0 0;
+ transform: rotate(90deg);
}
-.battlemap-animation-move-R { animation-name: move-right; }
-.battlemap-animation-move-L { animation-name: move-left; }
-.battlemap-animation-move-U { animation-name: move-up; }
-.battlemap-animation-move-D { animation-name: move-down; }
-
-@keyframes move-right {
- from { transform: translate(0, 0);}
- to { transform: translate(100%, 0);}
+.battlemap-path-icon-markR,
+.battlemap-path-icon-markL,
+.battlemap-path-icon-markU,
+.battlemap-path-icon-markD
+{
+ background-position: 32px 0;
}
-@keyframes move-left {
- from { transform: translate(0, 0);}
- to { transform: translate(-100%, 0);}
+.battlemap-path-icon-markL
+{
+ transform: rotate(180deg);
}
-@keyframes move-up {
- from { transform: translate(0, 0);}
- to { transform: translate(0, -100%);}
+.battlemap-path-icon-markD
+{
+ transform: rotate(90deg);
}
-@keyframes move-down {
- from { transform: translate(0, 0);}
- to { transform: translate(0, 100%);}
+.battlemap-path-icon-markU
+{
+ transform: rotate(-90deg);
}
+/******************************************************************************/
+/** Animations ****************************************************************/
+/******************************************************************************/
@keyframes red-alarm-bg {
0% {background-color: rgba(255,0,0,0.25);}
25% {background-color: rgba(255,0,0,1);}
@@ -809,12 +837,6 @@
100% {background-color: rgba(255,0,0,0.25);}
}
-@keyframes flickering-opacity {
- 0% { opacity: 1.0;}
- 50% { opacity: 0.7; }
- 100% { opacity: 1.0; }
-}
-
@keyframes pulsating {
0% { opacity: 1.0; transform: scale(1);}
25% { opacity: 1.0; transform: scale(1);}
@@ -853,6 +875,11 @@
to { visibility: hidden; }
}
+@keyframes blinking2 {
+ from { opacity: 1; }
+ to { opacity: 0; }
+}
+
@keyframes dodges {
0% { transform: translate(0, 0); }
50% { transform: translate(-75%, 0); }
@@ -873,8 +900,8 @@
}
@keyframes dies {
- from { transform: translate(0, 0); }
- to { transform: translate(0, 100%); }
+ from { transform: translate(0, 0) rotate(0); }
+ to { transform: translate(0, 100%) rotate(25deg); }
}
@keyframes blue-alarm-bd {
@@ -883,118 +910,63 @@
100% {border-color: rgba(0,0,255,0.25);}
}
-.battlemap-character-targeted
-{
- background-color: rgba(255,0,0,0.7);
- animation-name: red-alarm-bg;
- animation-duration: 5s;
- animation-iteration-count: infinite;
-}
-
-.battlemap-character-selected
-{
- animation-name: strongly-pulsating;
- animation-duration: 1.5s;
- animation-iteration-count: infinite;
-}
-
-.battlemap-tile-selected
-{
- box-sizing: border-box;
- border-size: 2px solid;
- border-color: rgba(0,0,255,0.7);
- animation-name: blue-alarm-bg;
- animation-duration: 2s;
- animation-iteration-count: infinite;
-}
-
-
-/**** Path Icons **************************************************************/
-.battlemap-path-icon
-{
- background-image: url("/asset/svg/arrows.svg");
- background-size: 96px 32px;
-}
-
-.battlemap-path-icon-UR,
-.battlemap-path-icon-LD,
-.battlemap-path-icon-RD,
-.battlemap-path-icon-UL,
-.battlemap-path-icon-LU,
-.battlemap-path-icon-DR,
-.battlemap-path-icon-DL,
-.battlemap-path-icon-RU
-{
- /*** Default is -^ ***/
- background-position: 64px 0;
-}
-/*** DL/RU ***/
-
-.battlemap-path-icon-LU,
-.battlemap-path-icon-DR
-{
- transform: rotate(90deg);
-}
-
-.battlemap-path-icon-RD,
-.battlemap-path-icon-UL
+/******************************************************************************/
+/** Timeline Animations *******************************************************/
+/******************************************************************************/
+/**** Character Icon Animations ***********************************************/
+.battlemap-animated-character-icon
{
- /*** ***/
- transform: scale(1, -1);
+ transition: top linear 0.3s, left linear 0.3s;
}
-.battlemap-path-icon-UR,
-.battlemap-path-icon-LD
+/**** Character Portrait Animations *******************************************/
+.battlemap-animated-portrait-damaged .battlemap-character-portrait > *
{
- /*** <| ***/
- transform: rotate(180deg);
+ animation: blinking 0.2s steps(2, start) 8;
}
-.battlemap-path-icon-RR,
-.battlemap-path-icon-LR,
-.battlemap-path-icon-RL,
-.battlemap-path-icon-LL
+.battlemap-animated-portrait-absent .battlemap-character-portrait > *
{
- background-position: 0 0;
+ visibility: hidden;
}
-.battlemap-path-icon-markN,
-.battlemap-path-icon-NU,
-.battlemap-path-icon-ND,
-.battlemap-path-icon-NL,
-.battlemap-path-icon-NR
+.battlemap-animated-portrait-dodges .battlemap-character-portrait,
+.battlemap-animated-portrait-dies .battlemap-character-portrait,
+.battlemap-animated-portrait-parries .battlemap-character-portrait,
+.battlemap-animated-portrait-attacks .battlemap-character-portrait
{
- display: none;
+ overflow: hidden;
}
-.battlemap-path-icon-UU,
-.battlemap-path-icon-UD,
-.battlemap-path-icon-DU,
-.battlemap-path-icon-DD
+.battlemap-animated-portrait
{
- background-position: 0 0;
- transform: rotate(90deg);
}
-.battlemap-path-icon-markR,
-.battlemap-path-icon-markL,
-.battlemap-path-icon-markU,
-.battlemap-path-icon-markD
+.battlemap-animated-portrait-dodges .battlemap-character-portrait > *
{
- background-position: 32px 0;
+ animation-name: dodges;
+ animation-duration: 1s;
+ animation-iteration-count: 1;
}
-.battlemap-path-icon-markL
+.battlemap-animated-portrait-attacks .battlemap-character-portrait > *
{
- transform: rotate(180deg);
+ animation-name: attacks;
+ animation-duration: 1s;
+ animation-iteration-count: 1;
}
-.battlemap-path-icon-markD
+.battlemap-animated-portrait-dies .battlemap-character-portrait > *
{
- transform: rotate(90deg);
+ animation-name: blinking2, dies;
+ animation-duration: 0.15s, 2s;
+ animation-delay: 0s, 1s;
+ animation-iteration-count: 8, 1;
}
-.battlemap-path-icon-markU
+.battlemap-animated-portrait-parries .battlemap-character-portrait > *
{
- transform: rotate(-90deg);
+ animation-name: parries;
+ animation-duration: 1s;
+ animation-iteration-count: 1;
}
diff --git a/src/global/www/style.css b/src/global/www/style.css
index 7782f05..7fbdf0d 100644
--- a/src/global/www/style.css
+++ b/src/global/www/style.css
@@ -7,6 +7,12 @@ html
color: #FFEEAA;
}
+html, body, .fullscreen-module
+{
+ min-width: 800px;
+ min-height: 600px;
+}
+
* {
color: #FFEEAA;
text-shadow: