Releases: payne911/PieMenu
New flag for PieWidget
- Fixed
RadialGroup#isWithinInnerRadius
so that it takes into account thetotalDegreesDrawn
. - Added
RadialGroup#isWithinDrawnAngle
. - Added
RadialGroup#isInnerRadiusBlockingPropagation
. - (NOT BACKWARD-COMPATIBLE) Added a new flag:
hitThroughInnerRadius
(forPieWidget
). Default value:true
. This changes the wayPieWidget#hit
behaves: it isn't based on the presence of a background or background color anymore. If you don't want yourhit
to reach Actors behind yourinnerRadius
, set this value tofalse
. - (NOT BACKWARD-COMPATIBLE) Renamed
PieWidget#isBackgroundHit
toPieWidget#isInnerRadiusBlockingPropagation
. This is a more appropriate (less misleading) method name based on the new behavior described in the last point. - Minor optimizations for
#findChildIndexAtStage
(in bothRadialGroup
andPieMenu
). - Minor JavaDoc tweaks.
WebDemo updated to use v5.0.0
.
For people transitioning from v4
, the main difference is with the behavior of the inner radius
part: it used to block or not the propagation of the hit
method to Actors below it depending on the presence or not of a style.background
or style.backgroundColor
. Now, this has been adjusted to allow more flexibility: use the hitThroughInnerRadius
flag. It only applies to PieWidget
and PieMenu
, and in both cases really only mostly matters if you were not using any of the "drag" behaviors (that is, you allow the user to release it's mouse-click before letting them select an option).
Basically, if you can't notice any difference when you click in the innerRadius
of your toy, then you're good to go! :)
Fixed GWT build, Animated aren't deprecated anymore
- Fixed the pooled classes (
PieMenuHighlightChangeEvent
andPieMenuHoverChangeEvent
) not working on the GWT platform. - The
Animated
classes aren't classified as deprecated anymore. It was confusing at best. - Micro-optimization for the
layout()
function. - Minor JavaDoc tweaks.
- Non-breaking refactor of the
Animated
classes (extracted interfaces to reduce code duplication).
Also, I updated the WebDemo to use v4.3.0
and tweaked some settings to make it much cleaner.
Performance improvements, 2 bug-fixes, more defaults
- Fixed a bug related to the
globalAlphaMultiplier
attribute. - Fixed a bug related to
centerOn
methods and some Viewports. - Performance improvement: Events (Callbacks/Highlight/Selection/etc.) are now Pooled.
- Added a default Color (black) for the following
PieWidgetStyle
attributes:separatorColor
andcircumferenceColor
. - Added a Testing Menu so that Contributors can more easily test their implementations.
- Added the
NO_SELECTION
constant inPieMenu
. - Added a new "code example":
NestedClickDrag
. - Minor JavaDoc tweaks and improvements.
- Updated
ShapeDrawer
version tov2.3.0
.
Feature addition: AnimatedRadialGroup
- Fixed and improved some JavaDoc
- Added an
AnimatedRadialGroup
class - Renamed a local variable so that it reflects more properly what it designated
Introducing PieWidget, and removing Batch from constructors
- A
Batch
does not need to be passed to the constructors anymore. - Introduced
PieWidget
in the new design: theRadialGroup
now doesn't deal in any way with theShapeDrawer
. getMaxDiameter
has been renamed togetCurrentDiameter
.getMaxRadius
has been renamed togetCurrentRadius
.minRadius
has been renamed topreferredRadius
.- Introduced a new
individuals
demo (named "RadialButtons") to showcase the newRadialGroup
class. - Changed the way the scene2d
hit
method works with the widget. - Fixed the
hit
for when a contained Actor extends beyond the limits of the widget itself. - Fixed
RadialGroup
containing otherPieMenu
. - Fixed non-regular width and height values on Animated widgets.
- Fixed
centerOnActor
method used on an Actor that was contained within aGroup
.
Now compatible with Drawable backgrounds
- Fixed "floating"
Group
that containedRadialGroup
. - More efficient evaluation for the reset of the hover on mouse-exit.
- The
background
image can now be aDrawable
as well (but keep in mind thatDrawable
cannot be rotated).
Reworked API
This should have been v1
, but we are all learning! Many API changes were made since v2
: check out the logs from the release-candidates of v3
for more info (v3.0.0-rc1
and v3.0.0-rc2
).
- Hotfix for
rotateBy()
- Hotfix for overlapping menus
- Updated
ShapeDrawer
to v2.0.3 (fixes some crashes) - Shorter way of integrating the library for GWT
- Renamed
PieMenuClickListener
toPieMenuListener
Should now be a stable API.
- Introduced a new behavior-flag:
middleCancel
determines if releasing a click from within the inner-radius will trigger the extended selection or thedefaultIndex
selection. ChildRegion
is now referred to asSlice
throughout the API.- Style variables now have shorter names that resemble the
ButtonStyle
naming. setDefaultIndex
now changes theselectedIndex
if it isn't a valid index.- The complementary callbacks (highlight and hover) are now regrouped within
PieMenuCallbacks
. - Integrated rotations: scene2d's
rotateBy()
method is now supported. radius
has been renamed tominRadius
since it is now a suggested radius for the minimal radius value. In casesetFillParent(true)
or other size-changing methods are used (Table'sfill
, for example), the widget will now expand as a scene2d user would expect it to.innerRadius
now designates a percentage of the radius, instead of an amount of pixels.- Fixed the flicker resulting from hovering out of a contained Actor.
selectedColor
now used by default if nodownColor
was set: this is to prevent a flicker when clicking.- Fixed a few
Animated
constructors. - The
ShapeDrawer
is now instantiated internally. - The default rules used by
ShapeDrawer
to determine the amount of sides to draw is now internally overridden with an improved algorithm. - Added an example for adding Keyboard-Key-Mapping (selection through keyboard) on a
PieMenu
.
Major refactor : testing some stuff before a release
- Refactored the Style so that most of the
float
values (radius
and the likes) have become class-attributes instead. - Many more constructors available. Basic
float
properties (radius
and the likes) are now integrated in the constructors. PieMenuSuggestedClickListener
renamed toPieMenuClickListener
and is now added by default. A setter is provided to change thisClickListener
to a custom one.- Added callbacks for mouse-over. Added the corresponding
hoveredChildRegionColor
andhoveredAndSelectedChildRegionColor
to thePieMenuStyle
. - Added
highlightedChildRegionColor
in thePieMenuStyle
. - The
PieMenuClickListener
now triggers a highlight ontouchDown
rather than waiting for the mouse to move after the initial click. - The complementary callbacks (highlight and hover) are now regrouped within
PieMenuAdditionalChangeListener
. HighlightChangeListener
renamed toPieMenuHighlightChangeListener
and now extends EventListener. Removed the associated getter and setter: nowaddListener()
should be used for that too.- Widgets now start with their visibility set to
true
(it used to befalse
): this is to remain closer to scene2d's expected behavior. - Changed the Actor-sizing algorithm (and thus fixed it for low
innerRadius
values). - Integrated the propagation of the alpha from parent to children. Use the
setGlobalAlphaMultiplier(float)
method to do so. - Fix for Widgets contained within a Table.
- Fix of the PieMenuStyle Colors-duplication.
- Style's
Circumference
values now include theinnerRadius
value. - New API methods to allow more customization:
getActorDistanceFromCenter
,getEstimatedRadiusAt
andadjustActorSize
can be changed to be whatever you want. - Removed from the API the
@Deprecated
methods which should have been implemented by the users themselves anyway. This is reflected in the corresponding code-examples.
Early access to animations
This integration is just to provide people with a basic animation. It will be refactored in the future, hence the deprecated flag on the newly-introduced classes.