muXed
New Member
Posts: 15
|
Post by muXed on Oct 24, 2020 11:57:53 GMT -5
Hi all,
Currently working on a new project; however this particular project uses graphics boxes for GUI elements / decorations.
This is my first time using graphics boxes, a new approach for me as previously i'd use bmp buttons and disable them. Found this to be rather slow and having to split say menu images into multiple segments is incredibly time consuming and tedious.
But i'm struggling with the issue of the graphics boxes becoming empty when the window is no longer at the top.
What's the best way to counter this?
Kind Regards, Sam
|
|
|
Post by tenochtitlanuk on Oct 24, 2020 12:12:31 GMT -5
Are you issuing a 'flush'?
print #handle, "flush"
Help file- This command ensures that drawn graphics 'stick'.
Each time a flush command is issued after one or more drawing operations, a new group (called a segment) is created. Each segment of drawn items has an ID number. The segment command retrieves the ID number of the current segment. Each time a segment is flushed, a new empty segment is created, and the ID number increases by one. See also the commands cls, delsegment, discard, redraw, and segment. to the graphics?
|
|
muXed
New Member
Posts: 15
|
Post by muXed on Oct 24, 2020 12:17:31 GMT -5
Well that is simple.... and now slightly embarrassing....
Thank you teno! Works a charm
|
|
|
Post by Brandon Parker on Oct 24, 2020 20:48:01 GMT -5
I would suggest using "named" segments in lieu of the Segment ID. It probably just my preference, but I find it WAY easier to deal with segment names...
#myGraphicBox "Flush mySegment"
#myGraphicBox "DelSegment mySegment"
Just remember that graphics can be a huge issue if you do not handle the flushed segments correctly. You could, if not handling segments correctly, cause your program to chew through memory and/or crash.
{:0)
Brandon Parker
|
|