* export d2asset singleton
* add *d2asset.AssetManager to d2app
- d2app now has a reference to an asset manager which it will use for loading
- added asset loader methods to the asset manager
- functions in d2asset are now wrappers for asset manager methods
* add asset manager reference to audio provider
- d2app asset manager reference is now passed to audio provider
- asset manager is created in main.go for now to pass into audio provider
- CreateSoundEffect is now a method, no longer exported, uses the asset manager reference
* d2app passes asset manager refence to map engine test
* in d2asset, all calls to LoadFile replaced with call to Singleton.Loadfile
* blizzard intro and credits screen
- d2app passes reference to the asset manager to these screens
* asset manager for d2map
- adding MapStampFactory, takes an asset manager reference
- embedded MapStampFactory into the MapEngine
- LoadStamp is now a method of the MapStampFactory
* d2asset: removed LoadFileStream, LoadFile, and FileExists
* d2gui changes
- singleton now has an asset manager reference
- calls to d2asset loader functions removed
- createButton is now a method of LayoutManager
- moved LayoutEntry to its own file
* map entity factory
- Map engine has an embedded map entity factory
- Map stamp factory gets a reference to the map engine's entity factory
- Stamps are given a reference to the map engine entity factory when created
- Character select gets a map entity factory
- Embedded the stamp factory into the MapEngine
* asset manager for d2ui
- d2ui is passed an asset manager reference when created
- all calls to d2asset loader functions in d2ui now refer to the asset manager
- d2gamescreen gets a ui manager when created
- help overlay is now passed a ui manager when created
* d2gamescreen + d2player: asset manager references
added an asset manager reference to
- inventory panel + inventory grid
- mini panel
- game controls
- help overlay
- character select
- main menu
- select hero class
- hero stats panel
* Removed d2asset.LoadAnimation
all references to this function have been replaced with calls to the asset manager method
* adding asset to help overlay, bugfix for 4d59c91
* Removed d2asset.LoadFont and d2asset.LoadAnimationWithEffect
all references to these have been replaced with calls to the asset manager methods
* MapRenderer now gets an asset manager reference
* removed d2asset.LoadPalette
all references have been replaced with calls to an asset manager instance
* merged d2object with d2mapentity
d2object was only being used to create objects in the map, so the provider
function is now a method of the map entity factory. calls to d2asset have
been removed.
* removed d2asset.LoadComposite
all calls are now made to the asset manager method
* removed d2asset singleton
all singleton references have been removed, a single instance of the
asset manager is passed around the entire app
* rename Initialize to NewAssetManager
* move music path enumerations into d2resource
* move text dictionary (.tbl) loader into d2fileformats sub-package d2tbl
* lint fix, add doc file for d2tbl
* moved data_dictionary.go into d2fileformats sub-package d2txt, added doc file
* added sub-packages d2geom for geometry-related things, and d2path for path-related things
* moved calcstring.go to d2calculation
* move bitmuncher, bitstream, stream reader/writer from d2common into sub-package d2datautils
* fix lint errors in d2datadict loaders (caused by moving stuf around in d2common)
* move size.go into d2geom
* move d2common/cache.go into sub-package d2common/d2cache
* renamed d2debugutil to d2util, moved utility functions from d2common into d2util
d2input made the move to immutable events. (ex. MouseMove) but
d2gui was using "local events" for its recursive layouts. Meaning
when entering a sub-layout, the original event was modified to have
the cursor relative to the x, and y of the parent layout.
After tossing ideas with Grav, we considered (1) making events modifiable,
(2) having an event constructor, (3) changing sub-Layout to use screen layout.
We choose (3), and this is the relevant commit.
* First improvements
Signed-off-by: William Claude <w.claude@thebeat.co>
* Make the menu more generic
Signed-off-by: William Claude <w.claude@thebeat.co>
* Handle mouse events
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove debug statement
Signed-off-by: William Claude <w.claude@thebeat.co>
* Handle left clicks better
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove unused file
Signed-off-by: William Claude <w.claude@thebeat.co>
* Handle titles in screens
Signed-off-by: William Claude <w.claude@thebeat.co>
* Improve the menu using layouts
Signed-off-by: William Claude <w.claude@thebeat.co>
* Add support for onOff labels
Signed-off-by: William Claude <w.claude@thebeat.co>
* Mutualise title creation
Signed-off-by: William Claude <w.claude@thebeat.co>
* Add gutter and mutualise things
Signed-off-by: William Claude <w.claude@thebeat.co>
* Improve menu, mutualise a lot of things and support animated sprites
Signed-off-by: William Claude <w.claude@thebeat.co>
* Use a cfg struct instead of independent handlers
Signed-off-by: William Claude <w.claude@thebeat.co>
* Fix hardcoded value
Signed-off-by: William Claude <w.claude@thebeat.co>
* Clean things a bit
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove unused property
Signed-off-by: William Claude <w.claude@thebeat.co>
* First support for hoverable elements
Signed-off-by: William Claude <w.claude@thebeat.co>
* Add support for label selection feedback
Signed-off-by: William Claude <w.claude@thebeat.co>
* Add support options
Signed-off-by: William Claude <w.claude@thebeat.co>
* Update print statement
Signed-off-by: William Claude <w.claude@thebeat.co>
* Update rendering and clean code
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove debug things
Signed-off-by: William Claude <w.claude@thebeat.co>
* Handle hovering
Signed-off-by: William Claude <w.claude@thebeat.co>
* Support enter key for labels
Signed-off-by: William Claude <w.claude@thebeat.co>
* Attach methods to layout
Signed-off-by: William Claude <w.claude@thebeat.co>
* Move things under EscapeMenu
Signed-off-by: William Claude <w.claude@thebeat.co>
* Some renaming
Signed-off-by: William Claude <w.claude@thebeat.co>
* Clean
Signed-off-by: William Claude <w.claude@thebeat.co>
* Set hovered element ID when using the mouse
Signed-off-by: William Claude <w.claude@thebeat.co>
* Clean
Signed-off-by: William Claude <w.claude@thebeat.co>
* Delete unused file
Signed-off-by: William Claude <w.claude@thebeat.co>
* Wire save & exit with a nasty hack
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove unused file
Signed-off-by: William Claude <w.claude@thebeat.co>
* Remove dead code
Signed-off-by: William Claude <w.claude@thebeat.co>
* Reorder the code a bit
Signed-off-by: William Claude <w.claude@thebeat.co>
* Rename hoverableElement into actionableElement
Signed-off-by: William Claude <w.claude@thebeat.co>
* Prevent regenerating the label if the text didn't change
Signed-off-by: William Claude <w.claude@thebeat.co>
* camera offset for ui panels :
added maprenderer viewport to be aligned left or right
calling alignement on keyPress in game_controls
* check if already aligned
* fix bugs
-forgot to assign alignement
-defaultScreenRect instead of screenRect because of issue mentionned in original comment
* remove config.json and replace go.mod line
* removing duplicate import of d2common
replacing all dh to d2common
* remove useless breaks from switch statement
* better range when value unused + prettying import
* item_affix rewrite
using return values instead of pointer references in arguments
* ebiten deprecated calls
* small fixes