From f7c53eb60d2cba92a9da97dc1a09f574e0f91fbb Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Sat, 14 Sep 2019 13:00:05 +0200 Subject: Display proper color when attribute is negative. It still does not check if things are okay when using the other weapon, though. --- src/css/src/roster-editor/controlled-panel.scss | 4 +--- src/roster-editor/src/View/CharacterCard.elm | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/css/src/roster-editor/controlled-panel.scss b/src/css/src/roster-editor/controlled-panel.scss index c1480ce..bd7667c 100644 --- a/src/css/src/roster-editor/controlled-panel.scss +++ b/src/css/src/roster-editor/controlled-panel.scss @@ -25,13 +25,11 @@ } -.roster-editor-atts .omnimod-negative-value, +.roster-editor-character-attributes .omnimod-negative-value, .roster-editor-invalid-glyph { background-color: $RED-2; - border-radius: 6px; border: solid 1px $RED-0; - padding: 2px; } .roster-editor-atts > * diff --git a/src/roster-editor/src/View/CharacterCard.elm b/src/roster-editor/src/View/CharacterCard.elm index ef211e9..7dd9f7c 100644 --- a/src/roster-editor/src/View/CharacterCard.elm +++ b/src/roster-editor/src/View/CharacterCard.elm @@ -435,14 +435,21 @@ get_full_html current_tab char = ) (BattleCharacters.Struct.Equipment.get_glyph_board equipment) ), - (Battle.View.Omnimods.get_unsigned_html - (Battle.Struct.Omnimods.apply_damage_modifier - (Battle.Struct.Omnimods.get_attribute_mod - Battle.Struct.Attributes.DamageModifier - omnimods + (Html.div + [ + (Html.Attributes.class "roster-editor-character-attributes") + ] + [ + (Battle.View.Omnimods.get_unsigned_html + (Battle.Struct.Omnimods.apply_damage_modifier + (Battle.Struct.Omnimods.get_attribute_mod + Battle.Struct.Attributes.DamageModifier + omnimods + ) + omnimods + ) ) - omnimods - ) + ] ) ] ) -- cgit v1.2.3-70-g09d2