Mighty Posted April 16, 2013 Posted April 16, 2013 I've searched around some, and I'm sure anyone building a UI has had to deal with it, but couldn't find anything that addressed producing a lot of buttons with consistent text placement. I expect that I'm overlooking the obvious search phrase. I have an Ergodex DX1 keyboard and I'm wanting to document the layout of the keys for the various games I use it with. So, I need to generate up to 50 buttons with labels and then move and rotate them into position for each game. I would like to put the key number really small in one corner, the keyboard key assigned to it, small, in another corner, and then the then the function within the game, larger, and close to the center. I've built blanks for the buttons, with space for those three pieces of information. But getting the text lined up time after time is a bit tedious. What is the easiest process for placing text consistently when dealing with dozens of buttons? I envision something similar to a macro, that loads the blank and then positions the text tool for the first field, with some way to trigger the jump to the next field. I suppose a macro for each field would be simple enough. I'm about to break down and just write a program to do it for me :-p Does anyone have any suggestions? Thanks, Drake Christenen Quote
Visual Posted April 16, 2013 Posted April 16, 2013 (edited) One of the fine plugin developers has made one makes shiny buttons that places text and the ability to change it to any font on your system. I do not remember who made it though. Found it. It's in the Madjik pack. Edited April 16, 2013 by Visual Quote
pdnnoob Posted April 16, 2013 Posted April 16, 2013 Unfortunately, there isn't a "snap to grid" option, so you'll have to either: 1. write your own program (like you said) 2. write a paint.net plugin (CodeLab ftw) 3. take the fast route (line things up yourself) and hope you never have to do it again. Quote No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo
Mighty Posted April 17, 2013 Author Posted April 17, 2013 Thanks for the pointers. I don't think that the button nor panelling plug-ins will actually save much work. I think I'll look up CodeLab to start. If that doesn't fall out quickly, then I bet I can find some example code that I can twist into the shape I want. Only problem is, I'm already starting to give in to feature creep in my head. If anyone else comes up with a suggestion, I'd love to hear it. Drake Quote
Ego Eram Reputo Posted April 17, 2013 Posted April 17, 2013 ...If anyone else comes up with a suggestion, I'd love to hear it. Drake My workaround: Lay it out in MS Excel and do a print screen followed by a paste into new layer. Use any of a number of plugins (or the magic wand) to remove the white background. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker
Mighty Posted April 17, 2013 Author Posted April 17, 2013 Excel screenshot? I'm not sure I follow. I don't see how that gets the text onto the buttons. Especially in the different text sizes that I'm hoping for. I want the key number and key name to be there, but de-emphasized. I probably should have gone ahead and included a picture of the layout I have on my DX1: I used this photo as the background layer, to arrange and align the buttons. After I have that, I hide this photo layer. The layout picture here is one I created in Gimp. (Gawd, that was an awful experience. The Gimp developers do *not* think like I do.) Originally, I was going to print out that layout and slide it under the clear plastic under the keys, which is why the labels are beside the keys and not on top of them. I've decided since then that I don't like that. I just bring up the picture on my second monitor before I fire up the game. As you can see, the buttons are not necessarily orthogonal. Here's what I have at the moment as a new button blank: Yeah, I know, not all that pretty. Have you ever heard the term Programmer Art? If I'm not going to rotate the buttons and text to match the actual layout of the keys, then I might as well just slap the labels on within PDN. I don't see how the Excel step helps me. But maybe I'm missing something? On the programming front, I glanced at CodeLab. But, it's a fairly constrained environment. I think it's going to be easier to just take a Java or C# example and read a CSV file of text labels, to spit out the button files. I may even build a text file of x,y,rotation values and build the entire layout image programatically. Drake Quote
Ego Eram Reputo Posted April 17, 2013 Posted April 17, 2013 I was under the impression you would be transforming a keyboard. Therefore the regular layout could be duplicated with appropriately sized Excel cells. Your somewhat more challenging layout won't be that easy to replicate except by some hard manual labour. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker
Mighty Posted April 19, 2013 Author Posted April 19, 2013 (edited) Ah, I see, now. Yeah, what your describing would probably work pretty well for any labeling situation where the labels are lined up with a regular spacing. Very clever. Actually, what you're describing could be applied. If I could replicate the buttons so that they're spaced evenly, then I could label them with your method. Then, the next time-saving step to search for would be to find a way to split the buttons out into individual files. Or, some easy way to select the next button for arrangement onto my final layout. Though, that would still be a lot of manual work to arrange them. Drake Edited April 19, 2013 by Mighty Quote
Mighty Posted May 5, 2013 Author Posted May 5, 2013 (edited) I know that this has become a non-Paint.NET thing, but I thought some people might be interested in the program I wrote to do the layout I was talking about. Here are a few example output files: With a blank background (click for full size) https://www.mightydrake.com/Pics/DX1Layout/DX1GamefileBlank.png Over top of the photo of the keyboard https://www.mightydrake.com/Pics/DX1Layout/DX1MightysKeyboardPhotoOverlayed.jpg On a game-themed background http://www.mightydrake.com/Pics/DX1Layout/DX1SaintsRowOutput.jpg I came up with what I think is a little less-awful looking button. But, as I said, I'm not an artist. I'm sure someone with real skills could take this and make something really creative. The Readme file, which has a link to download the program, including source. Drake Christensen Edited December 10, 2020 by Mighty Fixed links Quote
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.