garrynewman / GWEN

Abandoned: GWEN - GUI Without Extravagant Nonsense.
MIT License
428 stars 102 forks source link

Fix the textbox layout behavior, add DXSDKDIR to premake and restore default skin #36

Closed jeremieroy closed 11 years ago

jeremieroy commented 11 years ago

This commit fix the centering issue of the textbox (broken recently due to selection behavior) The selection behavior of text box was also fixed to work the way you would expect it to work, (cursor stay at the left or right of an approximate character size instead of jumping to the middle suddenly) (I may implement the Multiline textbox selection later on, but this is a bit more tricky)

The DefaultSkin.png was modified to restore the default skin of some controls, mostly textBox. Was it removed on purpose ? (This make the samples look broken :s)

I added the DirectX SDK include and bin dirs to the premake file (only for DX renderers and sample) so that it compile with msvc2010, adding the SDK as a global include in VS is not recommended.

jeremieroy commented 11 years ago

Also the behavior of SetSelectAllOnFocus on focus as a "work once" seems a bit broken like this. Don't you think ?

jeremieroy commented 11 years ago

Using the GetFont()->size as slidingZone not the correct behavior, I need an average (scaled ?) character width (I'm going to use "_"). Going to fix that today. (In the meantime, I'm implementing multiline selection)