As far as I see, the entries are rotating correctly. Unless the problem is as serega describes above–in which case see their answer–what is the behaviour that you’re expecting, but not seeing?
I seem to understand that they move along their axis randomly.
from direct.showbase.ShowBase import ShowBase
from direct.gui.DirectGui import DirectEntry, DirectEntryScroll, DGG
base = ShowBase()
de = DirectEntry(initialText='Enter Text Here', relief=1, width=100)
des = DirectEntryScroll(de, relief=1, scale=(0.05,1,.05), clipSize=(-20,20,-20,20))
des.setR(60)
base.run()
Try to fill in the field, it will shift.
It depends on the text, which is naturally expected. However, it is difficult to position it.
I think the problem here is not the way it rotates but that the scrolled entry isn’t “cut” correct. It only rotates the text entry, not the scissor effect which makes the ends of the scrolled text field not flat.
The behavior of the scrolled entry is a bit odd nontheless. It “grows” a little at first but that might also come from the way it is positioned in the box that cuts the rest of this entry visually. I’m not that fond of the actual internals of this nor how it originally has intentionally been used but I guess the rotation of the scrolled entry should also rotate the effect if possible. This might also fix the other bug you found.
I guess opening up an issue on github would be a good idea for those things.
Thanks to everyone for your replies.
Yes, I mean that when the control is turned at that angle it generates a strange effect on the rectangle. It is not keeping its rectangular shape.
This happens only for the directentryscroll control.
This is not really a bug, more of a wrong usage of the clip frame. The entry itself is left aligned which maes the left edge of the entry be its 0-position on the X-Axsis. If the clip frame starts left at 0 the entry will be back at the correct location again once the cursor moves back.
Hmm, I’m not sure a scissor effect can be rotated (for example, when I searched for the rotation of OpenGL glScissor, it seems like that doesn’t work) and looking in the source code of Panda, a ScissorAttrib appears to be defined with a (left, right, bottom, top) frame relative to the current DisplayRegion, so I’m wondering how this could take rotation into account.
In case no fix is possible, one workaround I could imagine is rendering the DirectEntryScroll to a texture buffer and apply the texture to a card that has the same size as the DirectEntryScroll. This card could then be rotated as desired.
Probably a bit too over-complicated to be a viable solution, though .