Minor tweaks to docs
This commit is contained in:
parent
c18bebe223
commit
8ff581471e
5 changed files with 26 additions and 31 deletions
|
@ -21,7 +21,7 @@ which provides aesthetically reasonable defaults for colors. Each color also
|
|||
comes with a light and dark version.
|
||||
|
||||
### Standard
|
||||
@docs red, orange, yellow, green, blue, purple, brown, black, white
|
||||
@docs red, orange, yellow, green, blue, purple, brown
|
||||
|
||||
### Light
|
||||
@docs lightRed, lightOrange, lightYellow, lightGreen, lightBlue, lightPurple,
|
||||
|
@ -31,14 +31,14 @@ comes with a light and dark version.
|
|||
@docs darkRed, darkOrange, darkYellow, darkGreen, darkBlue, darkPurple,
|
||||
darkBrown
|
||||
|
||||
### Grays
|
||||
These six colors are a compatible series of shades of gray. White and black are
|
||||
listed above.
|
||||
@docs lightGray, gray, darkGray, lightCharcoal, charcoal, darkCharcoal
|
||||
### Eight Shades of Grey
|
||||
These colors are a compatible series of shades of grey, fitting nicely
|
||||
with the Tango palette.
|
||||
@docs white, lightGrey, grey, darkGrey, lightCharcoal, charcoal, darkCharcoal, black
|
||||
|
||||
#### Greys
|
||||
These are identical to the *gray* versions.
|
||||
@docs lightGrey, grey, darkGrey
|
||||
These are identical to the *grey* versions. It seems the spelling is regional, but
|
||||
that has never helped me remember which one I should be writing.
|
||||
@docs lightGray, gray, darkGray
|
||||
|
||||
-}
|
||||
|
||||
|
|
|
@ -11,8 +11,6 @@ integration.
|
|||
# JavaScript from Elm
|
||||
@docs fromString, fromInt, fromFloat, fromBool fromList
|
||||
|
||||
-}
|
||||
{-
|
||||
# DOM Nodes and Elements
|
||||
@docs toElement, fromElement
|
||||
-}
|
||||
|
@ -27,7 +25,7 @@ data JSArray a = JSArray a
|
|||
data JSDomNode = JSDomNode
|
||||
data JSObject = JSObject
|
||||
|
||||
-- Requires that the input array be uniform (all members have the same type)
|
||||
{-| Requires that the input array be uniform (all members have the same type) -}
|
||||
toList : JSArray a -> [a]
|
||||
toList = Native.JavaScript.toList
|
||||
|
||||
|
@ -44,7 +42,7 @@ toString : JSString -> String
|
|||
toString = Native.JavaScript.toString
|
||||
|
||||
|
||||
-- Produces a uniform JavaScript array with all members of the same type.
|
||||
{-| Produces a uniform JavaScript array with all members of the same type. -}
|
||||
fromList : [a] -> JSArray a
|
||||
fromList = Native.JavaScript.fromList
|
||||
|
||||
|
@ -60,7 +58,6 @@ fromBool = Native.JavaScript.fromBool
|
|||
fromString : String -> JSString
|
||||
fromString = Native.JavaScript.fromString
|
||||
|
||||
{--
|
||||
{-| Turn an `Element` into a DOM node. -}
|
||||
fromElement : Element -> JSDomNode
|
||||
fromElement = Native.JavaScript.fromElement
|
||||
|
@ -69,4 +66,3 @@ fromElement = Native.JavaScript.fromElement
|
|||
using the normal `width` and `height` functions. -}
|
||||
toElement : Int -> Int -> JSDomNode -> Element
|
||||
toElement = Native.JavaScript.toElement
|
||||
--}
|
||||
|
|
|
@ -22,13 +22,13 @@ import Native.Keyboard
|
|||
{-| Type alias to make it clearer what integers are supposed to represent
|
||||
in this library. Use [`Char.toCode`](docs/Char.elm#toCode) and
|
||||
[`Char.fromCode`](/docs/Char.elm#fromCode) to convert key codes to characters.
|
||||
Use the uppercase character with `toCode`. -}
|
||||
Use the uppercase character with `toCode`.
|
||||
-}
|
||||
type KeyCode = Int
|
||||
|
||||
{-| Custom key directions to support different locales. The order is up, down,
|
||||
left, right. -}
|
||||
-- The plan is to have a locale independent version of this function
|
||||
-- that uses the physical location of keys, but I don't know how to do it.
|
||||
left, right.
|
||||
-}
|
||||
directions : KeyCode -> KeyCode -> KeyCode -> KeyCode -> Signal { x:Int, y:Int }
|
||||
directions = Native.Keyboard.directions
|
||||
|
||||
|
@ -43,7 +43,8 @@ arrows : Signal { x:Int, y:Int }
|
|||
arrows = directions 38 40 37 39
|
||||
|
||||
{-| Just like the arrows signal, but this uses keys w, a, s, and d,
|
||||
which are common controls for many computer games. -}
|
||||
which are common controls for many computer games.
|
||||
-}
|
||||
wasd : Signal { x:Int, y:Int }
|
||||
wasd = directions 87 83 65 68
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
module Random where
|
||||
|
||||
{-| Since the core of Elm is pure, randomness must be handled via signals.
|
||||
|
|
|
@ -4,7 +4,7 @@ module Touch where
|
|||
include gestures that would be useful for both games and web-pages.
|
||||
|
||||
# Touches
|
||||
@docs touches
|
||||
@docs Touch, touches
|
||||
|
||||
# Gestures
|
||||
@docs taps
|
||||
|
@ -14,15 +14,14 @@ import Signal (Signal)
|
|||
import Native.Touch
|
||||
import Time (Time)
|
||||
|
||||
{-|
|
||||
Every `Touch` has `xy` coordinates. It also has an identifier `id` to
|
||||
distinguish one touch from another.
|
||||
{-| Every `Touch` has `xy` coordinates. It also has an identifier
|
||||
`id` to distinguish one touch from another.
|
||||
|
||||
A touch also keeps info about the initial point and time of contact:
|
||||
`x0`, `y0`, and `t0`. This helps compute more complicated gestures
|
||||
like taps, drags, and swipes which need to know about timing or direction.
|
||||
type Touch = { x:Int, y:Int, id:Int, x0:Int, y0:Int, t0:Time }
|
||||
-}
|
||||
type Touch = { x:Int, y:Int, id:Int, x0:Int, y0:Int, t0:Time }
|
||||
|
||||
{-| A list of ongoing touches. -}
|
||||
touches : Signal [Touch]
|
||||
|
|
Loading…
Reference in a new issue