|
Post by rosy on Mar 16, 2022 14:16:25 GMT -6
johnno56 I will try it out when I get home. To answer some of your questions: 1. Inkey only registers a single key per update which is really not useful for anything. I would recommend you use the ReadInput functions (check out the "Text Editing" section in the manual) And you write faster than 60 characters / sec. ? Congratulations!
|
|
|
Post by n00b on Mar 16, 2022 14:31:14 GMT -6
Not a key per second but a key per update. Its always going to be the last key in the queue.
Even if you don't type that fast there is a chance that your key press won't be in the queue on the same frame you read it.
If you need to enter text in a graphics window you should be using the ReadInput functions. If you need to check key presses in general you should be using Key().
|
|
|
Post by n00b on Mar 16, 2022 14:32:27 GMT -6
I am in the process of re-designing the scheme editor. I am trying to make it, for all intent and purposes, mouse driven. The only exception would be if a filename is requested.... As RC does not have a 'zone' function* I have, as Rosy rightly pointed out, modified a AABB collision detection algorithm to 'detect' the interaction with the mouse and buttons. Please do not comment about the hideous aesthetics... This is just a test of concept. The test works. What I would like are constructive suggestions on how to make it more efficient. Thanks guys. J View Attachment* ( n00b not a complaint... *gulp*) I will try it out tonight when I get home.
|
|
|
Post by rosy on Mar 16, 2022 15:26:51 GMT -6
I do not see the possibility that InKey would lose any key during the 60 hz refresh
|
|
|
Post by johnno56 on Mar 20, 2022 0:21:49 GMT -6
Brief update: (no release... yet...)
Finally figured out how to integrate a scheme (using noob's parser)... fingers crossed... Currently working on a "load" routine... Normally, an application will 'open' a file via a drop-down menu, but the editor is not 'normal'. Without a gui, this is what I have done, and currently planning. When the editor starts, it issues a 'system' command to list the available '.scheme' files to a text file. (done) I am setting up a 'load' button to 'read' the text file and display it... (w.i.p.) then hopefully use the 'read_input' command to instruct noob's parser to load the file. If anyone knows of a more simple method, I am 'all ears'....
This editor is taking WAY too long (in my opinion) and am quickly running out of patience and inspiration... I do not know how you guys can handle such long projects... I am done for today... Hopefully I can concentrate better tomorrow...
J
|
|
|
Post by n00b on Mar 21, 2022 15:21:23 GMT -6
I do not see the possibility that InKey would lose any key during the 60 hz refresh If using InKey is working for you then continue using it. I am just pointing out that it is the least efficient way of getting text input. Brief update: (no release... yet...) Finally figured out how to integrate a scheme (using noob's parser)... fingers crossed... Currently working on a "load" routine... Normally, an application will 'open' a file via a drop-down menu, but the editor is not 'normal'. Without a gui, this is what I have done, and currently planning. When the editor starts, it issues a 'system' command to list the available '.scheme' files to a text file. (done) I am setting up a 'load' button to 'read' the text file and display it... (w.i.p.) then hopefully use the 'read_input' command to instruct noob's parser to load the file. If anyone knows of a more simple method, I am 'all ears'.... This editor is taking WAY too long (in my opinion) and am quickly running out of patience and inspiration... I do not know how you guys can handle such long projects... I am done for today... Hopefully I can concentrate better tomorrow... J If anybody can figure this out its you. Try to break this down into smaller chunks and tackle them individually. Good luck.
|
|
|
Post by johnno56 on Mar 21, 2022 16:04:40 GMT -6
The button is done and I have the filenames displaying in the console at the moment. At least the creation of the file and the retrieval of the data works. Next step is to select a file and process. I am thinking that an 800x600 screen may not be wide enough. If I can make the 'preview' screen a little larger, I can also use it to list the files and input. First thing first. Display, select and parser the input file....
|
|
|
Post by johnno56 on Mar 23, 2022 1:22:53 GMT -6
Another update: list of scheme files is created when Editor starts. A crude display of the files when 'load' clicked. Unfortunately the file is not assimilated. Segmentation fault. Obviously an array is out of whack. So close... Out with the fine-toothed comb... *sigh*
I really have to have error trapping... any ideas? Where does RC store its error logs? Umm... It does create error logs, right? Otherwise I am going to need a larger comb... *sigh*
|
|
|
Post by n00b on Mar 23, 2022 2:35:26 GMT -6
Another update: list of scheme files is created when Editor starts. A crude display of the files when 'load' clicked. Unfortunately the file is not assimilated. Segmentation fault. Obviously an array is out of whack. So close... Out with the fine-toothed comb... *sigh* I really have to have error trapping... any ideas? Where does RC store its error logs? Umm... It does create error logs, right? Otherwise I am going to need a larger comb... *sigh* Sorry, no error logs currently. I do have some debugging tools on a list of things to work on but for now I would suggest abusing the PRINT command.
|
|
|
Post by johnno56 on Mar 23, 2022 3:21:57 GMT -6
Ah yes... Now 'that' method of debugging I am familiar with... Looks like Mr. Print is going to get quite a work out... lol
|
|
|
Post by johnno56 on Mar 23, 2022 14:44:25 GMT -6
Segmentation fault corrected. Stupid mistake!! When the default scheme is loaded at startup, scheme_properties_count, keeps track of each item. Here is the kicker. Load another scheme and scheme_properties_count, unless "reset to zero", accumulates beyond the items limit!! Mistake found using your tried and true method of debugging... Cool... Onto the next glitch... I need coffee...
|
|
|
Post by johnno56 on Mar 24, 2022 0:39:35 GMT -6
Ok. This version loads and saves schemes (to and from the Editor's folder). I only know how to configure file paths for Linux. Yes. I know there is an OS$ command... One of the many... many... modifications needed. No surprises for guessing that there will be many bugs... *sigh* If you want to create a scheme, save it, then copy it into the 'config/schemes' folder of RCBasic. File pathways will be added to the long list of "To Do's" Extract into a folder of your choice. RCSchemer10.zip (967.51 KB) Instructions: A default scheme will be loaded at startup. Create a scheme: To change an item colour: Use the mouse and mouse-wheel to adjust a colour then LMB on an item to set the colour. When you are satisfied with your changes, LMB "save", type a filename, then Enter. The new list of schemes will be generated.
Load a scheme: LMB "Load". This will 'read' the list of schemes and display them. Type a filename then Enter.
Reset: Should clear the item list colours... (Preview for this option needs work... lol)Note: when loading and or saving, do not use a file extension... Constructive criticism and suggestions are always welcome. Where are my manners? Big thanks to n00b for the file parser!!
|
|