Replies: 1 comment
-
continued investigating this. One big thing I found is that for some reason, I have to cv->drawChar() with relative cords, but call repaintRect() from absolute coordinates. Not sure why, probably the way I set it up, but that works. Although none of the primitives I paint will show if I use fillBackground(true)--they do flicker through, but are constantly being overwritten by the background...i can live with that if there is not a fix. But in figuring that out, I ran into a different issue. It seems, when I make a call to update a read out, which is done in a for loop of the digits the following runs (started by a timer):
so I call for the repaint, right after the drawChar. for each digit that needs updating, I get a unique GENPAINTEVENTS:
What I am seeing is, only the last event is actually getting drawn on the screen. I've tested it by printing less of the digits, always just displays the last event of that cycle. when the next timer update hits, it posts all the right rect updates, but only the last one sticks. I assume each drawChar() needs to be repainted before the next, right? and Im doing that. the debug looks identical to the one I made using uiLablels. What might I be doing wrong? |
Beta Was this translation helpful? Give feedback.
-
as an alternative to: #259
When I first started building this, I was too intimidated by the GUI example and just wrote the whole thing using a canvas. Mostly fillRect() calls with a few drawChar() calls in there...worked well.
Then it came time to workout user input & that was all done so nicely in GUI. So I took the time to restructure & build it using UI elements. Now that I've hit what seems to be a max elements wall, I'd like to keep the GUI setup, but switch back the the primitive system I used initially.
In doing this, I'm having a hell of a time trying to get even the most basic of primitives to display. Actually, it seems like anything I do during initialization, posts...kinda...it only shows up if the fillBackground() is set false for the frame.
I have tried various calls to redrawWindow() , repaintRect() & frankly every other thing I could try (i've put like 10 hours into figuring this out & getting no where).
I'm happy to post code if needed, but its a mess at the moment, so I'm not sure how useful it would be. But if you think it would help, just ask.
Beta Was this translation helpful? Give feedback.
All reactions