lazybandgeek Posted May 21, 2021 Share Posted May 21, 2021 Ok first off, I whipped this together in around an hour and it could probably be improved, but it fully fits the bill for what I needed. I thought I'd throw it on here as somebody else may want or need something like it. Basically, I wanted a control map per game that I could show during a startup screen/theme. So I made a base image/project in gimp, and exported all the varieties that I would need. In my case this is a 6 button layout in the format of: 3 4 6 1 2 5 The numbers are strange because players 3 and 4 only have 4 buttons, but I digress. My different layouts have the form of coin, start, both or none, and then how many buttons I'm showing in the layout (1-6). I wanted to make a quick python script that you could enter which flavor (coin, start, both, or none), then how many buttons, and a title. Then based on your selection you would be prompted for what you would want as a label for each button. I then put all of that onto the image, and save it as title.png in the folder I'm using as storage. I then just add the image through launch box as my controller panel and I can directly use it in my startup theme. If you want to use this, you just need a python 3 install. And then run a "pip install pillow" to get the library I use. I've included my controller template project, the exported png's that I use for my base images, and the python script that does the magic (map_maker). Anybody could quickly change the default maps etc and paths. As well as the dictionary/look up table that places labels. I just thought somebody may want something like this, and could use it as a starting point. I probably didn't need all the different flavors, but I was being picky and wanted unused buttons to be greyed out when not in use. Good Luck!controller_stuff.zip 1 Quote Link to comment Share on other sites More sharing options...
Skarn Posted October 31, 2021 Share Posted October 31, 2021 It's a neat idea, showing a controller map image as part of the game launch/details. I think I'd probably go for a little built in editor where the background controller image is selected/uploaded for a game, and then a bit of xml definition which describes the coordinates of text labels, and have Launchbox render the image and the labels over the top on demand via a plugin. But regardless of approach, this seems like it might be a fair bit of work to assign everything. Maybe just per platform to show where the user controller maps to the original platform controller would be an easier base approach. Quote Link to comment Share on other sites More sharing options...
lazybandgeek Posted November 3, 2021 Author Share Posted November 3, 2021 The xml would probably work (and be better in all honesty). But I know python better than xml, so I went sledgehammer mode and bashed it until it fit the need lol. Yeah I got it working on my splash screen by uploading the image as the control board or something like that. Then you can directly access that image as it's in the game's object variable that the theme xml stuff uses. I'm sure there is probably a way to parameterize the button labels, I just don't know how to get it from the game info to the xml (ie pass it from one to the other). The theme stuff is global, so it relies on all the games defines, so you could point the theme at a generic control board for the overlay like you say. I just make sure that a game has fanart backgrounds (or I add some) then every game launching can use that and the game specific controller image in the theme. Like I said sledgehammer, but now that it's set up, I only update it when I add new games. Quote Link to comment Share on other sites More sharing options...
lazybandgeek Posted November 3, 2021 Author Share Posted November 3, 2021 Also if you want I could attach some of the final results for a game actually launching too. And possibly the theme xml I used. It may be a few days as I'm slow/busy/etc lol, but I'd be happy to do so. Quote Link to comment Share on other sites More sharing options...
wemr97dl Posted January 14, 2022 Share Posted January 14, 2022 CP wizard was able to something similar with Mame and per game for other emulators, you can still use it to batch export controls but it’s no longer supported. Will tryout when I can Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.