achimdoebler / UGUI

µGUI - Open Source GUI module for embedded systems
Other
1.2k stars 415 forks source link

Font engine reworked: support for glyph width, antialiased fonts, gly… #6

Closed Sermus closed 9 years ago

Sermus commented 9 years ago

…ph ranges

Postrender support for buttons and textboxes Refactoring in glyph rendering Support for text alignment in buttons Press and release events for buttons Disablable rendering for borders and inner area Accelerator function for pixel batching (used in font rendering)

achimdoebler commented 9 years ago

Hi Andrey,

as discussed, your enhancements are amzing! Unfortunately OBJ_EVENT_RELEASED overrides BTN_EVENT_CLICKED. I'll mark this as a bug.

BR, Achim

Sermus commented 9 years ago

Yep, this is the thing I'd like to discuss with you. Does it make much sense to keep aliases for every object type? Can't we keep just OBJ_ identifiers? Otherwise extending object type list will create combinatorial growth of these aliases.

Andrey. Sent from my mobile device. 09 мая 2015 г. 16:39 пользователь "Achim Döbler" notifications@github.com написал:

Hi Andrey,

as discussed, your enhancements are amzing! Unfortunately OBJ_EVENT_RELEASED overrides BTN_EVENT_CLICKED. I'll mark this as a bug.

BR, Achim

— Reply to this email directly or view it on GitHub https://github.com/achimdoebler/UGUI/pull/6#issuecomment-100485264.

achimdoebler commented 9 years ago

Maybe future objects need unique events (like "event_mouseover" or "event_dragdrop"). Therefore every object should generally support different events. I have also created generic events like "obj_event_clicked" which can be used by any object. All object-related events should always start with an identifier (even generic ones!) which cleary describes its associated object type (e.g. "BTN_xxx_xxx" for button object). Therefore, in my point of view, the risk of a too large amount of possible events is not given, since, due to the identifier, it is always clear which object supports which events.

achimdoebler commented 9 years ago

Therefore, for example "OBJ_EVENT_CLICKED" should never be used directly, but as

define BTN_EVENT_CLICKED OBJ_EVENT_CLICKED

for a button object.