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

[Suggestion] ProgressBar as an input #506

Open
TonybynMp4 opened this issue Feb 28, 2024 · 1 comment
Open

[Suggestion] ProgressBar as an input #506

TonybynMp4 opened this issue Feb 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@TonybynMp4
Copy link

TonybynMp4 commented Feb 28, 2024

Is your feature request related to a problem? Please describe.
Progress Bar is cool.
But progress bar can't be used as an 'input' (really bad way of saying that please bear with me)

Describe the solution you'd like
A progress bar, where you can specify a 'tickrate' (update status every x ms), modify the label on each tick, return the current progress on cancel and set a start, end and step.

So you could basically say

  • start at 0,
  • end at 69,
  • step/tick = 6.9
  • tick = 250
  • every 250ms
    • currentStep goes up by 6.9
    • the progressBar fills up by end / step/tick, so 10% in this case.
    • update the label
      • the labels could contain patterns, with currentStep, end i.e 'Your progress is 27.6/69'
      • or label could be a function, so you can use values (start, end, step, currentStep) and do whatever you want* with them)
  • If you cancel
    • return the currentStep (shouldn't be a breaking change i guess? if your code wasn't made for that it won't return a number anyway)

Either (somehow, i don't really see how you'd do that) allow it for the normal lib.progressBar or add a new lib.[insert name]

Additional context
Would be nice for ox_fuel, allow the player to choosee, instead of the very binary "i'm too poor for the full tank" or "I pay for tank, i fill tank"

@TonybynMp4 TonybynMp4 added the enhancement New feature or request label Feb 28, 2024
@LukeWasTakenn
Copy link
Member

Something like this would probably warrant a new component as the behavior would differ too much to the current progress bar, but I do like the idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants