|
3430 | 3430 | </ItemsControl.ItemContainerStyle>
|
3431 | 3431 | </ItemsControl>
|
3432 | 3432 | </DataTemplate>
|
| 3433 | + |
| 3434 | + <DataTemplate x:Key="DamageStatParamsTemplate"> |
| 3435 | + <ItemsControl Visibility="{Binding CalculationParameters.Count, Converter={StaticResource CountToVisibilityConverter}}" ItemsSource="{Binding CalculationParameters}" Margin="0,20,0,0" AlternationCount="{Binding CalculationParameters.Count}"> |
| 3436 | + <ItemsControl.ItemTemplate> |
| 3437 | + <DataTemplate> |
| 3438 | + <Grid MinWidth="{StaticResource StatTooltipMinWidth}"> |
| 3439 | + <Grid.Resources> |
| 3440 | + <Style TargetType="TextBlock" BasedOn="{StaticResource TooltipCtxTransStringBodyStyle}"/> |
| 3441 | + </Grid.Resources> |
| 3442 | + <Grid.ColumnDefinitions> |
| 3443 | + <ColumnDefinition Width="Auto"/> |
| 3444 | + <ColumnDefinition Width="*"/> |
| 3445 | + </Grid.ColumnDefinitions> |
| 3446 | + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Column="0"> |
| 3447 | + <TextBlock x:Name="additionSign" Text="+" Visibility="Collapsed" Foreground="{DynamicResource TooltipColor.Secondary}"/> |
| 3448 | + <TextBlock x:Name="statValue" Foreground="{DynamicResource TooltipColor.Secondary}" ls:TextBlockFormatter.SourceText="{Binding Value}" Margin="0,0,11,0"/> |
| 3449 | + <TextBlock ls:TextBlockFormatter.SourceText="{Binding Description}"> |
| 3450 | + <TextBlock.Resources> |
| 3451 | + <Style TargetType="ls:LSSpan" BasedOn="{StaticResource BaseSpanStyle}"> |
| 3452 | + <Style.Triggers> |
| 3453 | + <Trigger Property="TagType" Value="Damage"> |
| 3454 | + <Setter Property="Foreground" Value="{DynamicResource TooltipColor.Secondary}"/> |
| 3455 | + </Trigger> |
| 3456 | + </Style.Triggers> |
| 3457 | + </Style> |
| 3458 | + </TextBlock.Resources> |
| 3459 | + </TextBlock> |
| 3460 | + </StackPanel> |
| 3461 | + <TextBlock Text="{Binding SourceName}" HorizontalAlignment="Right" Grid.Column="1"/> |
| 3462 | + </Grid> |
| 3463 | + <DataTemplate.Triggers> |
| 3464 | + <DataTrigger Binding="{Binding Value, Converter={StaticResource GreaterThanConverter}, ConverterParameter='-1'}" Value="True"> |
| 3465 | + <Setter TargetName="additionSign" Property="Visibility" Value="Visible"/> |
| 3466 | + </DataTrigger> |
| 3467 | + <DataTrigger Binding="{Binding Value}" Value="0"> |
| 3468 | + <Setter TargetName="statValue" Property="Visibility" Value="Collapsed"/> |
| 3469 | + <Setter TargetName="additionSign" Property="Visibility" Value="Collapsed"/> |
| 3470 | + </DataTrigger> |
| 3471 | + </DataTemplate.Triggers> |
| 3472 | + </DataTemplate> |
| 3473 | + </ItemsControl.ItemTemplate> |
| 3474 | + </ItemsControl> |
| 3475 | + </DataTemplate> |
3433 | 3476 |
|
3434 | 3477 | <DataTemplate x:Key="VMStatTooltip">
|
3435 | 3478 | <StackPanel DataContext="{Binding Path=(ls:TooltipExtender.Data) , RelativeSource={RelativeSource Mode=TemplatedParent}}" ls:TooltipExtender.Owner="{Binding Path=(ls:TooltipExtender.Owner) , RelativeSource={RelativeSource Mode=TemplatedParent}}">
|
|
3439 | 3482 | </DataTemplate>
|
3440 | 3483 |
|
3441 | 3484 |
|
| 3485 | + <DataTemplate x:Key="VMDamageStatTooltip"> |
| 3486 | + <StackPanel DataContext="{Binding Path=(ls:TooltipExtender.Data) , RelativeSource={RelativeSource Mode=TemplatedParent}}" ls:TooltipExtender.Owner="{Binding Path=(ls:TooltipExtender.Owner) , RelativeSource={RelativeSource Mode=TemplatedParent}}"> |
| 3487 | + <TextBlock Style="{StaticResource TooltipDescriptionStyle}" ls:TextBlockFormatter.SourceText="{Binding Description}" Width="Auto" MaxWidth="{DynamicResource MaxWideTooltipContentWidth}"/> |
| 3488 | + <ContentControl Content="{Binding .}" ContentTemplate="{StaticResource DamageStatParamsTemplate}" Width="{DynamicResource MaxWideTooltipContentWidth}" Visibility="{Binding CalculationParameters.Count, Converter={StaticResource CountToVisibilityConverter}}"/> |
| 3489 | + </StackPanel> |
| 3490 | + </DataTemplate> |
| 3491 | + |
3442 | 3492 | <DataTemplate DataType="{x:Type ls:VMStat}">
|
3443 | 3493 | <ContentPresenter x:Name="root" Content="{Binding DataContext}" ContentTemplate="{StaticResource VMStatTooltip}"/>
|
| 3494 | + <DataTemplate.Triggers> |
| 3495 | + <DataTrigger Binding="{Binding IDString}" Value="AttackBonus"> |
| 3496 | + <Setter TargetName="root" Property="ContentTemplate" Value="{StaticResource VMDamageStatTooltip}"/> |
| 3497 | + </DataTrigger> |
| 3498 | + <DataTrigger Binding="{Binding IDString}" Value="EquippedWeaponDamage"> |
| 3499 | + <Setter TargetName="root" Property="ContentTemplate" Value="{StaticResource VMDamageStatTooltip}"/> |
| 3500 | + </DataTrigger> |
| 3501 | + </DataTemplate.Triggers> |
3444 | 3502 | </DataTemplate>
|
3445 | 3503 |
|
3446 | 3504 |
|
|
6344 | 6402 | <TextBlock Style="{StaticResource TooltipSpecialDescriptionStyle}" ls:TextBlockFormatter.SourceText="{Binding LoreDescription.Str}" ls:AttachedProperties.InheritedTag="{Binding ElementName=DecorationImage}" Margin="0,8,0,16"/>
|
6345 | 6403 | </ContentControl>
|
6346 | 6404 |
|
6347 |
| - <ContentControl x:Name="footer" Template="{StaticResource TooltipStripBottomTemplate}" Visibility="Collapsed" ContentTemplate="{StaticResource FooterCosts}" Content="{Binding CostSummary}" /> |
| 6405 | + <ContentControl x:Name="footer" Template="{StaticResource TooltipStripBottomTemplate}" Visibility="{Binding CostSummary.Count, Converter={StaticResource CountToVisibilityConverter}}" ContentTemplate="{StaticResource FooterCosts}" Content="{Binding CostSummary}" /> |
6348 | 6406 | </StackPanel>
|
6349 | 6407 | </Grid>
|
6350 | 6408 |
|
|
0 commit comments