Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

[Suggestion] ProgressBar as an input #506

@TonybynMp4

Description

@TonybynMp4

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions