Author Topic: Need Help...display an image when you press a button  (Read 4380 times)

Thorvald

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Need Help...display an image when you press a button
« Reply #15 on: March 04, 2017, 11:44:28 AM »
Thanks for this guys!   

I used CPWizard to export all my control panel layouts (because loading CPWizard dynamically was WAAAYYY too slow and glitchy).

Then moved all those exported images to a cpanelwiz directory.

Added a new artwork for cpanel to link to that directory.

Configured your plugin to do artwork and cpanel and voila!   Hit a button with game select and get instant display of controls.

---

Now I just need to add a little more such as turning the pop-up off if the user changes game (moves up and down).

Cheers
   Tim

EDIT: And of course there is an issue with CPWizards export function... only a bunch of the batch exports worked, the rest are defaulted.  Back to trying to get showcp plugin to work.
« Last Edit: March 04, 2017, 01:45:15 PM by Thorvald »

MisterNewbie

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Need Help...display an image when you press a button
« Reply #16 on: May 01, 2017, 05:56:43 PM »
This is a neat plugin.

Question / Idea:

Modify the plugin to load folder's worth of images (or, better yet, a zip/cbz of images) that are named/ordered numerically (01.jpg - 09.jpg for instance) into an array or whatever and then display them / navigate through them with left/right.

You'd essentially have a game instruction booklet popup plugin that way.

My idea of workflow:
-Set custom key for plugin to "M" (non-hold)
-Load contents of folder/zip into memory, path based on current rom name (much like snap/wheel artwork)
-Display image 1 (or a default 'no content' image if folder/zip empty/nonexistent)
-Left / Right scrolls through images sequentially
-"M" again closes.

kent79

  • Hero Member
  • *****
  • Posts: 523
    • View Profile
Re: Need Help...display an image when you press a button
« Reply #17 on: May 01, 2017, 07:30:57 PM »
This is a neat plugin.

Question / Idea:

Modify the plugin to load folder's worth of images (or, better yet, a zip/cbz of images) that are named/ordered numerically (01.jpg - 09.jpg for instance) into an array or whatever and then display them / navigate through them with left/right.

You'd essentially have a game instruction booklet popup plugin that way.

My idea of workflow:
-Set custom key for plugin to "M" (non-hold)
-Load contents of folder/zip into memory, path based on current rom name (much like snap/wheel artwork)
-Display image 1 (or a default 'no content' image if folder/zip empty/nonexistent)
-Left / Right scrolls through images sequentially
-"M" again closes.

Check it.  :)
http://forum.attractmode.org/index.php?topic=939.msg7057#msg7057

damelioj

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Need Help...display an image when you press a button
« Reply #18 on: March 01, 2018, 09:42:26 AM »
Is there a way to have the screen automatically display when a game is selected? Or have the popup button automatically “pressed” on game selection?

It would be great for the user to be able to see a “How to Play” screen upon selecting a game. That screen could have an instruction the user to press the button defined in the pop up plugin to switch to the game selected.

qqplayer

  • Sr. Member
  • ****
  • Posts: 248
    • View Profile
Re: Need Help...display an image when you press a button
« Reply #19 on: March 07, 2018, 12:07:15 PM »
Is there a way to have the screen automatically display when a game is selected? Or have the popup button automatically “pressed” on game selection?

It would be great for the user to be able to see a “How to Play” screen upon selecting a game. That screen could have an instruction the user to press the button defined in the pop up plugin to switch to the game selected.

Yes sure , just need to create a new "artwork" on your layout , for example:

Code: [Select]
local controlpanel = fe.add_artwork("controlpanel", 0, 10 100, 100);

And then add the path into your emulator.cfg

Code: [Select]
artwork    controlpanel                 C:\media\cpanel