1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-04 09:17:17 -05:00
OpenDiablo2/d2core/d2gui/label.go

74 lines
1.3 KiB
Go
Raw Normal View History

package d2gui
import (
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
)
// Label is renderable text
type Label struct {
widgetBase
renderer d2interface.Renderer
text string
font d2interface.Font
surface d2interface.Surface
}
func createLabel(renderer d2interface.Renderer, text string, fontStyle FontStyle) (*Label, error) {
font, err := loadFont(fontStyle)
if err != nil {
return nil, err
}
label := &Label{
font: font,
renderer: renderer,
}
_ = label.setText(text)
label.SetVisible(true)
return label, nil
}
func (l *Label) render(target d2interface.Surface) error {
return target.Render(l.surface)
}
func (l *Label) getSize() (width, height int) {
return l.surface.GetSize()
}
Enhanced escape menu with options - d2gui bug remaining (#459) * 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>
2020-06-25 16:27:16 -04:00
// GetText returns the label text
Enhanced escape menu with options - d2gui bug remaining (#459) * 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>
2020-06-25 16:27:16 -04:00
func (l *Label) GetText() string {
return l.text
}
// SetText sets the label text
Enhanced escape menu with options - d2gui bug remaining (#459) * 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>
2020-06-25 16:27:16 -04:00
func (l *Label) SetText(text string) error {
if text == l.text {
return nil
}
Enhanced escape menu with options - d2gui bug remaining (#459) * 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>
2020-06-25 16:27:16 -04:00
return l.setText(text)
}
func (l *Label) setText(text string) error {
width, height := l.font.GetTextMetrics(text)
surface, err := l.renderer.NewSurface(width, height, d2enum.FilterNearest)
Enhanced escape menu with options - d2gui bug remaining (#459) * 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>
2020-06-25 16:27:16 -04:00
if err != nil {
return err
}
Enhanced escape menu with options - d2gui bug remaining (#459) * 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>
2020-06-25 16:27:16 -04:00
if err := l.font.RenderText(text, surface); err != nil {
return err
}
Enhanced escape menu with options - d2gui bug remaining (#459) * 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>
2020-06-25 16:27:16 -04:00
l.surface = surface
l.text = text
Enhanced escape menu with options - d2gui bug remaining (#459) * 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>
2020-06-25 16:27:16 -04:00
return nil
}