Skip to content

Commit

Permalink
Starts to add accessibility options
Browse files Browse the repository at this point in the history
Nowhere near complete, but everything that needs a text counterpart has it.

Outstanding issues are:
 * Dialogs are incomplete and need a keyboard event
 * Dialogs need to auto-focus on the first form element  when they open
 * Menu needs to show that it's focused (needs an outline)
 * Menus need to actually work when pressing enter (this might not be possible, but we should try)

PArt of #45
  • Loading branch information
hobnob committed Oct 29, 2020
1 parent af2459a commit 4552c99
Show file tree
Hide file tree
Showing 4 changed files with 451 additions and 36 deletions.
175 changes: 174 additions & 1 deletion VirtualGloomhavenBoard/Elm/src/BoardOverlay.elm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module BoardOverlay exposing (BoardOverlay, BoardOverlayDirectionType(..), BoardOverlayType(..), ChestType(..), CorridorMaterial(..), CorridorSize(..), DifficultTerrainSubType(..), DoorSubType(..), HazardSubType(..), ObstacleSubType(..), TrapSubType(..), TreasureSubType(..), getBoardOverlayName)
module BoardOverlay exposing (BoardOverlay, BoardOverlayDirectionType(..), BoardOverlayType(..), ChestType(..), CorridorMaterial(..), CorridorSize(..), DifficultTerrainSubType(..), DoorSubType(..), HazardSubType(..), ObstacleSubType(..), TrapSubType(..), TreasureSubType(..), getBoardOverlayName, getOverlayLabel)

import BoardMapTile exposing (MapTileRef)

Expand Down Expand Up @@ -273,3 +273,176 @@ getBoardOverlayName overlay =

Coin _ ->
"treasure-coin"


getOverlayLabel : BoardOverlayType -> String
getOverlayLabel overlay =
case overlay of
Door d _ ->
case d of
AltarDoor ->
"Altar"

Stone ->
"Stone Door"

Wooden ->
"Wooden Door"

BreakableWall ->
"Breakable Wall"

Corridor c _ ->
case c of
Earth ->
"Earth Corridor"

ManmadeStone ->
"Manmade Stone Corridor"

NaturalStone ->
"Natural Stone Corridor"

PressurePlate ->
"Pressure Plate"

Wood ->
"Wooden Corridor"

DarkFog ->
"Dark Fog"

LightFog ->
"Light Fog"

DifficultTerrain d ->
case d of
Log ->
"Fallen Log"

Rubble ->
"Rubble"

Stairs ->
"Stairs"

VerticalStairs ->
"Stairs"

Water ->
"Water"

Hazard h ->
case h of
HotCoals ->
"Hot Coals"

Thorns ->
"Thorns"

Obstacle o ->
case o of
Altar ->
"Altar"

Barrel ->
"Barrel"

Bookcase ->
"Bookcase"

Boulder1 ->
"Boulder"

Boulder2 ->
"Boulder"

Boulder3 ->
"Boulder"

Bush ->
"Bush"

Cabinet ->
"Cabinet"

Crate ->
"Crate"

Crystal ->
"Crystal"

DarkPit ->
"Dark Pit"

Fountain ->
"Fountain"

Nest ->
"Nest"

Pillar ->
"Pillar"

RockColumn ->
"Rock Column"

Sarcophagus ->
"Sarcophagus"

Shelf ->
"Sheelves"

Stalagmites ->
"Stalagmites"

Stump ->
"Tree Stump"

Table ->
"Table"

Totem ->
"Totem"

Tree3 ->
"Tree"

WallSection ->
"Wall"

StartingLocation ->
"Starting Location"

Trap t ->
case t of
BearTrap ->
"Bear Trap"

Spike ->
"Spike Trap"

Poison ->
"Poison Trap"

Treasure t ->
case t of
Chest c ->
"Treasure Chest "
++ (case c of
Goal ->
"Goal"

NormalChest i ->
String.fromInt i
)

Coin i ->
String.fromInt i
++ (case i of
1 ->
"Coin"

_ ->
"Coins"
)
Loading

0 comments on commit 4552c99

Please sign in to comment.