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:
MeirGavish
2025-12-15 21:16:25 -08:00
committed by GitHub
co-authored by Rickey
parent 81e6b7ab31
commit f095bf7024
2 changed files with 109 additions and 6 deletions
+6
View File
@@ -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;