diff --git a/out/main.js b/out/main.js index 0f27e96f8a69152605f05939171a1ee795173423..204d4ec3f98cd8d5d0bf2bef7f6bf93fe3bd9b99 100644 --- a/out/main.js +++ b/out/main.js @@ -7793,6 +7793,7 @@ var $elm$core$List$take = F2( function (n, list) { return A3($elm$core$List$takeFast, 0, n, list); }); +var $elm$core$String$toUpper = _String_toUpper; var $elm$core$Maybe$withDefault = F2( function (_default, maybe) { if (maybe.$ === 'Just') { @@ -7807,7 +7808,10 @@ var $author$project$FightingTool$setDice = function (set) { A2( $elm$core$List$take, 1, - A2($elm$core$String$split, 'W', set)), + A2( + $elm$core$String$split, + 'W', + $elm$core$String$toUpper(set))), A2( $elm$core$String$split, '+', @@ -7818,7 +7822,10 @@ var $author$project$FightingTool$setDice = function (set) { A2( $elm$core$List$drop, 1, - A2($elm$core$String$split, 'W', set)))))); + A2( + $elm$core$String$split, + 'W', + $elm$core$String$toUpper(set))))))); }; var $rundis$elm_bootstrap$Bootstrap$Modal$Show = {$: 'Show'}; var $rundis$elm_bootstrap$Bootstrap$Modal$shown = $rundis$elm_bootstrap$Bootstrap$Modal$Show; @@ -10534,8 +10541,7 @@ var $author$project$FightingTool$viewAttackModal = function (model) { $rundis$elm_bootstrap$Bootstrap$Form$Input$text( _List_fromArray( [ - $rundis$elm_bootstrap$Bootstrap$Form$Input$value(model.dice), - $rundis$elm_bootstrap$Bootstrap$Form$Input$placeholder('1W6+0'), + $rundis$elm_bootstrap$Bootstrap$Form$Input$placeholder(model.dice), $rundis$elm_bootstrap$Bootstrap$Form$Input$onInput($author$project$Model$ChangeTmpDice) ])), A2( @@ -10544,7 +10550,10 @@ var $author$project$FightingTool$viewAttackModal = function (model) { [ $elm$html$Html$Attributes$class('metalButton'), $elm$html$Html$Events$onClick( - $author$project$Model$DiceAndSlice(model.tmpdice)) + $author$project$Model$DiceAndSlice(model.tmpdice)), + A2($elm$html$Html$Attributes$style, 'width', '100%'), + A2($elm$html$Html$Attributes$style, 'margin-top', '2%'), + A2($elm$html$Html$Attributes$style, 'margin-bottom', '2%') ]), _List_fromArray( [ diff --git a/src/FightingTool.elm b/src/FightingTool.elm index 368f0a3407b07b7f81cd89c2b08644e8842dcffa..f2bff73d6c56a23896e11ac42d267e01dd469eec 100644 --- a/src/FightingTool.elm +++ b/src/FightingTool.elm @@ -101,13 +101,15 @@ viewAttackModal model = ] |> Modal.body [class "body"] [ Input.text - [ Input.value model.dice - , Input.placeholder "1W6+0" + [ Input.placeholder model.dice , Input.onInput ChangeTmpDice ] , Html.button [ class "metalButton" , onClick (DiceAndSlice model.tmpdice) + , style "width" "100%" + , style "margin-top" "2%" + , style "margin-bottom" "2%" ] [ text "Schaden würfeln" ] , Input.number [ insideInput @@ -256,7 +258,7 @@ attack model id damage = setDice : String -> List String setDice set = - List.take 1 (String.split "W" set) ++ String.split "+" (Maybe.withDefault "6+0" <| List.head (List.drop 1 (String.split "W" set))) + List.take 1 (String.split "W" <| String.toUpper set) ++ String.split "+" (Maybe.withDefault "6+0" <| List.head (List.drop 1 (String.split "W" <| String.toUpper set))) damageCalc : (List Int) -> Int -> Int damageCalc randValues bd =