Forums

Testing Feeback
Last Post 19 Sep 2014 05:23 PM by gogman. 56 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Page 1 of 3123 > >>
Author Messages
BamYaziUser is Offline
New Member
New Member
Posts:42


--
02 Jul 2014 06:20 PM
    This is a great start - Everything I wanted from a XAML based UI (with the added bonus of not having to write it myself).

    Some results from a quick test this evening, I'll do some more after dinner...

    Stretch Parameter on Image doesn't appear to work
    Textbox text is hidden when rendered over 3D background (Depth issue ?) - Only affects textbox.
    (I Tried adding Platform.Instance.GraphicsDevice.DepthStencilState = DepthStencilState.None; before UI.Draw - no change)
    Texbox cursor floats over the middle of the character rather on it's right edge
    Right & Middle click causes argument out of range exception @ UI.UpdateInput

    And some nice to have features that spring to mind...

    Automatic generation of spritefont descriptions would be really nice
    Changes to XAML files don't trigger a rebuild of the UserInterface project (need to to a full rebuild, although this might just be down to my project configuration)

    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    02 Jul 2014 07:18 PM
    <Border Background="Red" Grid.Row="1" BorderBrush="Green" BorderThickness="4" Padding="10">
    <Border.Style>
    <Style TargetType="Border">
    <Style.Triggers>
    <Trigger Property="IsMouseOver" Value="True">
    <Setter Property="BorderBrush" Value="Red" />
    </Trigger>
    </Style.Triggers>
    </Style>
    </Border.Style>
    <TextBox Text="Hello World" Foreground="Black" Background="White" />
    </Border>

    Not sure whether this one is correct behavior, i need to test it in WPF, but the border changes correctly as i move the mouse in, but then changes back when it's over the textbox - I'd have expected IsMouseOver to remain true for the border since the textbox is a child, but as i say i've not checked in WPF to verify the behavior there.

    But just the fact that you've even got XAML triggers is cool
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    02 Jul 2014 07:31 PM

    1) Stretch Parameter on Image doesn't appear to work
    2) Textbox text is hidden when rendered over 3D background (Depth issue ?) - Only affects textbox.
    3) Texbox cursor floats over the middle of the character rather on it's right edge
    4) Right & Middle click causes argument out of range exception @ UI.UpdateInput

    And some nice to have features that spring to mind...

    5) Automatic generation of spritefont descriptions would be really nice
    6) Changes to XAML files don't trigger a rebuild of the UserInterface project (need to to a full rebuild, although this might just be down to my project configuration)


    ad 1) on the feature list, I will give that higher priority
    ad 2-4) will check that out

    ad 5) already supported, if you use some font in XAML, it will generate spritefont xml based on family name, font size and style (only XNA styles are supported). Xml is generated in asset directory (3rd parameter of UI generator). All you have to do is, add this file to your content project and build it.

    ad 6) yeah, i solved this by project settings for now. Set project dependency on your "GameLibrary" with generated UI. Project context menu, Build Dependencies, Project Dependencies. You can check that in examples.
    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    02 Jul 2014 08:36 PM
    5) Nice, i can see that's working Visual Studio just wasn't updating Solution Explorer - cool feature!
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    03 Jul 2014 06:56 AM
    I fixed #2 and #4.

    ad 3) what font and size do you use? did you import it with nuclex?
    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    03 Jul 2014 08:37 AM
    re. MouseOver comments above....I've checked in WPF and IsMouseOver should be true for the border while it is over the textbox, although the above code won't work at all in WPF since setting a local borderbrush value on the border take precedence over the trigger. Correct XAML should be

    <Border BorderThickness="10" Padding="20">
    <Border.Style>
    <Style TargetType="Border">
    <Setter Property="BorderBrush" Value="Red" />
    <Style.Triggers>
    <Trigger Property="IsMouseOver" Value="True">
    <Setter Property="BorderBrush" Value="Green" />
    </Trigger>
    </Style.Triggers>
    </Style>
    </Border.Style>
    <TextBox Text="TEST" />
    </Border>

    Interestingly in this case WPF doesn't treat the padding Area as part of the border so IsMouseOver is true while the mouse is over the actual border, false in the paddinig area and true again over the textbox...
    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    14 Jul 2014 02:38 PM
    Although BitmapImage resource now work fine, I can't get the following trigger to work

                <Image Name="logo" HorizontalAlignment="Center" >
                    <Image.Style>
                        <Style TargetType="Image">
                            <Setter Property="Source" Value="{StaticResource invlogo}" />
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Source" Value="{StaticResource logo}" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Style>
                </Image>
     


    However this type of trigger works fine on other elements eg.

                <TextBlock TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center" 
                       FontSize="15pt" FontWeight="Bold" FontFamily="Segoe UI" Foreground="LightGray" >
                    <TextBlock.Style>
                        <Style TargetType="TextBlock">
                            <Setter Property="Text" Value="WORLD" />
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Text" Value="HELLO WORLD" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </TextBlock.Style>
                </TextBlock>
     
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    14 Jul 2014 03:13 PM
    i will check that out, thanks for reporting
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    16 Jul 2014 12:15 PM
    ok, fixed it tho, version v0.9.3.3b
    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    16 Jul 2014 02:02 PM
    Just tested it and it's working great - thanks
    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    17 Jul 2014 01:27 PM
    <Button Content="Brush" Command="{Binding PickBrushCommand}" IsEnabled="{Binding ToolbarEnabled}" />


    If i have a button with a binding on IsEnabled as above the command is never called even when ToolbarEnabled is true. The button renders as enabled but behaves as
    if it is disabled. This only occurs if you use a binding on IsEnabled everything works correctly if you just use IsEnabled="True"
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    17 Jul 2014 03:36 PM
    fixed in latest version
    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    20 Jul 2014 04:54 PM
    Hi, I'm getting a peculiar issue with building images where the generator appears to be ignoring the input folder and looking for a file under the generator folder

    C:\Users\bamya_000>C:\_DEVELOPMENT\Enchilada\CastleSmashers\UserInterface\..\..\
    EmptyKeys\EmptyKeysUI\Generator\ekUIGen.exe C:\_DEVELOPMENT\Enchilada\CastleSmas
    hers\UserInterface\ C:\_DEVELOPMENT\Enchilada\CastleSmashers\UserInterface\..\Ga
    meLibrary\GeneratedUI C:\_DEVELOPMENT\Enchilada\CastleSmashers\UserInterface\..\
    GameContent /sb
    Empty Keys (c) 2014 User Interface Generator Console v0.9.3.0

    Generating C:\_DEVELOPMENT\Enchilada\CastleSmashers\UserInterface\BasicUI.xaml

    Generating C:\_DEVELOPMENT\Enchilada\CastleSmashers\UserInterface\Dictionary.xam
    l

    Generating C:\_DEVELOPMENT\Enchilada\CastleSmashers\UserInterface\MapEditorUI.xa
    ml
    Generating Fonts...
    Font Segoe UI , size 10, style Regular generated to file C:\_DEVELOPMENT\Enchila
    da\CastleSmashers\UserInterface\..\GameContent\Segoe_UI_10_Regular.spritefont
    Font Segoe UI , size 15, style Bold generated to file C:\_DEVELOPMENT\Enchilada\
    CastleSmashers\UserInterface\..\GameContent\Segoe_UI_15_Bold.spritefont
    Error while copying image asset: Images\tb_save.png
    System.IO.FileNotFoundException: Could not find file 'C:\_DEVELOPMENT\Enchilada\
    EmptyKeys\EmptyKeysUI\Generator\Images\tb_save.png'.
    File name: 'C:\_DEVELOPMENT\Enchilada\EmptyKeys\EmptyKeysUI\Generator\Images\tb_
    save.png'
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Bo
    olean overwrite, Boolean checkHost)
    at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean ov
    erwrite)
    at EmptyKeys.UserInterface.Generator.ImageAssets.CopyImagesToAssetDirectory(S
    tring assetsDirectory)
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    20 Jul 2014 05:03 PM
    yup, that's why XAML project output is directed there (in example) and images have to be Content with Copy if new. The problem lies with XAML reader. I didn't find the way to redirect loading other assemblies/images/dictionaries. Nothing was working. So yeah, XAML output must be in generator directory, including images.
    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    20 Jul 2014 05:11 PM
    Ahh ok that fixed it...thanks for the speedy reply.
    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    22 Jul 2014 09:50 AM
    Found a "bug" that's been driving me crazy for a couple of days....

    If you have 2 buttons with command bindings, where the first binding matches a relay command in the view modlel, but the 2nd one is bound to a command name that doesn't exist in the model. The view will initially render correctly, however if your first button contains an action which causes a Measure/Arrange then you get an Object not found exception. It's obviously easy to fix when you discover what causes it by ensuring that all
    command binding declaratons are backed with actual RelayCommands in the viewmodel, but should just fail gracefully and ignore the binding if it doesn't exist as happens when the view is first rendered.

    If you need me to put togeather a repro example, let me know.

    Stack Trace :

    at EmptyKeys.UserInterface.Data.BindingExpression./*ѱ(Object 00472*/, PropertyChangedEventArgs 00473*/)
    at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
    at EmptyKeys.UserInterface.Mvvm.ViewModelBase.RaisePropertyChanged(String propertyName)
    at EmptyKeys.UserInterface.Mvvm.ViewModelBase.SetProperty[T](T& storage, T value, String propertyName)
    at GameLibrary.ViewModels.MapEditorViewModel.set_BrushPickerVisibility(Visibility value) in c:\_DEVELOPMENT\Misc\Enchilada\CastleSmashers\GameLibrary\ViewModels\MapEditorViewModel.cs:line 32
    at GameLibrary.ViewModels.MapEditorViewModel.PickBrush(Object val) in c:\_DEVELOPMENT\Misc\Enchilada\CastleSmashers\GameLibrary\ViewModels\MapEditorViewModel.cs:line 53
    at EmptyKeys.UserInterface.Input.RelayCommand.Execute(Object parameter)
    at EmptyKeys.UserInterface.Input.CommandHelpers.ExecuteCommandSource(ICommandSource 00528*/)
    at EmptyKeys.UserInterface.Controls.Button.OnClick()
    at EmptyKeys.UserInterface.Controls.Button.OnMouseDown(MouseButtonEventArgs e)
    at EmptyKeys.UserInterface.UIElement./* (Object 00089*/, MouseButtonEventArgs 0008A*/)
    at EmptyKeys.UserInterface.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate handler, Object target)
    at EmptyKeys.UserInterface.RoutedEventArgs.InvokeHandler(Delegate 001CA*/, Object 001CB*/)
    at EmptyKeys.UserInterface./\*֡.InvokeHandler(RoutedEventArgs 005A0*/)
    at EmptyKeys.UserInterface.EventRoute.InvokeHandlers(Object 00498*/, RoutedEventArgs 00499*/)
    at EmptyKeys.UserInterface.UIElement.RaiseEventImpl(DependencyObject 000C7*/, RoutedEventArgs 000C8*/)
    at EmptyKeys.UserInterface.UIElement.RaiseEvent(RoutedEventArgs e)
    at EmptyKeys.UserInterface.Input.Mouse./*Ֆ(MouseButton 00557*/, ButtonInputListener 00558*/)
    at EmptyKeys.UserInterface.Input.Mouse./*Օ()
    at EmptyKeys.UserInterface.Input.ButtonInputListener.OnUpdate()
    at EmptyKeys.UserInterface.Input.InputListener`1.Update(Double elapsedGameTime)
    at EmptyKeys.UserInterface.Input.Mouse.Update(UIRoot uiContainer, GameTime gameTime)
    at EmptyKeys.UserInterface.Input.InputManager.Update(UIRoot uiRoot, GameTime gameTime)
    at EmptyKeys.UserInterface.Controls.UIRoot.UpdateInput(GameTime gameTime)
    at GameLibrary.Screens.MapEditorScreen.Update(GameTime gameTime) in c:\_DEVELOPMENT\Misc\Enchilada\CastleSmashers\GameLibrary\Screens\MapEditorScreen.cs:line 175
    at SynapseGaming.SunBurn.Framework.Core.GameRunner.UpdateCurrentGameScreen(GameTime gameTime)
    at SynapseGaming.SunBurn.Framework.Driver.DX11.DX11GameRunnerAsGameLoop.Update(GameTime gameTime)
    at SynapseGaming.SunBurn.Framework.Driver.DX11.GameForm`1. ()
    at SynapseGaming.SunBurn.Framework.Driver.DX11.GameForm`1. (Object , EventArgs )
    at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.Run(Form mainForm)
    at SynapseGaming.SunBurn.Framework.Driver.DX11.GameForm`1.Run()
    at SynapseGaming.SunBurn.Framework.Driver.DX11.DX11GameRunnerAsGameLoop.Run[T]()
    at WindowsDesktop.WindowsDesktopProgram.Main() in c:\_DEVELOPMENT\Misc\Enchilada\CastleSmashers\WindowsDesktopAndDevelopmentMode\Program.cs:line 37
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    22 Jul 2014 10:57 AM
    <Border>
    </Border>

    Causes a compilation error in the generator
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    22 Jul 2014 12:07 PM
    both fixed in latest version
    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    22 Jul 2014 12:37 PM
    Great work,
    Does databinding currently work for ItemsSource on a ListBox - i'm trying to get the following

    <Border Width="400" Height="300" Background="#252525" BorderBrush="Black" BorderThickness="1"
    Visibility="{Binding LoadDialogVisibility}">
    <StackPanel Margin="10">
    <TextBlock Text="Select map to load..." />
    <ListBox Height="200" ItemsSource="{Binding MapList}">
    <ListBox.ItemTemplate>
    <DataTemplate>
    <TextBlock Text="{Binding Name}" />
    </DataTemplate>
    </ListBox.ItemTemplate>
    </ListBox>
    </StackPanel>
    </Border>

    to work, but just get an empty list.
    BamYaziUser is Offline
    New Member
    New Member
    Posts:42


    --
    22 Jul 2014 12:54 PM
    using 'Width' in a style applied to a Button causes a 'specified cast is not valid' exception @ ui.UpdateLayout

    <Style x:Key="DialogButton" BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
    <Setter Property="Background" Value="DarkOrange"/>
    <Setter Property="Width" Value="100"/>
    </Style>

    at EmptyKeys.UserInterface.UIElement.get_Width()
    at EmptyKeys.UserInterface.UIElement./\* ..ctor(UIElement 00010*/)
    at EmptyKeys.UserInterface.UIElement./*°(Vector2 000B1*/)
    at EmptyKeys.UserInterface.UIElement.Measure(Vector2 availableSize)
    at EmptyKeys.UserInterface.Controls.StackPanel.MeasureOverride(Vector2 constraint)
    at EmptyKeys.UserInterface.UIElement./*°(Vector2 000B1*/)
    at EmptyKeys.UserInterface.UIElement.Measure(Vector2 availableSize)
    at EmptyKeys.UserInterface.Controls.StackPanel.MeasureOverride(Vector2 constraint)
    at EmptyKeys.UserInterface.UIElement./*°(Vector2 000B1*/)
    at EmptyKeys.UserInterface.UIElement.Measure(Vector2 availableSize)
    at EmptyKeys.UserInterface.Controls.Border.MeasureOverride(Vector2 availableSize)
    at EmptyKeys.UserInterface.UIElement./*°(Vector2 000B1*/)
    at EmptyKeys.UserInterface.UIElement.Measure(Vector2 availableSize)
    at EmptyKeys.UserInterface.Controls.Grid.MeasureOverride(Vector2 constraint)
    at EmptyKeys.UserInterface.UIElement./*°(Vector2 000B1*/)
    at EmptyKeys.UserInterface.UIElement.Measure(Vector2 availableSize)
    at EmptyKeys.UserInterface.Controls.Grid./*Ԁ(/\*ҿ 00501*/, UIElement 00502*/, Boolean 00503*/)
    at EmptyKeys.UserInterface.Controls.Grid./*Ӣ(Int32 004E3*/, Boolean 004E4*/, Boolean 004E5*/, Boolean& 004E6*/)
    at EmptyKeys.UserInterface.Controls.Grid./*Ӟ(Int32 004DF*/, Boolean 004E0*/, Boolean 004E1*/)
    at EmptyKeys.UserInterface.Controls.Grid.MeasureOverride(Vector2 constraint)
    at EmptyKeys.UserInterface.UIElement./*°(Vector2 000B1*/)
    at EmptyKeys.UserInterface.UIElement.Measure(Vector2 availableSize)
    at EmptyKeys.UserInterface.Controls.ContentPresenter.MeasureOverride(Vector2 availableSize)
    at EmptyKeys.UserInterface.UIElement./*°(Vector2 000B1*/)
    at EmptyKeys.UserInterface.UIElement.Measure(Vector2 availableSize)
    at EmptyKeys.UserInterface.Controls.Border.MeasureOverride(Vector2 availableSize)
    at EmptyKeys.UserInterface.UIElement./*°(Vector2 000B1*/)
    at EmptyKeys.UserInterface.UIElement.Measure(Vector2 availableSize)
    at EmptyKeys.UserInterface.Controls.Control.MeasureOverride(Vector2 constraint)
    at EmptyKeys.UserInterface.UIElement./*°(Vector2 000B1*/)
    at EmptyKeys.UserInterface.UIElement.Measure(Vector2 availableSize)
    at EmptyKeys.UserInterface.Controls.UIRoot.UpdateLayout(GameTime gameTime)
    at GameLibrary.Screens.MapEditorScreen.Update(GameTime gameTime) in c:\_DEVELOPMENT\Misc\Enchilada\CastleSmashers\GameLibrary\Screens\MapEditorScreen.cs:line 179
    at SynapseGaming.SunBurn.Framework.Core.GameRunner.UpdateCurrentGameScreen(GameTime gameTime)
    at SynapseGaming.SunBurn.Framework.Driver.DX11.DX11GameRunnerAsGameLoop.Update(GameTime gameTime)
    at SynapseGaming.SunBurn.Framework.Driver.DX11.GameForm`1. ()
    at SynapseGaming.SunBurn.Framework.Driver.DX11.GameForm`1. (Object , EventArgs )
    at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.Run(Form mainForm)
    at SynapseGaming.SunBurn.Framework.Driver.DX11.GameForm`1.Run()
    at SynapseGaming.SunBurn.Framework.Driver.DX11.DX11GameRunnerAsGameLoop.Run[T]()
    at WindowsDesktop.WindowsDesktopProgram.Main() in c:\_DEVELOPMENT\Misc\Enchilada\CastleSmashers\WindowsDesktopAndDevelopmentMode\Program.cs:line 37
    You are not authorized to post a reply.
    Page 1 of 3123 > >>