Jump to content
LaunchBox Community Forums

[request] Add clock to bigbox


Klamp

Recommended Posts

A clock would be rad, but I wish there was some way to add a timer that started whenever you started a game, then when you ended it, that it would pop up and say how much time you played, or at least like how steam has it and has it where it tells you how much time you've played that title in its entirety. 

Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...
2 hours ago, Cookz718 said:

but i was leaning more into does anyone know the Codings.. im currently creating a theme and would like some sort of coding to add a digital

The link @neil9000 provided is to Grila's custom control set, which includes a custom WPF control to add the time. My control set AO Bigbox Customs also has a time/clock control. There is also more recently a binding Jason made available, so you don't need a custom control. I pulled the following excerpt from CriticalZone V2 to give you and idea how to use this binding:

<!-- TIME -->	
<TextBlock x:Name="Clock" Text="{Binding CurrentTime}" />

<!-- DATE -->
<TextBlock Text="{Binding Source={x:Static sys:DateTime.Today}, StringFormat='{}{0:MMM-dd-yyyy}'}" />

Try it out and see if it works for you.

Link to comment
Share on other sites

2 hours ago, eatkinola said:

The link @neil9000 provided is to Grila's custom control set, which includes a custom WPF control to add the time. My control set AO Bigbox Customs also has a time/clock control. There is also more recently a binding Jason made available, so you don't need a custom control. I pulled the following excerpt from CriticalZone V2 to give you and idea how to use this binding:


<!-- TIME -->	
<TextBlock x:Name="Clock" Text="{Binding CurrentTime}" />

<!-- DATE -->
<TextBlock Text="{Binding Source={x:Static sys:DateTime.Today}, StringFormat='{}{0:MMM-dd-yyyy}'}" />

Try it out and see if it works for you.

thanks ! trying it out but no luck.. not sure if im doing anything wrong (literally i just copied & pasted this) i placed it on Platformwheel3 am i suppose to put it else where ?? Forgive me once again.. total noob over here lol

Link to comment
Share on other sites

            <!--CLOCK-->
            <DockPanel Grid.Column="0" Grid.Row="0" Panel.ZIndex="10" >
                <Viewbox VerticalAlignment="Center" HorizontalAlignment="Center" StretchDirection="DownOnly" DockPanel.Dock="Right" >
                    <TextBlock Text="{Binding CurrentTime}" FontFamily="Segoe UI Light" FontSize="30" >
                        <TextBlock.Foreground>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="white" Offset="1"/>
                                <GradientStop Color="Gray"/>
                            </LinearGradientBrush>
                        </TextBlock.Foreground>
                        <TextBlock.Effect>
                            <DropShadowEffect ShadowDepth="4" Direction="310" Color="Black" Opacity="0.7" BlurRadius="4"/>
                        </TextBlock.Effect>
                    </TextBlock>
                </Viewbox>
            </DockPanel>
Link to comment
Share on other sites

11 minutes ago, Rincewind said:

            <!--CLOCK-->
            <DockPanel Grid.Column="0" Grid.Row="0" Panel.ZIndex="10" >
                <Viewbox VerticalAlignment="Center" HorizontalAlignment="Center" StretchDirection="DownOnly" DockPanel.Dock="Right" >
                    <TextBlock Text="{Binding CurrentTime}" FontFamily="Segoe UI Light" FontSize="30" >
                        <TextBlock.Foreground>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="white" Offset="1"/>
                                <GradientStop Color="Gray"/>
                            </LinearGradientBrush>
                        </TextBlock.Foreground>
                        <TextBlock.Effect>
                            <DropShadowEffect ShadowDepth="4" Direction="310" Color="Black" Opacity="0.7" BlurRadius="4"/>
                        </TextBlock.Effect>
                    </TextBlock>
                </Viewbox>
            </DockPanel>

You are a damn miracle worker !!! lol thank you soo much !! going to change the font and also the positioning. Will update you within the next few minutes (learning as i go, everything is trial & error)

Link to comment
Share on other sites

9 minutes ago, Rincewind said:

Try playing around with this code, changing the "row" and "column" or take a look at the code in other themes

trying to move it to the corner & the size as well which numbers do u suggest i mess around with ? i should be off your hairs after that jejeje i truly appreciate the help ! 

Link to comment
Share on other sites

Just now, Rincewind said:

Which corner left or right? Size of font will change the... Font size but you will probably have to remove the "stretchdirection=downonly" part I think

Something like this ! have the time on the right corner like that (ill mess with the size & font) and also have on both ends that the previous or the next Platform doesn't show.. Once i have those 2 done i may be able to do the rest and finish up maybe even by tomorrow. The concept im aiming for is something very elegant / clean ! and im sure everyone would love and appreciate. With you helping i will def give you Credit as well

Background.jpg

  • Like 1
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...