Jump to content
LaunchBox Community Forums

Change background image simultaneously across multiple views


Recommended Posts

If anyone has time to help me build the following plugin?

I would like to change the background image with a key press across multiple views while in that view without having to go in and out of the view to see the changes.

I was thinking to have a settings.ini in the Plugins folder and like the search feature in BigBox a window come up and you can select settings from there.

image.thumb.png.405d991c7b3cfa45631ba8c88f5b2946.png

In BigBox a window appears and you can set the following:

image.thumb.png.7cb1e5eb5d6d176f5d795805d190972e.png

Edited by wallmachine
Link to comment
Share on other sites

  • 1 month later...

"[almost] Anything is possible."  But this is beyond me.  I'm not familiar with that particular Theme (which doesn't really matter).  So the "set of images" you're talking about, is that the different colored 'bezels' or overlays you have between the 2 views?  None of the Themes I use have any so again, not familiar.  Is it safe to assume your particular Theme has a subfolder of images then the path you manually changed points to a different ../images folder (or there about's)?

Link to comment
Share on other sites

9 hours ago, JoeViking245 said:

"[almost] Anything is possible."  But this is beyond me.  I'm not familiar with that particular Theme (which doesn't really matter).  So the "set of images" you're talking about, is that the different colored 'bezels' or overlays you have between the 2 views?  None of the Themes I use have any so again, not familiar.  Is it safe to assume your particular Theme has a subfolder of images then the path you manually changed points to a different ../images folder (or there about's)?

Spot on. The images are in sub-folders and the only name that changes is the FolderName, see example below. Also I updated the first post with a better example.

I have to edit the following XAML files manually if I want to change the image.

\FolderName\Game\Background.png = \LaunchBox\Themes\Pandora\Views\TextGamesView.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Game/Background.png" />)

\FolderName\Options\Background.png = \LaunchBox\Themes\Pandora\Views\OptionsView.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Options/Background.png" />)

\FolderName\Pause\Background.png = \LaunchBox\PauseThemes\Pandora\Platform.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Pause/Background.png" />)

\FolderName\Platform\Background.png = \LaunchBox\Themes\Pandora\Views\PlatformWheel1FiltersView.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Platform/Background.png" />)

\FolderName\Shutdown\Background.png = \LaunchBox\StartupThemes\Pandora\Default Shutdown.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Shutdown/Background.png" />)

\FolderName\Startup\Background.png = \LaunchBox\StartupThemes\Pandora\Default.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Startup/Background.png" />)

Locations of Background.png

Spoiler

\LaunchBox\Themes\Pandora\Images\Theme Backgrounds\

\80s\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Amber\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Aqua\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Blue\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Blue Aqua\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Bluesteel\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Graphite\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Graphite Gold\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Green\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Lilac\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Pink\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Pink Yellow\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Purple\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Red\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Red Yellow\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Samus\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Silver\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Yellow Green\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

 

Edited by wallmachine
Link to comment
Share on other sites

I have given this some thought but with my limited knowledge I cant come up with a decent method to achieve this.

Writing to the xaml files either every 5 seconds or every button press isnt a good idea. Even if it was the view you would currently be sitting at wont change the image.

You would need to use a usercontrol. My plugin that launches apps from the system view is a usercontrol. Using a plugin I dont think there is a way to tell which view you are on and as you want a different image for each view, every view would require its own usercontrol. 

To be able to press a button on 1 view and have the image change on another view will require static variables. To change this static variable automatically every 5 seconds would require a timer. From what I read changing static variables from a timer (different thread) isnt a good idea... I cant create images on another thread anyway so will have to invoke... invoking that amount of images every 5 seconds... maybe instead use a string/int to point to a different path and use the loaded event ?

I could do this but at the moment I wouldn't be confident that iv done it well. If anyone with more knowledge than me wants to chime in with a good method to achieve this then I'll give it a go.

But creating a ui for this, im def not up for. When me and my gf are "getting busy", I now use "xaml" as my safe word. ?

 

  • Thanks 1
Link to comment
Share on other sites

On 7/9/2020 at 8:11 PM, wallmachine said:

@jayjay @JoeViking245

Is it possible to cycle a "set" of images live simultaneously for the following views: options, platform, game, pause, startup, shutdown? In the example below I had to change the path manually in the xaml files.

example

i watched the video, but i couldnt see what images you were cycling (manually)

but if i understand correctly, you want to point something at a directory (lets say a platform directory) with a bunch of images and you want something to sequentially or randomly go thru that list of images and pass them back to an image element in a view ?

Link to comment
Share on other sites

1 hour ago, y2guru said:

i watched the video, but i couldnt see what images you were cycling (manually)

but if i understand correctly, you want to point something at a directory (lets say a platform directory) with a bunch of images and you want something to sequentially or randomly go thru that list of images and pass them back to an image element in a view ?

In the video I was just manually changing the image element in PlatformWheel1FiltersView.xaml and TextGamesView.xaml

yes, correct.

The directories are located here

Spoiler

\LaunchBox\Themes\Pandora\Images\Theme Backgrounds\

\80s\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Amber\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Aqua\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Blue\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Blue Aqua\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Bluesteel\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Graphite\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Graphite Gold\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Green\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Lilac\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Pink\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Pink Yellow\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Purple\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Red\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Red Yellow\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Samus\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Silver\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Yellow Green\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

So with the plugin how I envisaged it working was you press the F1 key for example and the image source/element changes in the below XAML files live while on that view for the corresponding "FolderName" example "80s". In the above Spoiler there are 18 main "FolderName" and they all have sub-folders that contain one image that points to the image source in the respective XAML file.

\FolderName\Game\Background.png = \LaunchBox\Themes\Pandora\Views\TextGamesView.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Game/Background.png" />)

\FolderName\Options\Background.png = \LaunchBox\Themes\Pandora\Views\OptionsView.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Options/Background.png" />)

\FolderName\Pause\Background.png = \LaunchBox\PauseThemes\Pandora\Platform.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Pause/Background.png" />)

\FolderName\Platform\Background.png = \LaunchBox\Themes\Pandora\Views\PlatformWheel1FiltersView.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Platform/Background.png" />)

\FolderName\Shutdown\Background.png = \LaunchBox\StartupThemes\Pandora\Default Shutdown.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Shutdown/Background.png" />)

\FolderName\Startup\Background.png = \LaunchBox\StartupThemes\Pandora\Default.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Startup/Background.png" />)

Link to comment
Share on other sites

1 hour ago, wallmachine said:

In the video I was just manually changing the image element in PlatformWheel1FiltersView.xaml and TextGamesView.xaml

yes, correct.

The directories are located here

  Reveal hidden contents

\LaunchBox\Themes\Pandora\Images\Theme Backgrounds\

\80s\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Amber\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Aqua\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Blue\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Blue Aqua\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Bluesteel\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Graphite\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Graphite Gold\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Green\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Lilac\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Pink\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Pink Yellow\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Purple\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Red\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Red Yellow\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Samus\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Silver\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

\Yellow Green\
    \Game\Background.png
    \Options\Background.png
    \Pause\Background.png
    \Platform\Background.png
    \Shutdown\Background.png
    \Startup\Background.png

So with the plugin how I envisaged it working was you press the F1 key for example and the image source/element changes in the below XAML files live while on that view for the corresponding "FolderName" example "80s". In the above Spoiler there are 18 main "FolderName" and they all have sub-folders that contain one image that points to the image source in the respective XAML file.

\FolderName\Game\Background.png = \LaunchBox\Themes\Pandora\Views\TextGamesView.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Game/Background.png" />)

\FolderName\Options\Background.png = \LaunchBox\Themes\Pandora\Views\OptionsView.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Options/Background.png" />)

\FolderName\Pause\Background.png = \LaunchBox\PauseThemes\Pandora\Platform.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Pause/Background.png" />)

\FolderName\Platform\Background.png = \LaunchBox\Themes\Pandora\Views\PlatformWheel1FiltersView.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Platform/Background.png" />)

\FolderName\Shutdown\Background.png = \LaunchBox\StartupThemes\Pandora\Default Shutdown.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Shutdown/Background.png" />)

\FolderName\Startup\Background.png = \LaunchBox\StartupThemes\Pandora\Default.xaml (<Image Source="{}pack://siteoforigin:,,,/Themes/Pandora/Images/Theme Backgrounds/Yellow Green/Startup/Background.png" />)

oh, so you want the cycling based on a function key? why not automatic based on time duration ? im just thinking of those users that playback the themes using attract mode

  • Like 1
Link to comment
Share on other sites

3 minutes ago, y2guru said:

oh, so you want the cycling based on a function key? why not automatic based on time duration ? im just thinking of those users that playback the themes using attract mode

automatic cycling is possible and a converter could bind to CurrentTime that jason updates every few seconds, the F1 on the other hand could be a little tricky as bigbox is the controller, but i dont think what your asking for is out of the realm of impossibility 

  • Thanks 1
Link to comment
Share on other sites

I would think you'd want to set the automatic [random] background image selection on a view change.  Similar to the example video.  Though with the timer, it would give it more of a random-change effect.  I assume it would need to 'apply' the new image on view change.?.  v.s. you're sitting on one view and it suddenly changes.?.   Being able to change it manually by assigning a key/button would be cool.... for the 3 times it's used or until the novelty wears off shortly there after. :D

  • Game On 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...