Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Functions
Controller Test

Configuration tool to generate and test controller mappings.

Functions

void showCombo (const std::string &label, const int count, const std::string &prefix, int &currentId)
 Display a numbered combo list for a given button or axis mapping. More...
 
void drawButton (ImDrawList *drawList, const Controller::Input bid, const ImVec2 &pos, const ImU32 highlightColor)
 Draw raw geometry for highlighting a given controller button. More...
 
void drawPadTarget (const int idX, const int idY, const std::vector< float > &axesValues, const float threshRadius)
 Draw a target circle and threshold along with the current pad position. More...
 
void drawTriggerTarget (const int idT, const std::vector< float > &axesValues, const float threshRadius)
 Draw a target line and threshold along with the current trigger position. More...
 
int main (int argc, char **argv)
 

Function Documentation

◆ drawButton()

void drawButton ( ImDrawList *  drawList,
const Controller::Input  bid,
const ImVec2 &  pos,
const ImU32  highlightColor 
)

Draw raw geometry for highlighting a given controller button.

Parameters
drawListthe ImGui drawing list to use
bidthe ID of the button to draw
posthe reference position on screen (upper-left corner of the controller overlay)
highlightColorthe color to use for the highlight

◆ drawPadTarget()

void drawPadTarget ( const int  idX,
const int  idY,
const std::vector< float > &  axesValues,
const float  threshRadius 
)

Draw a target circle and threshold along with the current pad position.

Parameters
idXthe ID of the horizontal axis
idYthe ID of the vertical axis
axesValuesthe axes raw values
threshRadiusthe radius of the filtering threshold

◆ drawTriggerTarget()

void drawTriggerTarget ( const int  idT,
const std::vector< float > &  axesValues,
const float  threshRadius 
)

Draw a target line and threshold along with the current trigger position.

Parameters
idTthe ID of the trigger axis
axesValuesthe axes raw values
threshRadiusthe value of the filtering threshold

◆ main()

int main ( int  argc,
char **  argv 
)

The main function of the controller tester.

Parameters
argcthe number of input arguments.
argva pointer to the raw input arguments.
Returns
a general error code.

◆ showCombo()

void showCombo ( const std::string &  label,
const int  count,
const std::string &  prefix,
int &  currentId 
)

Display a numbered combo list for a given button or axis mapping.

Parameters
labeltitle of the combo
countnumber of items
prefixprefix to apply to each item in the list
currentIdthe currently selected item