summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2019-09-13 14:28:50 +0200 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2019-09-13 14:28:50 +0200 |
commit | b0eca141eb88866b09df80c199d8731b6d97ac8b (patch) | |
tree | 2480fcbcdf7f9540774b0ee0ecde199a531ee9a7 | |
parent | e0844c02544ade4b383e707151bda654d7b7af3d (diff) |
More successful attempt at improving omnimods UI.
-rw-r--r-- | src/css/src/roster-editor/constants.scss | 2 | ||||
-rw-r--r-- | src/css/src/shared/battle-view.scss | 6 | ||||
-rw-r--r-- | src/css/src/shared/omnimod-icons.scss | 53 | ||||
-rw-r--r-- | src/css/src/shared/parameters.scss | 4 | ||||
-rw-r--r-- | src/roster-editor/src/View/CharacterCard.elm | 55 | ||||
-rw-r--r-- | src/shared/battle/Battle/View/Attribute.elm | 40 | ||||
-rw-r--r-- | src/shared/battle/Battle/View/DamageType.elm | 40 | ||||
-rw-r--r-- | src/shared/battle/Battle/View/Omnimods.elm | 4 |
8 files changed, 73 insertions, 131 deletions
diff --git a/src/css/src/roster-editor/constants.scss b/src/css/src/roster-editor/constants.scss index 8ce7828..8f77b47 100644 --- a/src/css/src/roster-editor/constants.scss +++ b/src/css/src/roster-editor/constants.scss @@ -1,5 +1,5 @@ @import '../shared/battle-view/constants'; -$CONTROLLED-MENU-WIDTH: 15em; +$CONTROLLED-MENU-WIDTH: 18em; $NEXT-TO-CONTROLLED-MENU: $CONTROLLED-MENU-WIDTH + $MENU-EXTRA; diff --git a/src/css/src/shared/battle-view.scss b/src/css/src/shared/battle-view.scss index 979740f..c1cbf7b 100644 --- a/src/css/src/shared/battle-view.scss +++ b/src/css/src/shared/battle-view.scss @@ -1,14 +1,10 @@ @import 'colors'; @import 'shadows'; -* +body { color: $GOLD-0; @include text-shadow(1px, $BROWN-0, 0.5); -} - -body -{ background-color: $BROWN-2; } diff --git a/src/css/src/shared/omnimod-icons.scss b/src/css/src/shared/omnimod-icons.scss index 32835dc..726361c 100644 --- a/src/css/src/shared/omnimod-icons.scss +++ b/src/css/src/shared/omnimod-icons.scss @@ -1,3 +1,5 @@ +@import 'colors'; + .omnimod-icon { display: inline-block; @@ -9,6 +11,19 @@ background-position: center; } +.omnimod-attack-mods .omnimod-icon, +.omnimod-defense-mods .omnimod-icon, +.omnimod-attribute-mods .omnimod-icon +{ + background-size: 2em; + background-position: 3.1em; +} + +.omnimod-value +{ + display: inline-block; +} + .omnimod-icon-dmg, .omnimod-icon-dmgm { @@ -40,13 +55,18 @@ background-image: url(/asset/svg/damage_type/piercing.svg); } +.omnimod-defense-mods +{ + background-size: 1.5em, 2em; + background-position: 3.4em, 3.1em; +} + .omnimod-defense-mods .omnimod-icon-slh { background-image: url(/asset/svg/damage_type/slash.svg), url(/asset/svg/damage_type/shield.svg) ; - background-size: 1em, 1.5em; } .omnimod-defense-mods .omnimod-icon-blu @@ -55,7 +75,6 @@ url(/asset/svg/damage_type/impact.svg), url(/asset/svg/damage_type/shield.svg) ; - background-size: 1em, 1.5em; } .omnimod-defense-mods .omnimod-icon-pie @@ -64,16 +83,6 @@ url(/asset/svg/damage_type/piercing.svg), url(/asset/svg/damage_type/shield.svg) ; - background-size: 1em, 1.5em; -} - -.omnimod-defense-mods .omnimod-icon-bse -{ - background-image: - url(/asset/svg/damage_type/base.svg), - url(/asset/svg/damage_type/shield.svg) - ; - background-size: 1em, 1.5em; } .omnimod-icon-dodg @@ -153,11 +162,25 @@ .omnimod-attack-mods, .omnimod-defense-mods, -.omnimod-attribute-mods, +.omnimod-attribute-mods +{ + display: block; +} + .omnimod-attack-mods > *, .omnimod-defense-mods > *, .omnimod-attribute-mods > * { - display: flex; - flex-wrap: wrap; + display: inline-block; + background-color: $GLAUQUE-3; + color: $GLAUQUE-0; + line-height: 1.5em; + border-radius: 6px; + border: solid 1px $GLAUQUE-2; + text-shadow: none; + padding: 2px; + padding-right: 1.7em; + text-align: center; + margin: 1px; + width: 5em; } diff --git a/src/css/src/shared/parameters.scss b/src/css/src/shared/parameters.scss index 908d739..10f8a5b 100644 --- a/src/css/src/shared/parameters.scss +++ b/src/css/src/shared/parameters.scss @@ -1,2 +1,2 @@ -$MIN-PAGE-WIDTH: 800px; -$MIN-PAGE-HEIGHT: 600px; +$MIN-PAGE-WIDTH: 1024px; +$MIN-PAGE-HEIGHT: 768px; diff --git a/src/roster-editor/src/View/CharacterCard.elm b/src/roster-editor/src/View/CharacterCard.elm index e462de9..0dc8c4c 100644 --- a/src/roster-editor/src/View/CharacterCard.elm +++ b/src/roster-editor/src/View/CharacterCard.elm @@ -345,59 +345,6 @@ get_glyph_board_details has_no_invalid_glyphs board = ] ) -get_relevant_atts : ( - Battle.Struct.Omnimods.Type -> - Battle.Struct.Attributes.Type -> - (Html.Html Struct.Event.Type) - ) -get_relevant_atts omnimods atts = - (Html.div - [ - (Html.Attributes.class "character-card-atts"), - (Html.Attributes.class "roster-editor-atts") - ] - [ - ( - let - damage_multiplier = - (Battle.Struct.Attributes.get_damage_multiplier atts) - in - (Html.div - [ - (Html.Attributes.class "omnimod-attack-mods") - ] - (List.map - ( - \(s, i) -> - (get_mod_html - ( - s, - (ceiling ((toFloat i) * damage_multiplier)) - ) - ) - ) - (Battle.Struct.Omnimods.get_attack_mods omnimods) - ) - ) - ), - (Html.div - [ - (Html.Attributes.class "omnimod-defense-mods") - ] - (List.map - (get_mod_html) - (Battle.Struct.Omnimods.get_defense_mods omnimods) - ) - ), - (Html.div - [ - (Html.Attributes.class "character-card-actual-attributes") - ] - (Battle.View.Attribute.get_true_all_html atts) - ) - ] - ) - -------------------------------------------------------------------------------- -- EXPORTED -------------------------------------------------------------------- -------------------------------------------------------------------------------- @@ -520,6 +467,6 @@ get_full_html current_tab char = ) (BattleCharacters.Struct.Equipment.get_glyph_board equipment) ), - (get_relevant_atts omnimods char_attributes) + (Battle.View.Omnimods.get_user_friendly_html omnimods) ] ) diff --git a/src/shared/battle/Battle/View/Attribute.elm b/src/shared/battle/Battle/View/Attribute.elm index 9b2a8c7..80e75f1 100644 --- a/src/shared/battle/Battle/View/Attribute.elm +++ b/src/shared/battle/Battle/View/Attribute.elm @@ -50,24 +50,18 @@ get_html attribute value = then "omnimod-positive-value" else "omnimod-nil-value" ) + ), + (Html.Attributes.class "omnimod-icon"), + (Html.Attributes.class + ( + "omnimod-icon-" + ++ (Battle.Struct.Attributes.encode_category attribute) + ) ) ] [ (Html.div [ - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.Attributes.encode_category attribute) - ) - ) - ] - [ - ] - ), - (Html.div - [ (Html.Attributes.class "omnimod-value") ] [ @@ -100,24 +94,18 @@ get_signed_html attribute value = (Struct.Event.RequestedHelp (Struct.HelpRequest.Attribute attribute) ) + ), + (Html.Attributes.class "omnimod-icon"), + (Html.Attributes.class + ( + "omnimod-icon-" + ++ (Battle.Struct.Attributes.encode_category attribute) + ) ) ] [ (Html.div [ - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.Attributes.encode_category attribute) - ) - ) - ] - [ - ] - ), - (Html.div - [ (Html.Attributes.class "omnimod-value") ] [ diff --git a/src/shared/battle/Battle/View/DamageType.elm b/src/shared/battle/Battle/View/DamageType.elm index eee2838..1302407 100644 --- a/src/shared/battle/Battle/View/DamageType.elm +++ b/src/shared/battle/Battle/View/DamageType.elm @@ -37,24 +37,18 @@ get_html damage_type value = (Struct.Event.RequestedHelp (Struct.HelpRequest.DamageType damage_type) ) + ), + (Html.Attributes.class "omnimod-icon"), + (Html.Attributes.class + ( + "omnimod-icon-" + ++ (Battle.Struct.DamageType.encode damage_type) + ) ) ] [ (Html.div [ - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.DamageType.encode damage_type) - ) - ) - ] - [ - ] - ), - (Html.div - [ (Html.Attributes.class "omnimod-value") ] [ @@ -81,24 +75,18 @@ get_signed_html damage_type value = (Struct.Event.RequestedHelp (Struct.HelpRequest.DamageType damage_type) ) + ), + (Html.Attributes.class "omnimod-icon"), + (Html.Attributes.class + ( + "omnimod-icon-" + ++ (Battle.Struct.DamageType.encode damage_type) + ) ) ] [ (Html.div [ - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.DamageType.encode damage_type) - ) - ) - ] - [ - ] - ), - (Html.div - [ (Html.Attributes.class "omnimod-value") ] [ diff --git a/src/shared/battle/Battle/View/Omnimods.elm b/src/shared/battle/Battle/View/Omnimods.elm index b914bca..14da8ed 100644 --- a/src/shared/battle/Battle/View/Omnimods.elm +++ b/src/shared/battle/Battle/View/Omnimods.elm @@ -123,7 +123,7 @@ get_html omnimods = ), (Html.div [ - (Html.Attributes.class "omnimod-attributes-mods") + (Html.Attributes.class "omnimod-attribute-mods") ] (List.map (\(k, v) -> @@ -193,7 +193,7 @@ get_user_friendly_html omnimods = ), (Html.div [ - (Html.Attributes.class "omnimod-attributes-mods") + (Html.Attributes.class "omnimod-attribute-mods") ] (List.map (\(k, v) -> |