public void Draw(SpriteBatch spriteBatch) { var person = _uiState.ActiveActor?.Actor?.Person; if (person is null) { return; } var conditionsModule = person.GetModule <IConditionsModule>(); var conditionIndex = 0; var items = conditionsModule.Items; foreach (var condition in items) { var iconX = conditionIndex * (ICON_SIZE + ICON_SPACING) + _screenX; var iconTextures = _uiContentStorage.GetConditionIconTextures(condition); DrawIconBackground(spriteBatch, iconX, iconTextures.Background); DrawIcon(spriteBatch, iconX, iconTextures.Icon); conditionIndex++; } DrawHintIfSelected(spriteBatch); }
public void Draw(SpriteBatch spriteBatch) { var person = _uiState.ActiveActor?.Actor?.Person; if (person is null) { return; } var conditionsModule = person.GetModule <IConditionsModule>(); var items = conditionsModule.Items; var itemsList = items.ToArray(); for (var conditionIndex = 0; conditionIndex < itemsList.Length; conditionIndex++) { var condition = itemsList[conditionIndex]; var iconX = conditionIndex * (ICON_SIZE + ICON_SPACING) + _screenX; var iconTextures = _uiContentStorage.GetConditionIconTextures(condition); DrawIconBackground(spriteBatch, iconX, iconTextures.Background); DrawIcon(spriteBatch, iconX, iconTextures.Icon); if (_alertedConditions.Contains(condition)) { spriteBatch.Draw(_alertTexture, new Vector2(iconX - ICON_SPACING, _screenY - ICON_SPACING), Color.White); } } DrawHintIfSelected(spriteBatch); }