Skip to content

Slider 2D & Slider 3D #3484

@soufianekhiat

Description

@soufianekhiat

Hello,

Here an example of an implementation of a slider 2D & slider 3D.
Usage:

bool SliderScalar2D(char const* pLabel, float* pValueX, float* pValueY, float const fMinX, float const fMaxX, float const fMinY, float const fMaxY, float const fScale = 1.0f);
bool SliderScalar3D(char const* pLabel, float* pValueX, float* pValueY, float* pValueZ, float const fMinX, float const fMaxX, float const fMinY, float const fMaxY, float const fMinZ, float const fMaxZ, float const fScale = 1.0f);

bool InputVec2(const char* label, ImVec2* value, ImVec2 const vMinValue, ImVec2 const vMaxValue, float const fScale = 1.0f);
bool InputVec3(const char* label, ImVec4* value, ImVec4 const vMinValue, ImVec4 const vMaxValue, float const fScale = 1.0f);

Core available here.

Results:
iK8hn7V87Z

Possible improvement:

  • Move graphical choose to style (thickness, color, ...)
  • Make the visibility of "Values" optionnal

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions