Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-Game: Add a "step size" argument to dbg_slider() and dbg_slider_int() so users can control the value #2971

Closed
Alphish opened this issue Sep 12, 2023 · 10 comments
Assignees
Labels
documentation Improvements or additions to documentation are required by this issue feature request New feature (or a request for one)
Milestone

Comments

@Alphish
Copy link
Contributor

Alphish commented Sep 12, 2023

Is your feature request related to a problem?

Currently, there's no way to specify how precise the slider should be; dbg_slider only allows specifying minimum and maximum values, not the step between them. It means we can't easily make a slider that e.g. operates on integers only.

Describe the solution you'd like

Allow specifying the dbg_slider step. One option could be adding a step-specific argument after label, though it breaks the convention of label argument always being last.

Another possibility would be passing additional configuration as struct, so that any additional configurations would only require expanding the struct, while keeping the function signature the same. Though it still is tricky with minimum and maximum arguments already being there.

Describe alternatives you've considered

No response

Additional context

Original suggestion appeared here: https://forum.gamemaker.io/index.php?threads/dbg_slider-missing-step-size-argument.105748/#post-637205

@Alphish Alphish added the feature request New feature (or a request for one) label Sep 12, 2023
@gnysek
Copy link
Contributor

gnysek commented Sep 12, 2023

Yeah, I'm rather using integers with step = 1 (if not bigger numbers) for things that benefits from slider, so current way it works (allows to set decimal numbers, with accuracy proportional to dbg view size), isn't what I would expect.

@ShivaSouza
Copy link

If this isn't entirely possible, I suppose at least having SliderInt and SliderAngle could be helpful?

https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html

@rwkay
Copy link

rwkay commented Nov 1, 2023

While Imgui does not support it explicitly this has an example that could be used - ocornut/imgui#1183 - need to test it out and see what it is like

@iddm
Copy link

iddm commented Nov 24, 2023

Can this also be done to the Drag control?

@iampremo iampremo transferred this issue from another repository Jan 9, 2024
@rwkay
Copy link

rwkay commented Apr 25, 2024

Can this also be done to the Drag control?

what do you mean Drag control?

@rwkay
Copy link

rwkay commented Apr 26, 2024

Fixed in 2024.6 - I have added a new (optional) parameter to both dbg_slider and dbg_slider_int where a step value can be given (note this value should be non-negative and >0),

@rwkay rwkay closed this as completed Apr 26, 2024
@gurpreetsinghmatharoo gurpreetsinghmatharoo added this to the 2024.6 milestone Apr 29, 2024
@gurpreetsinghmatharoo gurpreetsinghmatharoo added the documentation Improvements or additions to documentation are required by this issue label Apr 29, 2024
@YYBartT YYBartT self-assigned this Apr 29, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue Apr 30, 2024
…ntrol

YoYoGames/GameMaker-Bugs#2971

* Added optional step parameter to dbg_slider & dbg_slider_int
* Added second example to dbg_slider that shows how to use the step size parameter
* Added a note on what the step size actually means (i.e. possible values are limited to multiples of the step size)
* Updated shortcut style on the pages
@YYBartT
Copy link

YYBartT commented Apr 30, 2024

Documented the step size as an optional parameter on both the dbg_slider() and dbg_slider_int() page.

@YYBartT YYBartT moved this from Done to Ready for QA in Team Workload Apr 30, 2024
gurpreetsinghmatharoo added a commit to YoYoGames/GameMaker-Manual that referenced this issue May 9, 2024
* develop.bart:
  docs(feature): added documentation for physics_raycast YoYoGames/GameMaker-Bugs#2762
  docs(feature): documented gamepad_enumerate YoYoGames/GameMaker-Bugs#5329
  docs(feature): skeleton_animation_clear optional parameters YoYoGames/GameMaker-Bugs#1570
  docs(feature): documented dbg_view_exists and dbg_section_exists YoYoGames/GameMaker-Bugs#4931
  docs(feature): documented dbg_view_exists and dbg_section_exists YoYoGames/GameMaker-Bugs#4931
  docs(feature): YoYoGames/GameMaker-Bugs#1570
  docs(general): mentioned that any attached files are uploaded privately
  docs(feature): smaller custom format screenshot YoYoGames/GameMaker-Bugs#5495
  docs(feature): documented the new dbg_text_separator function YoYoGames/GameMaker-Bugs#4998
  docs(feature): Switch to the docking branch of imgui YoYoGames/GameMaker-Bugs#4905
  docs(general): document OS and audio device limitations when using audio YoYoGames/GameMaker-Bugs#5580
  docs(feature): Add an option to specify "step" in the ImGUI slider control YoYoGames/GameMaker-Bugs#2971

# Conflicts:
#	Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Audio/audio_sound_length.htm
#	Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider.htm
#	Manual/contents/GameMaker_Language/GML_Reference/Debugging/dbg_slider_int.htm
@YYDan YYDan changed the title Add an option to specify "step" in the ImGUI slider control In-Game: Add a "step size" argument to dbg_slider() and dbg_slider_int() so users can control the value May 20, 2024
@mgeddesGM
Copy link

mgeddesGM commented May 22, 2024

tested in IDE v2024.600.0.557 Runtime v2024.600.0.572 and IDE v9.9.1.677 Runtime v9.9.1.818

@gurpreetsinghmatharoo, @YYBartT dbg_slider and dbg_slider_int work as expected but the step example in the beta manual, here and here, are missing a label value so send up displaying the expected step value

@mgeddesGM mgeddesGM moved this from Ready for QA to In Progress in Team Workload May 22, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue May 22, 2024
…der_int()

YoYoGames/GameMaker-Bugs#2971

* Added missing label on the dbg_slider page example
* Fixed ref_create on the dbg_slider_int page example
@YYBartT
Copy link

YYBartT commented May 22, 2024

@mgeddesGM That should be changed now in the develop.bart branch

@mgeddesGM
Copy link

verified on latest beta manual

@mgeddesGM mgeddesGM moved this from Ready for QA to Verified in Team Workload Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation are required by this issue feature request New feature (or a request for one)
Projects
Status: Verified
Development

No branches or pull requests

8 participants