Skip to content

Commit

Permalink
Put overlay stuff into a single file.
Browse files Browse the repository at this point in the history
Former-commit-id: 0a83201
  • Loading branch information
bryanedds committed Apr 5, 2015
1 parent 9fa57ac commit f769e9d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 27 deletions.
3 changes: 1 addition & 2 deletions Nu/Nu/Nu/Nu.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@
<Compile Include="Constants.fs" />
<Compile Include="Address.fs" />
<Compile Include="Math.fs" />
<Compile Include="Overlayer.fs" />
<Compile Include="OverlayRouter.fs" />
<Compile Include="Overlay.fs" />
<Compile Include="Reflection.fs" />
<Compile Include="Camera.fs" />
<Compile Include="Assets.fs" />
Expand Down
22 changes: 21 additions & 1 deletion Nu/Nu/Nu/Overlayer.fs → Nu/Nu/Nu/Overlay.fs
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,24 @@ module Overlayer =
ignore <| overlays.DocumentElement.AppendChild imported

// make overlay
{ Overlays = overlays }
{ Overlays = overlays }

[<AutoOpen>]
module OverlayRouterModule =

/// Maps from dispatcher names to opt overlay names.
type OverlayRouter = Map<string, string option>

[<RequireQualifiedAccess>]
module OverlayRouter =

/// Make an OverlayRouter.
let make dispatchers userRoutes =
let router =
Map.fold
(fun overlayRouter _ dispatcher ->
let dispatcherName = (dispatcher.GetType ()).Name
Map.add dispatcherName (Some dispatcherName) overlayRouter)
Map.empty
dispatchers
Map.addMany userRoutes router
24 changes: 0 additions & 24 deletions Nu/Nu/Nu/OverlayRouter.fs

This file was deleted.

0 comments on commit f769e9d

Please sign in to comment.