Skip to content
This repository was archived by the owner on Jan 24, 2023. It is now read-only.

Feature(ReRadioTogglePage) #28

Closed
wants to merge 5 commits into from
Closed

Feature(ReRadioTogglePage) #28

wants to merge 5 commits into from

Conversation

Tolfx
Copy link

@Tolfx Tolfx commented Jun 10, 2022

Figured it should be possible to remove specific item from _radioElementSource.

Added OnClick to detect if a radio toggle has been clicked.

  • Tested

@Tolfx Tolfx changed the title Feature(ReRadioTogglePage): Possible to remove specific item Feature(ReRadioTogglePage) Jun 10, 2022
@ddakebono
Copy link
Collaborator

The implementation of the OnClick event inside ReRadioTogglePage is pretty unnecessary, adding the OnClick action to the AddItem function would make more sense, similar to the previous implementation of AddItem before the rework. I'd recommend just adding it to AddItem again, but also adding an overload with just AddItem(string name, Object data) to keep compatibility with existing usages of it.

That being said, it may be a better idea to just add buttons as needed to a category if you want things to be clicked multiple times, from what I've heard the use case you have for toggle menus is rather outside of the scope of toggles. ReMod.Core buttons are very easy to create and destroy on the fly.

@Tolfx
Copy link
Author

Tolfx commented Jun 11, 2022

The implementation of the OnClick event inside ReRadioTogglePage is pretty unnecessary, adding the OnClick action to the AddItem function would make more sense, similar to the previous implementation of AddItem before the rework. I'd recommend just adding it to AddItem again, but also adding an overload with just AddItem(string name, Object data) to keep compatibility with existing usages of it.

Sure sounds more reasonable, can implement it later.

Tolfx added 2 commits June 11, 2022 10:52
Now added into `AddItem` for `OnClick`, and made an overload instead.
Copy link
Author

@Tolfx Tolfx left a comment

Choose a reason for hiding this comment

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

ReRadioTogglePage doesn't have OnClick instead AddItem has it now, hopefully it looks okay.
Also tested and works without issues.

@RequiDev RequiDev closed this Aug 1, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants