Commit graph

33 commits

Author SHA1 Message Date
Scott Erickson
4dda1b67dd Refactor ThangsTabView to use GameUIState for managing all Surface mouse events
Attempting to use a react-component-like system, where the Surface simply emits everything that
happens through the shared GameUIState, and the parent (in this case the ThangsTabView, but theoretically
anything that uses the surface) handles the events manually, to enforce desired behavior for that particular
context.

It's nice that all the event handling is centralized, but it's still a bit of a mess, and not thoroughly
stateful. But it's a start. This is in preparation for allowing multi-thang selection and manipulation
in the level editor.
2016-06-28 09:19:38 -07:00
Scott Erickson
31214e854e Wabam. Refactored a bunch of stuff into 'core' folders so that it's clearer which files are being loaded first thing, and which are not. Also reworked a bunch of the anymatch things in config.coffee, cause there were better ways. 2014-11-28 17:49:41 -08:00
Nick Winter
5d54332ed7 Round inferred cooldown docs. Show grabber/grabbing cursor when Surface is enabled, playing, and zoomed in. 2014-11-22 21:22:46 -08:00
Nick Winter
df51e28a1d Fixed camera zoom killing coordinate hover unnecessarily. 2014-11-20 11:37:10 -08:00
Scott Erickson
627c56dbb5 Fixed mouse scrolling. Fixed SpriteStage scaling (scale the layers instead). Added spriteType to the ThangType schema. 2014-09-26 11:07:01 -07:00
Nick Winter
ee9e453896 Fixed #828. Added many other minor refactorings. 2014-08-27 12:24:11 -07:00
Nick Winter
8ca9374de0 Zoom-aware, ratio-based edge avoidance (polish for #1448). 2014-08-18 14:08:54 -07:00
Pete DiSalvo
31e609c0c8 Added edge detection to camera, and worked on orientations 2014-08-16 18:30:41 -04:00
Tery Lim
618ade4946 Clean up mixed quotes 2014-07-01 12:23:22 +08:00
Nick Winter
815ef88e78 Fixed bugs with camera bobbing with bobbing units and gold views showing up when empty. 2014-06-23 10:36:42 -07:00
Jayant Jain
94f70ca9f4 Fixes #1079 2014-05-24 12:02:26 +05:30
Scott Erickson
ae64032739 Refactored the Camera to only listen to events that use the same canvas. Fixed the level editor map selection modals. 2014-05-16 15:34:14 -07:00
Nick Winter
cc7808251f Zoom/scroll, ModelModal, and coordinate grabber fixes. 2014-05-14 15:29:55 -07:00
Nick Winter
1a5e30d5b5 Dynamic Canvas sizing. 2014-05-12 13:28:46 -07:00
Nick Winter
2a2ddd068e Separate isSelectable from inThangList. Mouse wheel all the way in/out. bountyGold shows up as gold. Moved say Labels to mouth offset from aboveHead offset and obey sprite rotation. Don't link projects to example.com. 2014-04-24 14:23:15 -07:00
Scott Erickson
2c329a256f Removed all the setting properties to null in destroy methods that don't need them since destroy nullifies all properties. 2014-03-24 14:42:56 -07:00
Nick Winter
aa4f1baf73 Moved to 1848 x 1178 pixel canvases, since it's 2x the old size. Added a conversion factor to script camera zooms to account for scripts using the old numbers. Fixed bug where IndieSprites wouldn't update actions. 2014-03-16 13:23:01 -07:00
Jayant Jain
d8418f7bb2 Fixes issue where panning occurs upon mouse scroll at max/min zoom 2014-03-14 23:57:00 +05:30
Jayant Jain
17debf49e6 Implements smoother panning around the map for keyboard controls 2014-03-13 18:32:23 +05:30
Nick Winter
ec86a07906 Changed Camera min/max zoom. 2014-03-07 15:20:54 -08:00
Muhammed Thanish
a092557973 Add camera zoomTo(pos) 2014-03-02 02:13:37 +05:30
Muhammed Thanish
7ea9260322 Use WizardSprite 2014-03-02 01:45:49 +05:30
Muhammed Thanish
8cc8103288 Add keyboard shortcuts to move the wizard 2014-03-01 19:58:15 +05:30
Scott Erickson
242342315f Can now drag the mouse to move around the map. 2014-02-24 19:49:05 -08:00
Scott Erickson
90ec07fc75 Fixed the camera to properly follow thangs again. Also tweaked the camera to center around the torso rather than the feet. 2014-02-22 11:31:31 -08:00
Scott Erickson
5bda4d5e5f Fixed the camera to not move around when the world is reset and being cast. 2014-02-20 14:25:39 -08:00
Scott Erickson
8f938bf6fc Scrolling with the mouse now zooms based on mouse position. 2014-02-15 13:45:16 -08:00
Scott Erickson
1349a59084 Refactored destroy functions to have super be the last thing. 2014-02-14 10:57:47 -08:00
Nick Winter
5655084981 Fixed a ton more leaks. 2014-02-12 12:41:41 -08:00
Scott Erickson
2a19da5ba2 More memory fixes. 2014-02-11 14:58:45 -08:00
Scott Erickson
f1518a28e2 Fixed the camera when locked to never go to a new target. 2014-01-27 10:06:34 -08:00
Scott Erickson
cf0e1d305b Tweaked updateZoom. 2014-01-20 23:23:49 -08:00
Nick Winter
6009df26de Ready for action, sir! 2014-01-03 10:32:13 -08:00