![]() |
Forum Index : Microcontroller and PC projects : Introducing: GUI Editor for the PicoMiteVGA
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Peter63 Regular Member ![]() Joined: 28/07/2017 Location: SwedenPosts: 89 |
Daniel, Thanks. I'm glad that Colour Palette can be used in other programs. I have some ideas for GUI myself, but I'll get back to you. Some things I've thought about before are "ComboBox" and "ParameterBox", and I think also "pop-up-menu"... If you can move a mouse cursor on the screen, you must have GUI routines that can handle user input. /Peter63 |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 664 |
Update: - Added selection between Numbers only / All Chars (Entry Form) Now supports these resolutions so more users can test or play with, if they want: - 848x480 (Widescreen) <- as seen on the image below - 720x400 (Widescreen) - 800x600 4:3 - 640x480 4:3 - small bugfixes ![]() File: gui_editor_b22a.zip Greetings Daniel Edited 2025-07-08 04:18 by Amnesie |
||||
Peter63 Regular Member ![]() Joined: 28/07/2017 Location: SwedenPosts: 89 |
Tested resolution 640x480: ![]() /Peter63 |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9608 |
Excellent! ![]() ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Marcel27![]() Regular Member ![]() Joined: 13/08/2024 Location: NetherlandsPosts: 94 |
Daniel, Wow, looks very nice this hardware build. Marcel |
||||
dddns Guru ![]() Joined: 20/09/2024 Location: GermanyPosts: 544 |
And the GUI editor looks very nice too! |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 664 |
Update: Now everything "basic" is integrated and all is functional... - Text Item is working now and allows long text line - Window Item is now completly removable (not everyone wants the window frame!) - Resolution adjustments and fixes For the next update, I will finally add the option for more items (of each sort) current maximum is 3 per item category. gui_editor_b22a.zip Greetings Daniel |
||||
Peter63 Regular Member ![]() Joined: 28/07/2017 Location: SwedenPosts: 89 |
![]() /Peter63 |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 664 |
Update: program size is getting bigger and bigger, so now Library usage is needed - but this is easier than I initially thought (first time for me using this feature). Save routine is completly excluded in a sub which lives in the Library. More buttons, more fun: ![]() Gui Editor.zip Greetings Daniel |
||||
Peter63 Regular Member ![]() Joined: 28/07/2017 Location: SwedenPosts: 89 |
testing... ![]() /Peter63 |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 664 |
Peter63. thank you a lot for the testing! It is funny I had the same in mind you are showing in your test with your buttons, but reached the out of memory error. Now this problems is solved with library and I will allow up to 12 buttons, this way you can integrate a complete Numblock 0,1,2,3,4,5,6,7,8,9 and for example ENTER etc. ![]() Dropdown menu would be nice, too. I am trying my best to implement one. I am glad that the library function exists, never thought it would be that easy! Greetings Daniel Edited 2025-07-10 19:42 by Amnesie |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7933 |
Probably not so important in this case, but assuming that you can use the Library as an extension to your own software isn't really very friendly to the user, who may already have their own routines in the library. Did you consider using CHAIN to split your program into two or more sections? Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 664 |
Thanks for this idea! You are right, If anyone already has a library in the flash slot it isn't that good. Personally I've never used a library, but you are right, I can not assume that this applies to everyone. At least one can save a library and "restore" it etc. so it isn't a real problem only inconvenient. CHAIN command sounds interesting! Never heard that before. I will consult the manual and think about it. The most important thing is: I MUST save all my global variables when "chaining", if this is possible, then I would prefer your idea. Because in my global variables are the actually values which needed to be saved. I would exclude the save routine in the second *.bas file, but if this is loaded, I need the variables from the main program. If this is possible, I will do it. But now I need to consult the manual again ![]() Thank you very much for your input and ideas!! Greetings Daniel |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 664 |
Read about the CHAIN idea in the manual but don't really understand if I really need the flash slots; if so there is nothing gained. If another user already has a flash slot used, it is the same with my library approach. My question is: is chaining also possible on SD-card (with "real" *.bas files), while preserving the variables? Hm... Edited 2025-07-10 20:39 by Amnesie |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7933 |
CHAIN works with ordinary files on A: or B: FLASH CHAIN works with flash slots. The idea of the CHAIN commands is that you switch to a new program, leaving the variables intact. You can then CHAIN back again, of course. When you use CHAIN it's a good idea to specify the full filename. MMiINFO$(PATH) should return the current path, so it should be reasonably easy to CHAIN to sections of program stored in the same directory or on the same drive that the program was loaded from. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 664 |
Thank you Mick, this sounds like it exactly does what I want. I will try it. If it works (or I am not to dumb to integrate it) it is the best solution! Greetings Daniel |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 664 |
Isn't that easy to implement CHAIN, I ran into problems: What I did so far: Main program: gui_editor.bas Excluded save routine: saveRoutine.bas From the main program I run in my main loop: If saveClicked=1 Then Chain "saveRoutine.bas" then in the "saveRoutine.bas" my code on the top is: saveWindowToFile() Sub saveWindowToFile Open "guiWindow1.bas" For OUTPUT As #2 Print #2, "Option explicit" Print #2, "MODE 3" ... ... etc.. And If I run my main program and click the "save" button in my software, the Error occurs: ....Dim "Dim Integer col".. already declared... Have you any suggestions how to implement this? It seems like I have to say to the inerpreter, that he doesn't need to run through all the (main program) variable declatation again if he is back?! Bu the strange hing is, for now I have no "back chain" to the main program from the "saveRoutine.bas"... Why he goes back anyways? Hmm.. Tried different debugging methods to see if he jumps into the chained program at all, seems like he don't... (I tried with some PRINT debugging in the chained program like "hey I am there") end even "END", so that he doesn'tt go back to the main program.. but always the same error: "already declared" My files: Gui Editor1.zip Greettings Daniel Edited 2025-07-10 22:18 by Amnesie |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2638 |
Perhaps use ON ERROR SKIP x ahead of all the DIM lines, or use a flag in an IF to skip over all the DIMs if it has been set in "a:saveRoutine.bas". So perhaps the drive letter should be included. A mistake I keep making is forgetting to update the file copies of the two programs after editing. That gets confusing! Here is a test of chain, added to another program. > LIST and a test version of saveRoutine.basPrint "This is envelope generator.bas" If x<>4 Then Chain "a:saveRoutine.bas" Print "PLAY LOAD SOUND envelope generator for multi cycle waveforms" ..... > list "saveRoutine.bas" Print "This is saveRoutine.bas x =";x x=4 ? "now x =";x Chain "a:envelope generator.bas" > and the output > RUN This is envelope generator.bas This is saveRoutine.bas x = 0 now x = 4 This is envelope generator.bas PLAY LOAD SOUND envelope generator for multi cycle waveforms Edited 2025-07-10 23:29 by phil99 |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7933 |
I hope you aren't DIMing in the CHAINed program. There's no need to as within the CHAINed section all DIMs have already been done in the main one. Also, don't put the CHAIN command in a SUB or FUNCTION or you'll mess things up because it won't know where to return to. Call it from your main program loop. Programs for CHAINing can be awkward to test as they have no variables specified by DIM. It's an idea to put those statements in a block and, before saving it ready for CHAINing, comment the block out. You will need to put the DIM statements in your main prgram like that, but you shouldn't get DIM errors as the variables will have been predefined at the start of the CHAIN. . Edited 2025-07-11 00:23 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Peter63 Regular Member ![]() Joined: 28/07/2017 Location: SwedenPosts: 89 |
Test this: 1. LIBRARY DELETE 2. LOAD "saveRoutine.bas" 3. LIBRARY SAVE Otherwise, it seems like DIM found within Print #2, "Dim Integer col" etc. are interpreted in the file as DIM instructions. Which seems a bit unfortunate. Sub saveWindowToFile Open "guiWindow1.bas" For OUTPUT As #2 Print #2, "Option explicit" Print #2, "MODE 3" Print #2, "CLS" Print #2, "" Print #2, "'GENERAL variables -------------" Print #2, "Dim Integer col" Print #2, "Dim c1(16) As integer 'PicoMiteVGA colour palette" Print #2, "Dim integer refresh=0" Print #2, "Dim integer once=0 'only allow retriggering once" I know I've had some strange things happen if I don't delete the library first with LIBRARY DELETE. Just trying it out but otherwise it seems a bit ??? /Peter63 |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |