Skip to content

Commit

Permalink
shipSelectionScreen: remember last chosen stations
Browse files Browse the repository at this point in the history
  • Loading branch information
Piglit authored and Pithlit committed Jul 4, 2023
1 parent f8145cc commit 47fa79f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/menus/shipSelectionScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,13 @@ CrewPositionSelection::CrewPositionSelection(GuiContainer* owner, string id, int
});
button->setSize(GuiElement::GuiSizeMax, 50);
button->setIcon(getCrewPositionIcon(ECrewPosition(n)));
button->setValue(my_player_info->crew_position[n] & (1 << window_index));
if (my_player_info->crew_position[n] & (1 << window_index)) {
button->setValue(true);
my_player_info->commandSetCrewPosition(window_index, ECrewPosition(n), true);
} else {
button->setValue(false);
my_player_info->commandSetCrewPosition(window_index, ECrewPosition(n), false);
}
crew_position_button[n] = button;
return button;
};
Expand Down

0 comments on commit 47fa79f

Please sign in to comment.