new gui stuff =)
Today and yesterday i wrote alot of new gui stuff:
GuiFrameView, wich is adding just a rect that shows a frame from an timage object to the vertexbuffer of the containing window,
This can be a classic max2d like frame or my new IMP frame system.
same as a new TextButton, wich is adding 3 rechts, to the buffer, 2 for the both "end piceces" and a stretched one, also it adds a ttexthandle to the buffer.
Width can be auto assigned from the text, or manually setted (in this case the text will centrated in the button)
Also i added a (not so) simple text lists, that got a buildin support for the mouse stuff, detecting wich entry was hovered/klicked, the possiblity to set a function pointer that is called when a list entry is clicked, and some methods for getting the last clicked ID or Text.
Also included is autscroll down when new text entry appears, and a "max entrys" setting.
When a flag is set you cann scroll the menu when you with the mouse over with the mousewheel
Also the first visibile entry can be used to point them into pointer buttons, or then in future comming pointer scroller, wich can modify the var behind the pointer depending on how you scroll it.
And another nice extra are "Entity buttons", a button that can be atached to an entity, and fixes up its position to the entity, also there is a special extend of that that uses 2 extra pivots to "stretch" the button over the entity, wich can be handy maybe sometimes B)
This the first implement of the entity buttons is just using tann2d´s drawimagerect instead of adding the button to the buffer arrays of the windows, because the buttons will "delete" them self from the carrier window when the entity to wich them attached is Freed, and so i would neet to rebuild the whole window array anytime when a new entity button apears or is getting deleted.
Maybe i create a differend kind later that means to be more a "static entity button" wich is more for entitys that stay over the whole time, but im not sure if this is a good idea, sinc when i have like 100 entitys thate are not in view, there would still be room in the windowarray for them, and the quads/tris would be still drawn (because i dont use an arrayindex)
so At least here some screenshots =)
Some textbuttons, textfields, iconbuttons with differend modes in action.
The new textlist in action
Some "EntityButtons" in action
Enjoy life!
5 Comments
Recommended Comments