Commit Graph

1163 Commits

Author SHA1 Message Date
Emil Segerås
13953060de Size improvements for skin elements. Part of #8.
Moved intrinsic skin size logic from widgets to skin and added attributes:

pref-width and pref-height overrides widget calculated pref-width
and pref-height.

width and height specifies intrinsic width and height.
2014-03-29 21:35:59 +01:00
Emil Segerås
7512fe0c5a Added API to abort animations of a given type. 2014-03-21 20:30:43 +01:00
Emil Segerås
d9e93698e1 Fixed superfluous scrollbar change events.
Adjust invalid max to min instead of the reverse since it's a much
more common use case that min is 0 and max is calculated.

TBEditField calculates a negative max when scrollbars aren't needed
which changed both min and value each time, causing change events.
2014-03-21 20:27:08 +01:00
Emil Segerås
249c689f52 Removed "#define nullptr" since it can cause compile errors.
nullptr is a keyword. If some compiler doesn't have nullptr, it would
be better to define nullptr for that compiler specifically.
2014-03-20 21:03:30 +01:00
Emil Segerås
222f997e6d TBAnimationObject should be a TBTypedObject.
So animation listeners know how to cast safely.
2014-03-16 13:34:40 +01:00
Emil Segerås
3d71eaf49d Added getters for widget children iterators. 2014-03-16 13:31:39 +01:00
Emil Segerås
4d50b23b73 Use constexpr ids for setting default skin on widgets. 2014-03-16 13:31:34 +01:00
Emil Segerås
07aaa133d3 Mention animation updates in integration guide. 2014-03-13 21:42:10 +01:00
Emil Segerås
62269fcdf0 Fixed opacity of overlay skin elements.
Also added useful HasListener method.
2014-03-12 21:19:58 +01:00
Emil Segerås
11039fbba7 Fixed bug when changing individual color channels on Vertex.
All where sharing the same address.
2014-03-11 20:55:41 +01:00
Emil Segerås
ac3ea937f8 Added missing invalidation when making widgets invisible. 2014-03-11 20:31:43 +01:00
Emil Segerås
03af2bc12c Fixed parsing bug with trailing white space.
Ending whitespace made it believe there was an array, so any values was
inserted into an TBValueArray.
2014-03-11 20:28:05 +01:00
Emil Segerås
469718ba75 Added opacity attribute to resource reading. 2014-03-10 18:12:17 +01:00
Emil Segerås
6db16e7746 Fixed bug with vertical TBSlider.
The handle was not positioned correctly.
2014-03-10 17:56:35 +01:00
Emil Segerås
dcff225d04 Worked around bad scheduling in windows demo backend. 2014-03-02 21:45:58 +01:00
Emil Segerås
c5c7670a23 Added testing of constantly busy message handler. 2014-03-02 21:45:54 +01:00
Emil Segerås
50052b8ad1 Compilefix when using TBDebugPrint outside tb namespace. 2014-03-02 21:45:23 +01:00
Emil Segerås
47636e061a Fix timer reschedule bug in demo app.
When non-delayed messages where fired repeatedly, the
reschedule method didn't schedule after the first time.
2014-03-02 21:45:07 +01:00
Emil Segerås
8323e10d18 Kickstart invalidations when animations start. (regression)
Modified old hack that stopped working with commit ec67319f56.

I changed so animations are already "running" in the animation manager when OnAnimationStart is called.
Since we're going to repaint as long as there's animations, it doesn't really matter and we can always just call Invalidate.
2014-02-25 21:11:05 +01:00
Emil Segerås
7c94d3b2bb Fixed incorrect file reference in visual studio project file. 2014-02-25 21:04:30 +01:00
Emil Segerås
76f3c7b1c4 Set selected state on items with open submenus. 2014-02-24 21:26:15 +01:00
Emil Segerås
e62d342f91 Added another unit test for linklist, and minor API addition. 2014-02-23 20:47:36 +01:00
Emil Segerås
ec67319f56 Added TBAnimationListener and cleaned up animation object deletion.
Animating animation objects are owned by TBAnimationManager. They have to
be kept alive at least until all listeners are called.
2014-02-23 13:08:43 +01:00
Emil Segerås
8c6c3cb025 Fixed TBLinkList bug.
When a plain linklist (not an autodeleting one) was destroyed without first clearing
items, the items were left to believe they where still in a list.
2014-02-23 12:53:08 +01:00
Emil Segerås
71a6880c1b Minor layout change in demo menu.
Let the debug window button stick to bottom if not pushed out by other content.
2014-02-21 21:19:22 +01:00
Emil Segerås
c775879419 TBSection should not grow larger than its content when there's extra space available. 2014-02-21 21:14:56 +01:00
Emil Segerås
822d631502 Fixed uninitialized member in TBMessageWindowSettings. 2014-02-21 21:12:10 +01:00
Emil Segerås
81a5c794b2 Added some missing generic widget attributes to resource reader. 2014-02-19 20:56:35 +01:00
Emil Segerås
7efae3dd59 Make sure TBSelectDropdown close any visible window it may have when it dies. 2014-02-19 20:45:36 +01:00
Emil Segerås
71474475e6 Quick mention of tb_config.h in integration.txt 2014-02-16 13:18:25 +01:00
Emil Segerås
47916ba991 Added tb_config.h defines for default gl renderer. 2014-02-16 13:13:14 +01:00
Emil Segerås
bb06e7996c Added styled text to TBButton example.
Removed old comment. New way of doing things is to build like lego.
With widgets as building blocks, build whatever you want. Instead
of implementing everything :)
2014-02-12 20:38:29 +01:00
Emil Segerås
1924578666 Fix #7 TBButton should let height grow by default.
Fix is actually in TBTextField since that's the default content of a TBButton.

Introduced by d659761dd9.
2014-02-12 20:32:07 +01:00
Emil Segerås
d5f0f745c6 SetGravity should invalidate layout.
It's very likely that relayout is needed to apply the gravity.
2014-02-12 19:44:25 +01:00
Emil Segerås
4b59507aa0 Layout params specified from resources should inherit any specified in widget constructor. 2014-02-12 19:39:43 +01:00
Emil Segerås
4bcb904fa1 Fixed so many tabs in TBTabContainer doesn't grow parent.
Only the actual content should do that. The tabs scroll anyway.
2014-02-11 21:00:33 +01:00
Emil Segerås
5b55d423ba "spacing" and "virtual-width" should be read as dimensions.
spacing was always read like dp
virtual-width was always read like px
2014-02-11 20:46:05 +01:00
Emil Segerås
88f6d37e74 Fixed parsing bug that negative dimensions was ignored.
The default value was returned since it was believed to not be a number.
2014-02-11 20:33:45 +01:00
Emil Segerås
559b05b108 Cleanup of old layout test. 2014-02-09 20:44:51 +01:00
Emil Segerås
28ad71274f Added triangle count to output when batch debugging is enabled. 2014-02-08 12:50:17 +01:00
Emil Segerås
8c5a2cbf96 Added configuration defines for font systems & stb image loader.
Also added stb_truetype.h so it works out of the box just by enabling it.
2014-02-06 21:09:51 +01:00
Emil Segerås
0371a401ac Make tb_config.h overridable in application (easier to use tb project for multiple projects).
The library now search for tb_config.h in the solution directory first.
2014-02-06 20:33:08 +01:00
Emil Segerås
d9f260fc92 Mention touch input emulation in demo. 2014-02-04 21:50:30 +01:00
Emil Segerås
51792d75c0 Show the demo screenshot from readme.md 2014-02-03 21:12:24 +01:00
Emil Segerås
32c270258a Added demo screenshot 2014-02-03 21:05:23 +01:00
Emil Segerås
eec559f90d Compilefix if defining TB_RUNTIME_DEBUG_INFO in release builds 2014-02-03 19:01:03 +01:00
Emil Segerås
d41d0ca73a Added long click event.
If enabled but not handled, fire a context menu event.
2014-02-01 21:59:31 +01:00
Emil Segerås
cc356f2d68 Renamed repository 2014-01-25 13:41:21 +01:00
Emil Segerås
c0398463fe Renamed library project. 2014-01-16 21:08:13 +01:00
Emil Segerås
92e1f0e59c Renamed android demo files & classes 2014-01-16 21:08:12 +01:00