Alright, I've made a little progress on the DCSGUI thing, though not as much as I wanted. I got distracted fixing a bug that TI-Coder found (backslash stuff). Here's my commit message for tonight for those interested in some more specifics:
git wrote:
Rearranged code. Started DCSGUI stuff. Reworked handling of backslashes.

- Rearranging: I basically just changed the folder Tokens to Merthsoft.Tokens, this this clears up some confusion, I think. I almost made it give out Merthsoft.Tokens.dll instead of just Tokens.dll. This is purely for narcissism.
- DCSGUI Stuff: I've started implementing some different types, right now just GUIRNull and Checkbox. I spent a while deciding how I wanted the objects to be done, and went with an abstract base class that the rest inherit from and blah blah blah. For some reason drawing them isn't working right, I'm not 100% on why that is, that's the next step.
- Backslashes: So, there's were being handled awkwardly. Basically, in the XML if you wanted a token to have a backslash (such as "\~" being an actual tilde), you would put it in the XML as "\\~". This caused some issues since I was unescaping in the code, so when I had "\\u" it was expecting some unicode, which I was not providing. So, I changed some stuff and now you just put "\~" and it handles it just fine. I had to put in a special case for "\n" in the code, but that's alright by me.


And after reading that, I realize I should really proof-read my commits Razz
Cool deal, Merth, glad that you got the DCS GUI stuff started, and perfectly understandable that you got distracted by another issue. I'll continue to follow this project with rapt interest and contribute whatever help and suggestions that I can.
Alright, so I need some input. As I'm designing the DCS GUI editor, I need to consider the zoom amount. I don't want to have it at 1x zoom, because that's too small. I could, pretty easily, make it so you choose the zoom (like in the sprite editor), but I just wanted to get some input about that.
Definitely variable zoom. I like viewing calculator screenshots at 2x, but when I'm MSPainting sprites and mockup screenshots, I invariably go to 800% (8x). That might be a nice default, with 4x, 2x, and perhaps 16x options?
So progress here is a little slow, since I lack most motivation these days. Hopefully I can get some work done on it this weekend, at least get the DCS GUI editor actually editing. I have some questions though.
1. Is there a max number of items?
2. Is ordering always important? Is there a performance increase to pushing one thing and then another as opposed to the other and then the one?
3. Is it worthwhile to take repetitive pushes and put them in a loop? Or should this be user-end?
1. The maximum number of items is limited only by the available memory (specifically, RAM) of the host calculator. There's no itemcount to be stored in a byte or something, so there's no ~255 item limit or ~65535 or anything like that. Of course, if you have 65535 items, chances are your RAM might be full
2. There's no performance reason, but there is a functionality reason. Pushing a full-screen hotspot and then a radio button will do a very different thing from pushing a radio button and then a full-screen hotspot. In the former case, clicking anywhere other than the radio button will click the hotspot, and clicking the radio button will select it. In the latter case, the radio button is unreachable, and the whole screen will be clickable as the hotspot.
3. If you're doing repeated pushes (in ASM), then turn them into PushGUIStacks instead of a series of PushGUIStack calls.
Alright, that's all pretty much what I thought. I knew about the hotspot thing, I just wasn't sure for other things if there would be any performance gain. As for 3, this'll be (at first) just for BASIC, so that's not available.
Ah, ok. I suppose it's a judgment call whether you want to do some kind of looping thing, I look forward to seeing what you come up with
So I'm a little stuck on this. I've added some stuff GUI wise in the editor, but I'm not sure how to proceed. I need some advice on the look and feel of it. Should you be dragging stuff in? How should an options box look? How should radio buttons be handled? Should hotspots be visible? What should they look like?

Bah, I'm stumped... And I'm not sure what else I need to work on with this either. I guess an image editor is needed, and a map editor would be good.
merthsoft wrote:
So I'm a little stuck on this. I've added some stuff GUI wise in the editor, but I'm not sure how to proceed. I need some advice on the look and feel of it. Should you be dragging stuff in? How should an options box look? How should radio buttons be handled? Should hotspots be visible? What should they look like?

Bah, I'm stumped... And I'm not sure what else I need to work on with this either. I guess an image editor is needed, and a map editor would be good.
I hope that you come up with some ideas for this soon, as long as it doesn't stop you from working on your Chat program. Smile It sounded like you were getting some inspiration from working on the Chat program.
I wasn't getting inspiration so much as I was desire. And I've picked it back up again. Right now you can drag checkboxes (I know they say textbox... oops!)!

Results in:


Code:
PushGUIStack(0,255
PushGUIStack(7,40,24,0,Unchecked,"
PushGUIStack(7,44,20,0,Unchecked,"
PushGUIStack(7,48,20,0,Unchecked,"
PushGUIStack(7,52,24,0,Unchecked,"
PushGUIStack(7,52,28,0,Unchecked,"
PushGUIStack(7,48,32,0,Unchecked,"
PushGUIStack(7,44,36,0,Unchecked,"
PushGUIStack(7,40,40,0,Unchecked,"
PushGUIStack(7,36,36,0,Unchecked,"
PushGUIStack(7,32,32,0,Unchecked,"
PushGUIStack(7,28,28,0,Unchecked,"
PushGUIStack(7,28,24,0,Unchecked,"
PushGUIStack(7,32,20,0,Unchecked,"
PushGUIStack(7,36,20,0,Unchecked,"
Can someone put that in their calc and verify that I got the output right? I don't have mine offhand. If it's wrong, it's an easy enough fix.
Don't forget that "PushGUIStack(" -> "sum(7," and that "Unchecked" -> "0".
Should unchecked be the integer 0, or the string "0"?
merthsoft wrote:
Should unchecked be the integer 0, or the string "0"?
Integer zero, sorry for the ambiguity. This looks great by the way, I realized I forgot to mention that!
So I was able to do some testing with an emulator, and It's mostly right. The only issues are that Checkboxes are 11, not 7; and that when the edges overlap they invert each other. Are they XORed?
merthsoft wrote:
So I was able to do some testing with an emulator, and It's mostly right. The only issues are that Checkboxes are 11, not 7; and that when the edges overlap they invert each other. Are they XORed?
Most preset-sprite elements like checkboxes, radio buttons, and even text are XOR'd so if for some reason the programmer decides he wants a black background to his DCS GUI everything will still work nicely. Smile
Hmm, that makes sense. Is there a way, though, to put all the GUI elements into a buffer and then XOR on? That way overlapping GUI elements don't invert each other.
merthsoft wrote:
Hmm, that makes sense. Is there a way, though, to put all the GUI elements into a buffer and then XOR on? That way overlapping GUI elements don't invert each other.
I think I understand what you're talking about, but I think the only way to do that would be to push some GUI element, push a white rectangle masking off what you're going to overwrite, then pushing the remainder.
I decided to switch gears a little bit and work on the image editor, here's the start:

Right now you can just open it, but the rest'll be pretty easy, really. What tools does everyone think would be useful? Pixel level, rectangles, circles, text (with various fonts, maybe custom?!)? What else?
You should add a function for a bitmap image to be converted, and then a "selection window" like a sort of cropping tool for the size of the pic on a calc, then it makes that into a picture based on the user decided area.

And just for the heck of it, take that pic and turn it into hex, I have thoughts of doing that for FFME, but a Pic is huge, and it would take forever.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3, 4, 5 ... 30, 31, 32  Next
» View previous topic :: View next topic  
Page 4 of 32
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement