* Add PushEffect, handle effects in renderer
* Set effects instead of blend
* Stop using PushCompositeMode, use PushEffect
* Remove remaining composite mode things
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.
The split between d2ui and d2asset Font version caused incorrect caching between the two. After looking at d2interface.Font, I saw the d2asset was the most recent and more tightly and cleanly packaged.
I therefore removed the old d2ui.Font and embedded the d2asset version in the d2ui.Label and d2ui.Button.
Looking at the code of d2ui, it would be logical to completly swap it for their d2gui version. But at least for the moment, the d2ui.Button as more functionality since it embeds a Label (instead of a font), and this label now has multiline horizontal alignement.
* moved filter constants back to d2enum
* moving key and mouse button enums into d2enum
* moving render type enum into d2enum
* moving input even priority enums into d2enum
* moving terminal enums into d2enum
* abstracted palettes, colors, and palette manager
* make asset manager use the palette manager interface
* added BGRA setter/getter, fixed lint errors
* abstraction for animation and animation manager
* abstracted font and font manager
* abstracted palettes, colors, and palette manager
* make asset manager use the palette manager interface
* added BGRA setter/getter, fixed lint errors
* abstraction for animation and animation manager
* 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