fatcoder
Member
|
GuiPC offset
What is "offset" supposed to be offset from in GuiPC?
The comment says, "screen offset which should be used for drawing object components" but that doesn't indicate what it should be offset from. i.e. is it an offset from the center of the screen?
|
|
01-15-2012 05:43 AM |
|
Esenthel
Administrator
|
RE: GuiPC offset
09 - Extending Gui Objects tutorial uses offset
it is offset from object local position (in parent space) to screen position (global space)
|
|
01-18-2012 06:41 PM |
|
fatcoder
Member
|
RE: GuiPC offset
Thanks for the reply. I know what the offset is and what it is used for, I'm just not sure how it is derived. i.e. is it the upper left corner of an object, or the center or the object offset from the center of the screen?
I've built my own custom window object and I need to draw its children, so to do that I create a GuiPC and pass it to each child object. I'm setting the offset before passing to the children like this.
Code:
new_gpc.offset = rect.lu() + gpc.offset();
So far this seems to be working, so I'm assuming it is the offset from the center of the screen to the parent object's upper left corner. Please correct me if I'm wrong or confirm if I'm correct.
|
|
01-19-2012 04:06 AM |
|
Esenthel
Administrator
|
RE: GuiPC offset
It is okay!
|
|
01-19-2012 10:42 AM |
|