Commit Graph

304 Commits

Author SHA1 Message Date
Emil Segerås
cec37809cb Request demo window close on key TB_KEY_ESC. 2012-07-26 17:46:26 +02:00
Emil Segerås
0a027e3b6a Added condition support to skin, and positioning support for skin type image. 2012-07-26 17:39:53 +02:00
Emil Segerås
d59348027d Use TBID representing font names, for font lookups instead of a integer.
Makes it a lot easier to use.
Also make sure widget opacity is clamped.
2012-07-17 20:33:31 +02:00
Emil Segerås
6081709d28 Adde another font size in font selection menu. 2012-07-14 11:17:50 +02:00
Emil Segerås
2952c70c73 Added animation test and default generic item provider that can be fed from resource.
Now generic string items can be added from resource files.
2012-07-14 10:58:58 +02:00
Emil Segerås
4139b78e56 Renamed Widget to TBWidget 2012-07-13 09:49:46 +02:00
Emil Segerås
a920651bc0 Renamed WidgetEvent to TBWidgetEvent 2012-07-13 09:36:31 +02:00
Emil Segerås
541d8c6fae Fix for skin states, override and child skin state elements.
-Changed so the drawing order is the same as specified in the skin.
2012-07-12 17:56:40 +02:00
Emil Segerås
2dbfd0e32a Added "Adapt to content size" on TBEditField and a few other fixes:
-Recalculate content_width properly if the widest line shrink. Also prevent this from happening recursively by locking scrollbar updating during most intensive operations.
-Setting text alignment fixes.
-Avoid setting unnecessary clipping.
-Some cleanup
-Test button in resource window
2012-07-10 07:21:00 +02:00
Emil Segerås
cd175fcea4 Added TBAddon system, and TBImage, TBImageManager, TBImageWidget:
-Makes it easy to extend tinkerbell with new systems & widgets.

-TBImageWidget loads & shows images dynamically (so it's easy to show
  images that are rarely showed and should not be part of the skin).
2012-07-08 21:10:12 +02:00
Emil Segerås
4642294660 Merge branch 'emil_font_wip_4' of C:/Users/emil/Documents/My Dropbox/tinkerbell/gitrep/tinkerbell into emil_font_wip_4 2012-07-07 10:08:34 +02:00
Emil Segerås
a6219b732a Minor demo cleanup 2012-07-07 10:07:00 +02:00
Emil Segerås
3bd5d4d00c Fixed opacity on text. 2012-07-06 15:50:36 +02:00
Emil Segerås
e37e0f328f More work on fonts:
-TBBitmapFragments can be removed individually. Free space is maintained by new TBSpaceAllocator class.
-The glyph cache is now a real cache (forgets least recently used glyph)
-Changes to batcher to handle flushing properly when removing fragments.
-Changes to batcher to wait with validating fragments bitmap until drawing, to avoid flush after each character when the glyph cache is full.
2012-07-06 15:26:42 +02:00
Emil Segerås
25879f03a8 Added a menu buton to the edit window. 2012-06-30 10:48:00 +02:00
Emil Segerås
80a6123235 Some cleanup of demo files & work on resource editor.
Also made a template version of TBGenericStringItemSource to avoid casts to subclasses of TBGenericStringItem.
2012-06-25 18:36:16 +02:00
Emil Segerås
7e9927e5a1 Fix for DrawRect/FillRect color with opacity, and flush batch before modifying texture. 2012-06-25 17:13:48 +02:00
Emil Segerås
4a762cf133 Some demo cleanup. 2012-06-24 17:36:54 +02:00
Emil Segerås
9eac332545 Added context lost & restored listener.
Need to handle context lost & restored in more places than the
skin (in fonts), so the new listener API should be invoked by the
platform instead of just reloading the skin directly.
2012-06-21 16:32:46 +02:00
Emil Segerås
a01137cace New font handling:
-Added TBFontRenderer & TBFontFace etc. with glyph caching using
 TBBitmapFragment.
-Removed hardcoded window title bar height.
-Lots of work to get TBFontFace & TBFontDescription into use in widgets.
-Replaced old TdFont with a new bitmap font system using a TBFontRenderer
 backend. Supports characters in any range, glow and shadow.
2012-06-21 12:06:08 +02:00
Emil Segerås
bbd3d63604 Fixed so TBBitmapFragment can update TBBitmap dynamically.
Also:
UTF-8 fix in demo.
Some cleanup.
2012-06-21 12:01:19 +02:00
Emil Segerås
f5adef3437 Unicode (utf-8) support:
-Added utf-8 conversion functions.
-Switched to utf-8 in clipboard implementation (windows)
-Switched to utf-8 on all resource files.
-Skip BOM character at the beginning of resource files.
-Made old TDFont system unicode aware (not supporting displaying unicode, but able to handle it)
2012-06-10 15:45:32 +02:00
Emil Segerås
877067c40c Changed demo app default window size. 2012-06-02 15:10:30 +02:00
Emil Segerås
f3eadedaef Removed temporary debug text. 2012-05-30 17:45:09 +02:00
Emil Segerås
aaf0f787d1 Let it be up to caller of TBRunTests to assert on failed tests.
Show failed test dialog on fails, instead of annoying assert.
2012-05-29 21:34:05 +02:00
Emil Segerås
9415864fc7 renamed test file 2012-05-28 19:08:56 +02:00
Emil Segerås
f620ae05c7 Changed embedded widget content vertical alignment.
Center around line instead of standing on it. Aligns better with widgets containing a vertically centered line of text.
2012-05-28 19:00:11 +02:00
Emil Segerås
1eeb8547a2 Major changes to PStyleEdit and renaming to TBStyleEdit.
The PStyleEdit code was really old and crappy. This an attempt
to clean up, fix bugs and improve the design completly.

Work in progress - There is still issues to fix, especially with undo & linebreaks.
2012-05-27 21:34:54 +02:00
Emil Segerås
3eddf2f035 Changed recommended order of InvokeProcessStates and InvokeProcess!
Makes much more sense to update states that might affect layout before
the layout. Otherwise changes appear a frame too late.

Might be good with better naming on theese (OnProcess -> OnLayout etc.)
2012-05-20 16:23:26 +02:00
Emil Segerås
4797ac7104 Merge branch 'stb_image_wip' 2012-05-19 15:01:39 +02:00
Emil Segerås
45a3f348e8 Removed TDImage class. 2012-05-19 14:59:46 +02:00
Emil Segerås
0597ea3c68 Replaced lodepng with stb_image. Started removing TdImage. 2012-05-17 13:41:27 +02:00
Emil Segerås
def8da1ed1 Perform gfx load performance test in demo, on "Reload skin bitmaps". 2012-05-17 13:40:46 +02:00
Emil Segerås
1dd6739575 Disabled annoying MS warnings for release builds too. 2012-05-17 12:53:37 +02:00
Emil Segerås
8a54044d5f Some demo cleanup. 2012-05-16 08:42:07 +02:00
Emil Segerås
30c09fa9a2 Moved parser/TBValue.h to tb_value.h 2012-05-16 08:41:55 +02:00
Emil Segerås
d5998d7d6b Added possibility to synchronize widgets values when changed.
Widgets can be connected to TBWidgetValue by the "connection" attribute in
resources (all TBWidgetValue should have unique names). Then the value
can always be set/get from TBWidgetValue instead of various pieces of UI.

Fixes ON_CHANGE event for TBEditField, TBInlineSelect.

Added handy GetText method that returns the string (with no status). Relying on RVO.
2012-05-16 08:41:42 +02:00
Emil Segerås
7d0edca2b0 Removed some gcc warnings. 2012-05-11 19:35:20 +02:00
Emil Segerås
91410e08dd Compilefixes for macosx. 2012-05-11 18:37:55 +02:00
Emil Segerås
d0560b30a0 Added unit testing framework and safe linklist iterator. 2012-04-22 15:10:42 +02:00
Emil Segers
c8d3b1ecbd Added content offset for skin and use it for pressed buttons. 2012-04-15 20:11:15 +02:00
Emil Segers
00491ca9ea Refined textfield password API & minor cleanup. 2012-04-15 19:42:12 +02:00
Emil Segers
1b7b7a8fa0 TBSlider fixes & cleanup:
-Swapped value direction of vertical slider.
-Added debug output field to demo app.
-Misc cleanup.
2012-04-15 19:22:13 +02:00
Emil Segerås
6586ca671b Sort name list in demo 2012-04-14 20:17:25 +02:00
Emil Segerås
80eea3c443 Added TBSlider 2012-04-14 20:13:59 +02:00
Emil Segers
16fbfa2bda Added integration guide. 2012-02-28 20:18:25 +01:00
Emil Segerås
3a9bfeac6d Moved data types out to a new file to fix gcc compilation.
disabled constexpr for experimental gcc since it doesn't actually work (yet).
It just ignore it and compiles a normal function.
2012-02-28 19:26:31 +01:00
Emil Segers
9f3b6724de Added const expr hash support for compilers that support it.
Create all TBID with a TBIDC macro that turns into a simple uint32 compiletime.
2012-02-28 08:56:31 +01:00
Emil Segers
985e958690 Added text color to skin and widgets:
Added Widget::PaintProps that inherit text-color to child widgets that hasn't specified text-color in the skin or has no skin element.
Added default text-color property in skin, that will apply to all specified skin elements.
Added color in the renderer DrawString method.
2012-02-24 19:27:25 +01:00
Emil Segers
f4437201b7 Begun PStyleEdit cleanup.
Introduced TBColor and TBFontDescription.
Made renderer DrawRect and DrawRectFill mandatory and use TBColor in it.
2012-02-21 19:57:30 +01:00
Emil Segers
4be5aa9f72 Fixed some /analyze warnings. 2012-02-20 19:34:23 +01:00
Emil Segerås
b12829994f whitespace fixes & compilation fixes.
Also made signed data types signed.
2012-02-20 19:03:15 +01:00
Emil Segers
18eb2a00e8 fixed bug with the glut timer hack.
First message post didn't result in a new timercallback.
2011-12-14 20:45:18 +01:00
Emil Segers
c63088d3d0 First commit to public rep 2011-12-14 08:42:33 +01:00