Collapsible functions in IDE
#10
(02-01-2023, 05:03 PM)RokCoder Wrote:
(02-01-2023, 04:25 PM)TerryRitchie Wrote:
(02-01-2023, 04:11 PM)RhoSigma Wrote: Just in case you guys didn't found it yet, here's my Notepad++ config for QB64.

Had no idea, thank you for pointing this out. I love the QB64 IDE but often times need a scratch pad to hold functions and other code. This np++ config looks perfect for that.

As far as organizing in the IDE when programming; I have a tenancy of placing finished working funcs and subs at the bottom of the code leaving only the funcs and subs at the top that I'm currently working on. When finished with a project I'll either move them around in a more ordered fashion or in the case of libraries in alphabetical order.

Also, in projects I'll surround subs and functions with a box with the name of it off to the right hand side like so:
Code: (Select All)
'--------------------------------------------------------------------------------------------------------------------------+--------------+
SUB HandleEvents () '                                                                                                      | HandleEvents |
    '+---------------------------------------------------------------------------------------------------------------------+--------------+
    '| Monitor and handle various event happenings throughout game                                                                        |
    '+------------------------------------------------------------------------------------------------------------------------------------+

As I scroll through the code I can look at the tab labels I've created on the right-hand side to identify funcs and subs quickly.

I've seen your code layout and it's beautiful to look at and read. I would say it's a good way you have for navigating while developing without the option of being able to collapse code.

Thank you Smile

I've recently changed to this style. It mimics a folder looking structure and stands out much more than the first example I posted. I still use the box structures using "+" and"-" characters for comment boxes within the code itself. They now contrast each other very well, making the subs and funcs pop out much better.

Code: (Select All)
' ____________________________________________________________________________________________________________________________
'/                                                                                                                            \
FUNCTION SL.SHEET.LOAD (Filename AS STRING, SpriteWidth AS INTEGER, SpriteHeight AS INTEGER, Transparent AS _UNSIGNED LONG) ' |
    ' ________________________________________________________________________________________________________________________|____
    '/                                                                                                                             \
    '| Loads a sprite sheet into RAM and returns a sprite sheet array index pointer.                                               |
    '|                                                                                                                             |
    '| MySheet = SL.SHEET.LOAD("MySheet.png", 32, 32, _RGB32(255, 0, 255)                                                          |
    '|                                                                                                                             |
    '| Filename     - the name of the image file                                                                                   |
    '| SpriteWidth  - the width of each sprite on the sheet                                                                        |
    '| SpriteHeight - the height of each sprite on the sheet                                                                       |
    '| Transparent  - the transparent color of the sprite (0 or SL_AUTO to use the image's existing transparency color)            |
    '\_____________________________________________________________________________________________________________________________/
Reply


Messages In This Thread
Collapsible functions in IDE - by RokCoder - 02-01-2023, 09:48 AM
RE: Collapsible functions in IDE - by Dimster - 02-01-2023, 02:01 PM
RE: Collapsible functions in IDE - by SMcNeill - 02-01-2023, 02:17 PM
RE: Collapsible functions in IDE - by mnrvovrfc - 02-01-2023, 03:40 PM
RE: Collapsible functions in IDE - by RokCoder - 02-01-2023, 04:29 PM
RE: Collapsible functions in IDE - by RhoSigma - 02-01-2023, 04:11 PM
RE: Collapsible functions in IDE - by RokCoder - 02-01-2023, 05:03 PM
RE: Collapsible functions in IDE - by TerryRitchie - 02-01-2023, 07:22 PM
RE: Collapsible functions in IDE - by RhoSigma - 02-02-2023, 12:33 AM
RE: Collapsible functions in IDE - by mnrvovrfc - 02-02-2023, 01:38 AM
RE: Collapsible functions in IDE - by bobalooie - 02-03-2023, 01:47 AM
RE: Collapsible functions in IDE - by RhoSigma - 02-10-2023, 10:08 PM
RE: Collapsible functions in IDE - by aurel - 02-02-2023, 07:47 AM
RE: Collapsible functions in IDE - by mnrvovrfc - 02-02-2023, 02:33 PM
RE: Collapsible functions in IDE - by mnrvovrfc - 02-06-2023, 07:50 PM
RE: Collapsible functions in IDE - by bert22306 - 02-06-2023, 11:04 PM
RE: Collapsible functions in IDE - by mnrvovrfc - 02-07-2023, 09:39 PM
RE: Collapsible functions in IDE - by SMcNeill - 02-07-2023, 01:58 AM
RE: Collapsible functions in IDE - by bplus - 02-06-2023, 08:08 PM
RE: Collapsible functions in IDE - by bplus - 02-07-2023, 12:09 AM



Users browsing this thread: 13 Guest(s)