Skip to content

Added slider toggle (MAPCO-9483)#33

Open
ofekazar wants to merge 1 commit intomasterfrom
MAPCO-9483-slider-toggle
Open

Added slider toggle (MAPCO-9483)#33
ofekazar wants to merge 1 commit intomasterfrom
MAPCO-9483-slider-toggle

Conversation

@ofekazar
Copy link
Collaborator

@ofekazar ofekazar commented Mar 7, 2026

image image

@github-actions
Copy link

github-actions bot commented Mar 7, 2026

🎫 Related Jira Issue: MAPCO-9483

@ofekazar
Copy link
Collaborator Author

ofekazar commented Mar 7, 2026

Added UniTask as well so the animation runs as a UniTask instead of coroutine to match the main project way of doing things.

@ofekazar ofekazar force-pushed the MAPCO-9483-slider-toggle branch from 6af9755 to 4bb3f44 Compare March 7, 2026 20:59
{
public bool CurrentValue { get; private set; }

private bool _previousValue;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

field is unnecessary

Comment on lines +17 to +20
[Header("Animation")]
[SerializeField, Range(0, 1f)] private float animationDuration = 0.5f;
[SerializeField]
private AnimationCurve slideEase =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no animation in design

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nicer with it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it is not in the design, we implement according to the design

Comment on lines +8 to +12
namespace YahalomUIPackage.Runtime.YahalomSliderToggle
{

public class YahalomSliderToggle : Slider, IPointerClickHandler
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format file

Copy link
Collaborator

@baruchInsert-tech baruchInsert-tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • import asset in 4x
  • rename asset to knob

{
serializedObject.Update();

base.OnInspectorGUI();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double serializedObject.Update() call, base.OnInspectorGUI() already calls serializedObject.Update() internally. call on line 31 is redundant.

@baruchInsert-tech baruchInsert-tech added the In Progress task development has started label Mar 9, 2026
@ofekazar ofekazar force-pushed the MAPCO-9483-slider-toggle branch from 4bb3f44 to 5e8ac09 Compare March 9, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In Progress task development has started

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants