|
1184 | 1184 | </ControlTemplate.Triggers>
|
1185 | 1185 | </ControlTemplate>
|
1186 | 1186 |
|
1187 |
| - <!--Inventory Grid--> |
1188 |
| - <Style TargetType="ListBox" x:Key="InventoryGrid" BasedOn="{StaticResource {x:Type ListBox}}"> |
1189 |
| - <Setter Property="Background" Value="Transparent" /> |
1190 |
| - <Setter Property="BorderBrush" Value="Transparent" /> |
1191 |
| - <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Visible" /> |
1192 |
| - <Setter Property="ItemsPanel" > |
1193 |
| - <Setter.Value> |
1194 |
| - <ItemsPanelTemplate> |
1195 |
| - <ls:LSGrid x:Name="InvGrid" Background="{StaticResource InventoryCell2x2Brush}" noesis:Element.PPAAMode="Disabled" SnapsToDevicePixels="True" ContainerData="{Binding }" Columns="{DynamicResource invCols}" Rows="{DynamicResource invRows}" ScrollAmount="114" CellWidth="{DynamicResource InvSlotSize}" CellHeight="{DynamicResource InvSlotSize}" VerticalSpacing="{DynamicResource InvSpacing}" HorizontalSpacing="{DynamicResource InvSpacing}" ActionUpEvent="UIUp" ActionDownEvent="UIDown" ActionRightEvent="UIRight" ActionLeftEvent="UILeft"> |
1196 |
| - <ls:LSGrid.Style> |
1197 |
| - <Style TargetType="ls:LSGrid"> |
1198 |
| - <Setter Property="Margin" Value="0,4,0,0" /> |
1199 |
| - <Style.Triggers> |
1200 |
| - <DataTrigger Binding="{Binding DataContext.Data.UIInputMethod, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}" Value="Controller"> |
1201 |
| - <Setter Property="Margin" Value="0,0,0,0" /> |
1202 |
| - </DataTrigger> |
1203 |
| - </Style.Triggers> |
1204 |
| - </Style> |
1205 |
| - </ls:LSGrid.Style> |
1206 |
| - <b:Interaction.Behaviors> |
1207 |
| - <ls:DropOnInventoryGridBehavior DropCommand="{Binding DataContext.DropOnInventorySlotCommand, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}"/> |
1208 |
| - <ls:DragGameObjectGridBehavior/> |
1209 |
| - </b:Interaction.Behaviors> |
1210 |
| - <b:Interaction.Triggers> |
1211 |
| - <b:EventTrigger EventName="WidgetClosing"> |
1212 |
| - <b:InvokeCommandAction Command="{Binding DataContext.ClearInventoryNewFlags, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}" CommandParameter="{Binding }"/> |
1213 |
| - </b:EventTrigger> |
1214 |
| - </b:Interaction.Triggers> |
1215 |
| - </ls:LSGrid> |
1216 |
| - </ItemsPanelTemplate> |
1217 |
| - </Setter.Value> |
1218 |
| - </Setter> |
1219 |
| - <Setter Property="ItemContainerStyle"> |
1220 |
| - <Setter.Value> |
1221 |
| - <Style TargetType="ListBoxItem"> |
1222 |
| - <Setter Property="Template" Value="{StaticResource InventoryCellTemplate}" /> |
1223 |
| - <Setter Property="BorderBrush" Value="Transparent" /> |
1224 |
| - <Setter Property="Background" Value="Transparent" /> |
1225 |
| - <Setter Property="Width" Value="{DynamicResource InvSlotSize}" /> |
1226 |
| - <Setter Property="Height" Value="{DynamicResource InvSlotSize}" /> |
1227 |
| - <Setter Property="Padding" Value="0" /> |
1228 |
| - <Setter Property="BorderThickness" Value="0" /> |
1229 |
| - <Setter Property="VerticalContentAlignment" Value="Top"/> |
1230 |
| - <Style.Triggers> |
1231 |
| - <Trigger Property="IsSelected" Value="True"> |
1232 |
| - <Setter Property="BorderBrush" Value="Transparent" /> |
1233 |
| - <Setter Property="Background" Value="Transparent" /> |
1234 |
| - </Trigger> |
1235 |
| - <Trigger Property="IsMouseOver" Value="True"> |
1236 |
| - <Setter Property="BorderBrush" Value="Transparent" /> |
1237 |
| - <Setter Property="Background" Value="Transparent" /> |
1238 |
| - </Trigger> |
1239 |
| - </Style.Triggers> |
1240 |
| - </Style> |
1241 |
| - </Setter.Value> |
1242 |
| - </Setter> |
1243 |
| - </Style> |
1244 |
| - |
1245 | 1187 | <!--interrupts-->
|
1246 | 1188 | <BitmapImage x:Key="QuestionMarkIcon" UriSource="pack://application:,,,/GustavNoesisGUI;component/Assets/Reactions_c/c_ico_reactionAsk_active.png"/>
|
1247 | 1189 |
|
|
1838 | 1780 |
|
1839 | 1781 | <Grid x:Name="Slot" ToolTipService.Placement="Top" ToolTipService.IsEnabled="True" Tag="{Binding IsActive, FallbackValue=False}" ToolTipService.ShowOnDisabled="True" Background="Transparent">
|
1840 | 1782 | <Grid.ToolTip>
|
1841 |
| - <ls:LSTooltip x:Name="hbTooltip" Content="{Binding DataContext.Spell, ElementName=Slot}" ls:TooltipExtender.Context="Hotbar" VerticalOffset="-60" /> |
| 1783 | + <ls:LSTooltip x:Name="hbTooltip" Content="{Binding DataContext.Spell, ElementName=Slot}" ls:TooltipExtender.Context="Hotbar" VerticalOffset="-60"/> |
1842 | 1784 | </Grid.ToolTip>
|
1843 | 1785 | <b:Interaction.Triggers>
|
1844 | 1786 | <b:EventTrigger EventName="MouseEnter">
|
1845 |
| - <b:InvokeCommandAction Command="{Binding DataContext.HighlightResourcesCommand, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}" CommandParameter="{Binding}"/> |
1846 |
| - <b:InvokeCommandAction Command="{Binding DataContext.RemoveIsNewFlag, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}" CommandParameter="{Binding}"/> |
| 1787 | + <b:InvokeCommandAction Command="{Binding (ls:WidgetData.DataContext).HighlightResourcesCommand, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="{Binding}"/> |
| 1788 | + <b:InvokeCommandAction Command="{Binding (ls:WidgetData.DataContext).RemoveIsNewFlag, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="{Binding}"/> |
1847 | 1789 | </b:EventTrigger>
|
1848 | 1790 | <b:EventTrigger EventName="MouseEnter">
|
1849 | 1791 | <b:Interaction.Behaviors>
|
|
1853 | 1795 | </b:ConditionalExpression>
|
1854 | 1796 | </b:ConditionBehavior>
|
1855 | 1797 | </b:Interaction.Behaviors>
|
1856 |
| - <b:InvokeCommandAction Command="{Binding DataContext.SetDebugUIEntityCommand, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}" CommandParameter="{Binding GameObject.EntityHandle}"/> |
| 1798 | + <b:InvokeCommandAction Command="{Binding (ls:WidgetData.DataContext).SetDebugUIEntityCommand, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="{Binding GameObject.EntityHandle}"/> |
1857 | 1799 | </b:EventTrigger>
|
1858 | 1800 | <b:EventTrigger EventName="MouseLeave">
|
1859 |
| - <b:InvokeCommandAction Command="{Binding DataContext.ClearResourceHighlightsCommand, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}" CommandParameter="{Binding}"/> |
| 1801 | + <b:InvokeCommandAction Command="{Binding (ls:WidgetData.DataContext).ClearResourceHighlightsCommand, RelativeSource={RelativeSource TemplatedParent}}" CommandParameter="{Binding}"/> |
1860 | 1802 | </b:EventTrigger>
|
1861 | 1803 | <b:EventTrigger EventName="MouseLeave">
|
1862 | 1804 | <b:Interaction.Behaviors>
|
|
1866 | 1808 | </b:ConditionalExpression>
|
1867 | 1809 | </b:ConditionBehavior>
|
1868 | 1810 | </b:Interaction.Behaviors>
|
1869 |
| - <b:InvokeCommandAction Command="{Binding DataContext.ClearDebugUIEntityCommand, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}"/> |
| 1811 | + <b:InvokeCommandAction Command="{Binding (ls:WidgetData.DataContext).ClearDebugUIEntityCommand, RelativeSource={RelativeSource TemplatedParent}}"/> |
1870 | 1812 | </b:EventTrigger>
|
1871 | 1813 | <b:EventTrigger EventName="Unloaded">
|
1872 | 1814 | <b:ChangePropertyAction TargetName="HotbarslotBtn" PropertyName="CommandParameter" Value="{x:Null}"/>
|
|
1919 | 1861 |
|
1920 | 1862 | <!-- Icon glow animation slot (Metamagic, UnlockSpellVariant) -->
|
1921 | 1863 | <Control x:Name="MetaMagicOverlay" IsHitTestVisible="False" Width="{StaticResource HotBarSlotWidth}" Height="{StaticResource HotBarSlotHeight}" Template="{x:Null}"/>
|
1922 |
| - <TextBlock x:Name="HotKey" IsHitTestVisible="False" Text="{Binding HotKey}" Margin="4,0,0,-6" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="{StaticResource ScaledSmallFontSize}" Visibility="Collapsed" /> |
| 1864 | + <TextBlock x:Name="HotKey" IsHitTestVisible="False" Text="{Binding HotKey}" Margin="4,0,0,-6" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="{StaticResource ScaledSmallFontSize}"/> |
1923 | 1865 |
|
1924 | 1866 | </Grid>
|
1925 | 1867 | <ControlTemplate.Triggers>
|
|
1957 | 1899 | </Setter.Value>
|
1958 | 1900 | </Setter>
|
1959 | 1901 | </DataTrigger>
|
1960 |
| - <DataTrigger Binding="{Binding DataContext.Data.UIInputMethod, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}" Value="Keyboard"> |
1961 |
| - <Setter Property="Visibility" Value="Visible" TargetName="HotKey"/> |
1962 |
| - </DataTrigger> |
1963 | 1902 |
|
1964 | 1903 | <DataTrigger Binding="{Binding Name}" Value="">
|
1965 | 1904 | <Setter Property="IsEnabled" Value="False"/>
|
|
1975 | 1914 | <MultiDataTrigger.Conditions>
|
1976 | 1915 | <Condition Binding="{Binding CanUse}" Value="False"/>
|
1977 | 1916 | <Condition Binding="{Binding Spell.IsContainer}" Value="True"/>
|
1978 |
| - <Condition Binding="{Binding DataContext.PanelContentType, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}" Value="Spell"/> |
| 1917 | + <Condition Binding="{Binding (ls:WidgetData.DataContext).PanelContentType, RelativeSource={RelativeSource TemplatedParent}}" Value="Spell"/> |
1979 | 1918 | </MultiDataTrigger.Conditions>
|
1980 | 1919 | <Setter Property="Command" Value="{x:Null}"/>
|
1981 | 1920 | </MultiDataTrigger>
|
|
2054 | 1993 | <MultiDataTrigger>
|
2055 | 1994 | <MultiDataTrigger.Conditions>
|
2056 | 1995 | <Condition Binding="{Binding Spell.WeaponActionType}" Value="Melee"/>
|
2057 |
| - <Condition Binding="{Binding DataContext.CurrentPlayer.SelectedCharacter.Equipment.MeleeMainHand, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}, Converter={StaticResource NullToBoolFalseConverter}}" Value="True"/> |
| 1996 | + <Condition Binding="{Binding (ls:WidgetData.DataContext).CurrentPlayer.SelectedCharacter.Equipment.MeleeMainHand, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource NullToBoolFalseConverter}}" Value="True"/> |
2058 | 1997 | </MultiDataTrigger.Conditions>
|
2059 |
| - <Setter Property="Command" Value="{Binding DataContext.UseMeleeWeaponCommand, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}"/> |
| 1998 | + <Setter Property="Command" Value="{Binding (ls:WidgetData.DataContext).UseMeleeWeaponCommand, RelativeSource={RelativeSource TemplatedParent}}"/> |
2060 | 1999 | <Setter Property="CommandParameter" Value="{Binding .}"/>
|
2061 | 2000 | </MultiDataTrigger>
|
2062 | 2001 | <MultiDataTrigger>
|
2063 | 2002 | <MultiDataTrigger.Conditions>
|
2064 | 2003 | <Condition Binding="{Binding Spell.WeaponActionType}" Value="Ranged"/>
|
2065 |
| - <Condition Binding="{Binding DataContext.CurrentPlayer.SelectedCharacter.Equipment.RangedMainHand, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}, Converter={StaticResource NullToBoolFalseConverter}}" Value="True"/> |
| 2004 | + <Condition Binding="{Binding (ls:WidgetData.DataContext).CurrentPlayer.SelectedCharacter.Equipment.RangedMainHand, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource NullToBoolFalseConverter}}" Value="True"/> |
2066 | 2005 | </MultiDataTrigger.Conditions>
|
2067 |
| - <Setter Property="Command" Value="{Binding DataContext.UseRangedWeaponCommand, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}"/> |
| 2006 | + <Setter Property="Command" Value="{Binding (ls:WidgetData.DataContext).UseRangedWeaponCommand, RelativeSource={RelativeSource TemplatedParent}}"/> |
2068 | 2007 | <Setter Property="CommandParameter" Value="{Binding .}"/>
|
2069 | 2008 | </MultiDataTrigger>
|
2070 | 2009 |
|
|
2073 | 2012 | <MultiDataTrigger.Conditions>
|
2074 | 2013 | <Condition Binding="{Binding SlotType}" Value="Item"/>
|
2075 | 2014 | <Condition Binding="{Binding GameObject.UseType}" Value="Arrow"/>
|
2076 |
| - <Condition Binding="{Binding DataContext.CurrentPlayer.SelectedCharacter.Equipment.RangedMainHand, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}, Converter={StaticResource NullToBoolFalseConverter}}" Value="True"/> |
| 2015 | + <Condition Binding="{Binding (ls:WidgetData.DataContext).CurrentPlayer.SelectedCharacter.Equipment.RangedMainHand, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource NullToBoolFalseConverter}}" Value="True"/> |
2077 | 2016 | </MultiDataTrigger.Conditions>
|
2078 |
| - <Setter Property="Command" Value="{Binding DataContext.UseRangedWeaponCommand, RelativeSource={RelativeSource AncestorType={x:Type ls:UIWidget}}}"/> |
| 2017 | + <Setter Property="Command" Value="{Binding (ls:WidgetData.DataContext).UseRangedWeaponCommand, RelativeSource={RelativeSource TemplatedParent}}"/> |
2079 | 2018 | <Setter Property="CommandParameter" Value="{Binding .}"/>
|
2080 | 2019 | </MultiDataTrigger>
|
2081 | 2020 | </Style.Triggers>
|
|
0 commit comments