Jump to content
LaunchBox Community Forums

Startup Theme... help a noob


NightShadowPT

Recommended Posts

Hi!

I'm looking to create a Startup theme (for when you launch a game) and a Game Over theme, but I'm not sure where to start.

I'd like to start by something simple like:

1x Image with a Black Background (black.JPG)

1x ClearLogo of the game being launched centered in the page

1x Scanline effect JPG to overlay on top of the previous 2 (scanlines.jpg)

This sounds like easy to implement, but I've been fighting with the XAML file and havent been able to do it until now. 

Any pointers?

 

Thanks in advance

Link to comment
Share on other sites

34 minutes ago, NightShadowPT said:

Hi!

I'm looking to create a Startup theme (for when you launch a game) and a Game Over theme, but I'm not sure where to start.

I'd like to start by something simple like:

1x Image with a Black Background (black.JPG)

1x ClearLogo of the game being launched centered in the page

1x Scanline effect JPG to overlay on top of the previous 2 (scanlines.jpg)

This sounds like easy to implement, but I've been fighting with the XAML file and havent been able to do it until now. 

Any pointers?

 

Thanks in advance

Best thing I can recommend is downloading one of the themes that has simple look like what you want to look over its code. You can also post what you have so far and we can take a look and help out.

Link to comment
Share on other sites

Hi,

Doing some experimentation... unfortunately, if I mess something on the file, my mouse pointer disappears and I need to reboot the PC, so progress is slow. :)

This is how it's looking like at the moment.

A few things I'd like to do and would like some help:

- For the first image (Loading.jpg), how can I use either: a) it's exact pixel size b)stretch it to the screen size?

- For the second image (the clear logo), how can I center the image and limit it's size?

 

<Canvas Name="Canvas">
      <Image Source="pack://siteoforigin:,,,/StartupThemes/Big Logo/Loading.jpg" Stretch="UniformToFill" RenderOptions.BitmapScalingMode="HighQuality" Height="{Binding ElementName=Canvas, Path=ActualHeight}" Width="{Binding ElementName=Canvas, Path=ActualWidth}" />
      <Image Source="{Binding SelectedGame.ClearLogoImagePath}" VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="Uniform" RenderOptions.BitmapScalingMode="HighQuality" Margin="15,15,15,15">
		<Image.Effect>
               <DropShadowEffect BlurRadius="45" Direction="-90" RenderingBias="Quality" ShadowDepth="1" />
		</Image.Effect>
      </Image>
		<Image Source="pack://siteoforigin:,,,/StartupThemes/Big Logo/scanlines.png" Stretch="UniformToFill" RenderOptions.BitmapScalingMode="HighQuality" Height="{Binding ElementName=Canvas, Path=ActualHeight}" Width="{Binding ElementName=Canvas, Path=ActualWidth}" />
 </Canvas>

 

Thanks in advance for any help.

 

Cheers,

Link to comment
Share on other sites

@NightShadowPT Is this the entire code in the xml file or just a portion of it?

I would define a simple grid and then set the position of your images in the grid.  Below I made a grid where the center row and column are the biggest as that is where I will confine the clear logo. You can see I set the clear logo to show up in row 1 and column 1 (rows and columns start numbering at "0". So if you have 3 rows the rows would be numbered 0, 1, and 2.

You can add more or less rows/columns depending on how refined you want to be with image placement. 

If you want to do just a black background you do not need an image. Just make the grid's background be black. (see the Grid.Background section).

I am not an expert or even well versed in this. I have just been learning over the past year and try to share what I know like those that helped me did.

   <Canvas Name="Canvas">
      <Grid Height="{Binding ElementName=Canvas, Path=ActualHeight}" Width="{Binding ElementName=Canvas, Path=ActualWidth}">
         <Grid.Background>
            <SolidColorBrush Color="Black" />
         </Grid.Background>
         <Grid.RowDefinitions>
            <RowDefinition Height="1*" />
            <RowDefinition Height="8*" />
            <RowDefinition Height="1*" />
         </Grid.RowDefinitions>
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1.5*" />
            <ColumnDefinition Width="7*" />
            <ColumnDefinition Width="1.5*" />
         </Grid.ColumnDefinitions>
         <Image Grid.Row="1" Grid.Column="1" Source="{Binding SelectedGame.ClearLogoImagePath}" VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="Uniform" RenderOptions.BitmapScalingMode="HighQuality" Margin="15">
            <Image.Effect>
               <DropShadowEffect BlurRadius="45" Direction="-90" RenderingBias="Quality" ShadowDepth="1" />
            </Image.Effect>
         </Image>
         <Image Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="3" Source="LAUNCHBOX_ROOT_FOLDER/StartupThemes/Big Logo/Images/Scanline.png" RenderOptions.BitmapScalingMode="HighQuality" />
      </Grid>
   </Canvas>
</UserControl>

Here is just a quick image of what the code above shows in startup.

Screen Shot 2020-09-23 at 8.15.31 PM.png

Link to comment
Share on other sites

Take a look at the Default Startup theme and use that as a basis. The first image IS the full screen background you are referring to, overlay would be the same just appear later to draw over the first image. In the middle do something similar to the grid you see and use that as a baseline to get the Clear Logo image the way you want. Should only need a grid with 3 rows and 3 columns with the middle row/column being set up to be the size you want the logo.

Link to comment
Share on other sites

8 hours ago, Retro808 said:

@NightShadowPT Is this the entire code in the xml file or just a portion of it?

I would define a simple grid and then set the position of your images in the grid.  Below I made a grid where the center row and column are the biggest as that is where I will confine the clear logo. You can see I set the clear logo to show up in row 1 and column 1 (rows and columns start numbering at "0". So if you have 3 rows the rows would be numbered 0, 1, and 2.

You can add more or less rows/columns depending on how refined you want to be with image placement. 

If you want to do just a black background you do not need an image. Just make the grid's background be black. (see the Grid.Background section).

I am not an expert or even well versed in this. I have just been learning over the past year and try to share what I know like those that helped me did.

 

Thanks for the help, I'll try this out when I arrive home later today.

I do have a question through, are the numbers in the Height and Width definitions  a percentage of the total screen size?

Thanks

Link to comment
Share on other sites

15 hours ago, NightShadowPT said:

Thanks for the help, I'll try this out when I arrive home later today.

I do have a question through, are the numbers in the Height and Width definitions  a percentage of the total screen size?

Thanks

When defined with a "*" it is more of a ratio. In the 3 rows, Row 1 will use 8 times as much of the available space provided as Rows 0 and 2 will use.

If you leave the "*" out and just define as say, RowDefinition Height="100" means the row will use 100 pixels for it's height.

Link to comment
Share on other sites

  • 1 month later...

Hi,

Coming back to this thread after some time to show you the final Result. Thanks for the help!

This is the Code I used:

<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="562"
             d:DesignWidth="1000"
             HorizontalAlignment="Stretch"
             VerticalAlignment="Stretch"
             FocusVisualStyle="{x:Null}"
             BorderThickness="0"
             Margin="0"
             Padding="0"
             Background="#000">
    <Canvas Name="Canvas">
      <Grid Height="{Binding ElementName=Canvas, Path=ActualHeight}" Width="{Binding ElementName=Canvas, Path=ActualWidth}">
         <Grid.Background>
            <SolidColorBrush Color="Black" />
         </Grid.Background>
         <Grid.RowDefinitions>
            <RowDefinition Height="3.3*" />
            <RowDefinition Height="2*" />
            <RowDefinition Height="4.7*" />
         </Grid.RowDefinitions>
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1.5*" />
            <ColumnDefinition Width="7*" />
            <ColumnDefinition Width="1.5*" />
         </Grid.ColumnDefinitions>
         <Image Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="3" Source="LAUNCHBOX_ROOT_FOLDER/StartupThemes/NightShadow/Images/Loading.jpg" RenderOptions.BitmapScalingMode="HighQuality" />
		 <Image Grid.Row="1" Grid.Column="1" Source="{Binding SelectedGame.ClearLogoImagePath}" VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="Uniform" RenderOptions.BitmapScalingMode="HighQuality" Margin="15">
            <Image.Effect>
               <DropShadowEffect BlurRadius="45" Direction="-90" RenderingBias="Quality" ShadowDepth="1" />
            </Image.Effect>
         </Image>
         <Image Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="3" Source="LAUNCHBOX_ROOT_FOLDER/StartupThemes/NightShadow/Images/Scanline.png" RenderOptions.BitmapScalingMode="HighQuality" />
      </Grid>
   </Canvas>
</UserControl>

 

This is the Loading Screen:

Loading_Example.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...