0.4.1
Loading...
Searching...
No Matches
NAV::gui::widgets::internal Namespace Reference

Functions

template<ImGuiDataType_ _Scalar, unsigned int _Size, typename T, typename U>
InputWithUnitChange InputWithUnit (const char *label, float itemWidth, float unitWidth, T v[_Size], U &combo_current_item, const char *combo_items_separated_by_zeros, T step, T step_fast, const char *format, ImGuiInputTextFlags flags, int combo_popup_max_height_in_items)
 Shows an InputText GUI element to modify the provided value and also set its unit.
 
template<ImGuiDataType_ _Scalar, unsigned int _Size, typename T, typename U>
InputWithUnitChange SliderWithUnit (const char *label, float itemWidth, float unitWidth, T v[_Size], U &combo_current_item, const char *combo_items_separated_by_zeros, T min, T max, const char *format, ImGuiInputTextFlags flags, int combo_popup_max_height_in_items)
 Shows an Slider GUI element to modify the provided value and also set its unit.
 
template<typename U>
InputWithUnitChange Unit (const char *label, float unitWidth, U &combo_current_item, const char *combo_items_separated_by_zeros, int combo_popup_max_height_in_items)
 Shows a Unit input combo.
 

Function Documentation

◆ InputWithUnit()

template<ImGuiDataType_ _Scalar, unsigned int _Size, typename T, typename U>
InputWithUnitChange NAV::gui::widgets::internal::InputWithUnit ( const char * label,
float itemWidth,
float unitWidth,
T v[_Size],
U & combo_current_item,
const char * combo_items_separated_by_zeros,
T step,
T step_fast,
const char * format,
ImGuiInputTextFlags flags,
int combo_popup_max_height_in_items )

Shows an InputText GUI element to modify the provided value and also set its unit.

Parameters
[in]labelLabel to display beside the input. Has to be unique (use # to hide text afterwards to append an uid)
[in]itemWidthWidth of the input element(s) + unit combo
[in]unitWidthWidth of the unit combo
[in,out]vPointer to the value to modify
[in,out]combo_current_itemThe selected item in the unit combo
[in]combo_items_separated_by_zerosItems to display in the unit combo (separated by \0 and ends with \0\0)
[in]stepStep size of the InputText
[in]step_fastFast step size of the InputText
[in]formatPrintf format to display the value with
[in]flagsInputText flags to modify the behavior
[in]combo_popup_max_height_in_itemsMaximum height of the combo in number of items
Returns
Returns if the value or unit was changed

Definition at line 115 of file InputWithUnit.hpp.

◆ SliderWithUnit()

template<ImGuiDataType_ _Scalar, unsigned int _Size, typename T, typename U>
InputWithUnitChange NAV::gui::widgets::internal::SliderWithUnit ( const char * label,
float itemWidth,
float unitWidth,
T v[_Size],
U & combo_current_item,
const char * combo_items_separated_by_zeros,
T min,
T max,
const char * format,
ImGuiInputTextFlags flags,
int combo_popup_max_height_in_items )

Shows an Slider GUI element to modify the provided value and also set its unit.

Parameters
[in]labelLabel to display beside the input. Has to be unique (use # to hide text afterwards to append an uid)
[in]itemWidthWidth of the input element(s) + unit combo
[in]unitWidthWidth of the unit combo
[in,out]vPointer to the value to modify
[in,out]combo_current_itemThe selected item in the unit combo
[in]combo_items_separated_by_zerosItems to display in the unit combo (separated by \0 and ends with \0\0)
[in]minMinimum value allowed
[in]maxMaximum value allowed
[in]formatPrintf format to display the value with
[in]flagsSlider flags to modify the behavior
[in]combo_popup_max_height_in_itemsMaximum height of the combo in number of items
Returns
Returns if the value or unit was changed

Definition at line 158 of file InputWithUnit.hpp.

◆ Unit()

template<typename U>
InputWithUnitChange NAV::gui::widgets::internal::Unit ( const char * label,
float unitWidth,
U & combo_current_item,
const char * combo_items_separated_by_zeros,
int combo_popup_max_height_in_items )

Shows a Unit input combo.

Parameters
[in]labelLabel to display beside the input. Has to be unique (use # to hide text afterwards to append an uid)
unitWidthWidth of the unit combo
combo_current_itemThe selected item in the unit combo
combo_items_separated_by_zerosItems to display in the unit combo (separated by \0 and ends with \0\0)
combo_popup_max_height_in_itemsMaximum height of the combo in number of items
Returns
Returns if the unit was changed

Definition at line 62 of file InputWithUnit.hpp.