Skip to content

Commit

Permalink
Remove bucket tool
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmire committed Apr 1, 2012
1 parent 03c7406 commit 7a655e8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 48 deletions.
67 changes: 24 additions & 43 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
* Don't use Valentine so much -- if this is going to only work in newer browsers
then we can use ES5 .forEach, .reduce, etc.

* Use Rack middleware for compiling Coffee and Sass on the fly
(performance is not important for this app)

## Game

* Fix sprites for the player and the enemy

* Use Rack middleware for compiling Coffee and Sass on the fly
(performance is not important for this app)

* Rename Bounds to Box, to prevent intersectsWith/intersectWith

* The "framed objects" - these should be a list of objects that are 32px (4
Expand All @@ -29,55 +29,36 @@

## Editor

* In the default view, there are two panes, the sidebar with a list of available
maps and the viewport that will display an open map. When a map is loaded, a
third pane appears with objects for adding to the map.

* To add a new map, double-click on "Add new map" in the sidebar. A modal will
appear with textboxes for the desired dimensions of the map, and when the
modal is submitted a new canvas is created and loaded into the viewport.

* Maps are scrollable a la Google Maps - just drag the map to see another area.

* There are two layers on a map: foreground and background. These can be
switched with a small dropdown in the upper right hand corner of the viewport.
Switching to the foreground layer will render the background as washed out,
and vice versa. In background mode, the right-hand pane lists images and
sprites, in foreground mode the right-hand pane lists collidable scenery,
items, and mobs.

* To add an object to the map, just drag it over from the objects pane.

* To move an object already on the map, just drag it to a new location. Objects
are snapped to an 8px grid (which is always overlaid on top of the map). Two
objects cannot share the same space. If an object being dragged is hovering
over an invalid location, it will turn red (a la the icons on the home screen
in Android); lifting off would then cancel the drag.
* FEATURE: Add ability to add a new map. To do this, double-click on "Add new
map" in the sidebar. A modal will appear with textboxes for the desired
dimensions of the map, and when the modal is submitted a new canvas is created
and loaded into the viewport.

* An open map is saved automagically, as soon as you make a change.
* FEATURE: Add entities layer

* Add a selection tool -- so if you want to move two tiles as a group (say,
Link's house AND the door), you can do that.
* FEATURE: Add a selection tool -- so if you want to move two tiles as a group
(say, Link's house AND the door), you can do that.

* Add a threshold for dragging -- maybe about 3 pixels
* FEATURE: Add undo/redo -- this will require refactoring all the tools into a
more object-oriented approach

* Add undo/redo -- this will require refactoring all the tools into a more
object-oriented approach
* FEATURE: Add ability to dupe an object without having to drag it again all the
way from the sidebar

* Add ability to dupe an object without having to drag it again all the way from
the sidebar
* INTERNAL: For map objects, group the $elem and the object together,
everywhere, as one MapObject

* For map objects, group the $elem and the object together, everywhere, as one
MapObject
* FEATURE: Snap the selection box to the nearest grid guide, but not by rounding
-- if cursor is within 5 pixels of a guide, snap it otherwise do nothing

* Snap the selection box to the nearest grid guide, but not by rounding -- if
cursor is within 5 pixels of a guide, snap it otherwise do nothing
* INTERNAL: Bind viewport events to viewport.$elem rather than viewport.$map

* Bind viewport events to viewport.$elem rather than viewport.$map
* FEATURE: Remember the last tool used in a layer

* Remember the last tool used in a layer
* BUG: When switching layers sidebar never gets hidden

* When switching layers sidebar never gets hidden
* FEATURE: Add ability to select a fill object and delete it just like you can
do with map objects -- or extract this into a common place

* Trap backspace key everywhere
* FEATURE: Add ability to set the background color of a map

6 changes: 2 additions & 4 deletions app/javascripts/editor/core.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -314,18 +314,16 @@ define 'editor.core', ->
@viewport[m1]?()

activate_fill_layer: ->
# we want normal, hand, select, and bucket tools
# we want normal, hand, select tools
# - normal tool will select areas so you can delete them and enable moving
# objects
# - hand tool will move the map around
# - select tool will let you select an area on the map
# - bucket tool will let you fill in that area with a color - filling in an
# area will create it - or you can fill the entire map with a color
#
# in addition selecting the fill layer will populate the sidebar with a
# color picker

@_initTools ['normal', 'hand', 'select', 'bucket']
@_initTools ['normal', 'hand', 'select']

activate_tiles_layer: ->
# we want normal and hand tools
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/app/editor/core.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a655e8

Please sign in to comment.