anchor.diff:          inherit GuiDispatcher ()
           
           let handleMouseLeftDown evt world =
  -            let toggle = evt.Subscriber : Entity
  +            let entity = evt.Subscriber : Entity
               let data = evt.Data : MouseButtonData
  -            if toggle.GetSelected world then
  -                let mousePositionWorld = World.mouseToWorld (toggle.GetAbsolute world) data.Position world
  -                if  toggle.GetVisible world &&
  -                    Math.isPointInBounds mousePositionWorld (toggle.GetBounds world) then
  -                    if toggle.GetEnabled world then
  -                        let world = toggle.SetPressed true world
  +            if entity.GetSelected world then
  +                let mousePositionWorld = World.mouseToWorld (entity.GetAbsolute world) data.Position world
  +                if  entity.GetVisible world &&
  +                    Math.isPointInBounds mousePositionWorld (entity.GetBounds world) then
  +                    if entity.GetEnabled world then
  +                        let world = entity.SetPressed true world
                           (Resolve, world)
                       else (Resolve, world)
                   else (Cascade, world)
               else (Cascade, world)
   
           let handleMouseLeftUp evt world =
  -            let toggle = evt.Subscriber : Entity
  +            let entity = evt.Subscriber : Entity
               let data = evt.Data : MouseButtonData
  -            if toggle.GetSelected world then
  -                let wasPressed = toggle.GetPressed world
  -                let world = toggle.SetPressed false world
  -                let mousePositionWorld = World.mouseToWorld (toggle.GetAbsolute world) data.Position world
  -                if  toggle.GetVisible world &&
  -                    Math.isPointInBounds mousePositionWorld (toggle.GetBounds world) then
  -                    if toggle.GetEnabled world && wasPressed then
  -                        let world = toggle.SetOpen (not (toggle.GetOpen world)) world
  -                        let eventAddress = if toggle.GetOpen world then Events.Open else Events.Close
  +            if entity.GetSelected world then
  +                let wasPressed = entity.GetPressed world
  +                let world = entity.SetPressed false world
  +                let mousePositionWorld = World.mouseToWorld (entity.GetAbsolute world) data.Position world
  +                if  entity.GetVisible world &&
  +                    Math.isPointInBounds mousePositionWorld (entity.GetBounds world) then
  +                    if entity.GetEnabled world && wasPressed then
  +                        let world = entity.SetOpen (not (entity.GetOpen world)) world
  +                        let eventAddress = if entity.GetOpen world then Events.Open else Events.Close
                           let eventTrace = EventTrace.record "ToggleDispatcher" "handleMouseLeftUp" EventTrace.empty
  -                        let world = World.publish () (eventAddress --> toggle) eventTrace toggle true world
  +                        let world = World.publish () (eventAddress --> entity) eventTrace entity true world
                           let eventTrace = EventTrace.record4 "ToggleDispatcher" "handleMouseLeftUp" "Toggle" EventTrace.empty
  -                        let world = World.publish () (Events.Toggle --> toggle) eventTrace toggle true world
  +                        let world = World.publish () (Events.Toggle --> entity) eventTrace entity true world
                           let world =
  -                            match toggle.GetToggleSoundOpt world with
  -                            | Some toggleSound -> World.playSound (toggle.GetToggleSoundVolume world) toggleSound world
  +                            match entity.GetToggleSoundOpt world with
  +                            | Some toggleSound -> World.playSound (entity.GetToggleSoundVolume world) toggleSound world
                               | None -> world
                           (Resolve, world)
                       else (Resolve, world)
  
positive.code:              define Entity.Parallax 0.0f
               computed Entity.PhysicsId (fun (entity : Entity) world -> { SourceId = entity.GetId world; CorrelationId = Gen.idEmpty }) None]
  
          override this.Register (tileMap, world) =
              let world = World.monitor (fun _ world -> (Cascade, tileMap.PropagatePhysics world)) (tileMap.ChangeEvent Property? BodyEnabled) tileMap world
              let world = World.monitor (fun _ world -> (Cascade, tileMap.PropagatePhysics world)) (tileMap.ChangeEvent Property? Transform) tileMap world
              let world = World.monitor (fun _ world -> (Cascade, tileMap.PropagatePhysics world)) (tileMap.ChangeEvent Property? Friction) tileMap world
              let world = World.monitor (fun _ world -> (Cascade, tileMap.PropagatePhysics world)) (tileMap.ChangeEvent Property? Restitution) tileMap world
              let world = World.monitor (fun _ world -> (Cascade, tileMap.PropagatePhysics world)) (tileMap.ChangeEvent Property? CollisionCategories) tileMap world
              let world = World.monitor (fun _ world -> (Cascade, tileMap.PropagatePhysics world)) (tileMap.ChangeEvent Property? CollisionMask) tileMap world
              let world = World.monitor (fun _ world -> (Cascade, tileMap.PropagatePhysics world)) (tileMap.ChangeEvent Property? TileMapAsset) tileMap world
              world
  
          override this.RegisterPhysics (tileMap, world) =
              let tileMapAsset = tileMap.GetTileMapAsset world
              match tryMakeTileMapDescriptor tileMapAsset world with
              | Some tileMapDescriptor -> registerTileMapPhysics tileMap tileMapDescriptor world
              | None -> Log.debug ("Could not make tile map data for '" + scstring tileMapAsset + "'."); world
  
          override this.UnregisterPhysics (tileMap, world) =
              World.destroyBody (tileMap.GetPhysicsId world) world
  
          override this.Actualize (tileMap, world) =
              if tileMap.GetVisible world then
                  let tileMapAsset = tileMap.GetTileMapAsset world
                  match Metadata.tryGetTileMapMetadata tileMapAsset (World.getMetadata world) with
                  | Some (_, tileSets, map) ->
                      let absolute = tileMap.GetAbsolute world
                      let layers = List.ofSeq map.Layers
                      let tileSourceSize = Vector2i (map.TileWidth, map.TileHeight)
                      let tileSize = Vector2 (single map.TileWidth, single map.TileHeight)
                      let tileLayerClearance = tileMap.GetTileLayerClearance world
                      List.foldi
                          (fun i world (layer : TmxLayer) ->
                              Array.fold
                                  (fun world j ->
                                      let yOffset = single (map.Height - j - 1) * tileSize.Y
                                      let position = tileMap.GetPosition world + v2 0.0f yOffset
                                      let depthOffset =
                                          match layer.Properties.TryGetValue Constants.TileMap.DepthPropertyName with
                                          | (true, depth) -> scvalue depth
                                          | (false, _) -> single i * tileLayerClearance
                                      let depth = tileMap.GetDepth world + depthOffset
                                      let parallaxTranslation =
                                          if absolute
                                          then Vector2.Zero
                                          else tileMap.GetParallax world * depth * -World.getEyeCenter world
                                      let parallaxPosition = position + parallaxTranslation
                                      let size = Vector2 (tileSize.X * single map.Width, tileSize.Y)
                                      let rotation = tileMap.GetRotation world
                                      let transform =
                                          { Position = parallaxPosition
                                            Size = size
                                            Rotation = rotation
                                            Depth = depth
                                            Flags = tileMap.GetFlags world }
                                      let tiles =
                                          layer.Tiles |>
                                          enumerable<_> |>
                                          Seq.skip (j * map.Width) |>
                                          Seq.take map.Width |>
                                          Seq.toArray
                                      if World.isBoundsInView absolute (v4Bounds parallaxPosition size) world then
                                          World.enqueueRenderMessage
                                              (LayeredDescriptorMessage
                                                  { Depth = transform.Depth
  
negative.code:                                       Offset = Vector2.Zero
                                        InsetOpt = None
                                        Image = image
                                        Color = if entity.GetEnabled world then Color.White else entity.GetDisabledColor world
                                        Glow = Color.Zero
                                        Flip = FlipNone }})
                          world
                  | None -> world
              else world
  
          override this.GetQuickSize (entity, world) =
              match entity.GetBackgroundImageOpt world with
              | Some image ->
                  match Metadata.tryGetTextureSizeF image (World.getMetadata world) with
                  | Some size -> size
  