Added documentation for selection_grid.h (#309)
* Added documentation for selection_grid.h * Fix clang-format * Update include/selection_grid.h Co-authored-by: Rickey <ric@rf3.xyz> * Added NULL-checks for selection_grid_move_selection_horz/vert() --------- Co-authored-by: Rickey <ric@rf3.xyz>
This commit is contained in:
@@ -23,6 +23,9 @@ static void selection_grid_process_directional_input(SelectionGrid* selection_gr
|
||||
|
||||
void selection_grid_move_selection_horz(SelectionGrid* selection_grid, int direction_tribool)
|
||||
{
|
||||
if (selection_grid == NULL)
|
||||
return;
|
||||
|
||||
Selection new_selection = selection_grid->selection;
|
||||
new_selection.x += direction_tribool;
|
||||
if (selection_grid->selection.y >= 0 &&
|
||||
@@ -41,6 +44,9 @@ void selection_grid_move_selection_horz(SelectionGrid* selection_grid, int direc
|
||||
|
||||
void selection_grid_move_selection_vert(SelectionGrid* selection_grid, int direction_tribool)
|
||||
{
|
||||
if (selection_grid == NULL)
|
||||
return;
|
||||
|
||||
Selection selection = selection_grid->selection;
|
||||
Selection new_selection = selection;
|
||||
new_selection.y += direction_tribool;
|
||||
|
||||
Reference in New Issue
Block a user