Commit Graph

71 Commits

Author SHA1 Message Date
Michael Tesch
c23159df2b
Hb cmake2 (#11)
* remove TBSystem::GetRoot.  fix glew header

* make runtime debug info an indepedent setting

* windows build on travis

* fix IOS and macos high-dpi

* fix win+sdl2 combo

* try to auto detect what can be make-all'd
2019-11-14 16:59:54 +01:00
Michael Tesch
00933a86e9
Hb cmake cleanup (#10)
* cleanup build system, modernize cmake

* build glfw and sdl2, w/ or w/o freetype

* fix android demo build

* win32 with CPack has PACKAGE target now

* added GLEW for windows

* bump to SDL2.0.10. fixes for building as subdir

* constexpr is always available these days.

* cleanup getwd() warning. add rpm to ubuntu packages

* dont use add_compile_definitions() for cmake, too new

* add rpm package to travis

* gh release packages

* build demo target on windows

* see if defines not working on winsodw
2019-11-12 15:45:00 +01:00
Michael Tesch
7e8093ab16 cleanup compiler warning 2019-11-05 17:46:31 +01:00
Michael Tesch
c704aa4cd8 build for emscripen 2019-01-24 22:14:44 +01:00
Michael Tesch
c050dd78f7 handle control-q as quit in demo, comments 2019-01-24 11:19:18 +01:00
Michael Tesch
8ed710c606 use more TBStr in place of (const char *) 2019-01-23 19:57:40 +01:00
Michael Tesch
1050b6bbd2 fix some types 2019-01-23 14:58:52 +01:00
michael tesch
b623ee3f12 only prepend GetRoot to filename when not absolute 2016-09-06 14:24:24 +02:00
Emil Segerås
6c60aa3303 Moved non-texturized drawing from TBRenderer to TBSkin.
Implemented using 2x2 sized fragment.

Makes TBRenderer a lot simpler since shaders doesn't have to deal with
special case. Also makes batching better since color fills are drawn just
like everything else.

Added thickness parameter to PaintRect.
2016-07-12 19:41:57 +02:00
Emil Segerås
bf6a639e7a Moved duplicated file to buffer code into TBTempBuffer::AppendFile. 2016-06-27 19:29:49 +02:00
rongzhou
ccc8b310d2 Cleanup unnecessary comma 2015-11-01 16:45:09 -08:00
Emil Segerås
2f51f25369 Refactorized demo platform integration to better suit game loops.
Makes it easier to reuse the demo platform glue for other projects.
Especially game loops or platforms where rendering is set up in a
different order.

TB API change: Removed language file path from tb_core_init.
g_tb_lng->Load should be called manually after tb_core_init instead.
2015-07-02 14:27:53 +02:00
Emil Segerås
26af4e9aca Added group-id support for TBButton. 2015-06-25 19:48:06 +02:00
Emil Segerås
fe2fafdbf4 Removed some warnings in demo code 2014-09-30 21:35:38 +02:00
Emil Segerås
20e62a9582 Quick workaround for jumpy focus in ResourceEditWindow. 2014-09-02 21:37:18 +02:00
Emil Segerås
29512809e8 Set id the correct way, using constexpr. 2014-08-31 20:08:27 +02:00
Emil Segerås
e598608fc5 Updated incorrect comment in demo resource. 2014-08-31 20:06:25 +02:00
Emil Segerås
bf82fe994d Deprecate TBAddon and made TBImage optional by define.
Making features optional by linking is messier than using defines.
Use tb_config.h for all optional core stuff instead.
2014-08-04 15:00:30 +02:00
Emil Segerås
944fb88bf5 Improved window positioning in some more cases. 2014-05-29 13:41:39 +02:00
Emil Segerås
55ad6d1343 Fixed incorrectly encoded source file.
Visual studio scrambled the utf-8 at some point.
Also reduced the number of default rendered glyphs.
2014-05-29 13:33:20 +02:00
Emil Segerås
16e13dc622 Changed listener API for OnWidgetAdded/OnWidgetRemoved.
NOTE: Local listeners are now called on the parent widget instead of the child!
It makes more sense to use a listener to listen for additions/removes in a certain
widget, than listening to when a specific widget is added/removed anywhere.
2014-05-20 21:56:27 +02:00
Emil Segerås
fbc5a8139c ResourceEditWindow should open files on drop. 2014-05-20 21:56:26 +02:00
Emil Segerås
b5fab7570e Fixed so Demo windows adapt better to high DPI skin.
-Position and sizes should of course be read as dimensions (dp by default).
-MoveIn and clip windows after getting preferred size.
2014-05-01 13:35:01 +02: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
c5c7670a23 Added testing of constantly busy message handler. 2014-03-02 21:45:54 +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
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
559b05b108 Cleanup of old layout test. 2014-02-09 20:44:51 +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
d9f260fc92 Mention touch input emulation in demo. 2014-02-04 21:50:30 +01:00
Emil Segerås
36ae602ca9 Moved default_font, default_skin, icon and vera.ttf. 2014-01-16 21:04:52 +01:00
Emil Segerås
4e44d19115 Moved language files 2014-01-16 21:04:24 +01:00
Emil Segerås
bc3d360b03 Renamed project namespace. 2014-01-16 21:03:56 +01:00
Emil Segerås
c711425946 Renamed project in resources & documentation. 2014-01-16 21:03:10 +01:00
Emil Segerås
d17cf8e661 Renamed methods for core init/shutdown. 2014-01-16 21:03:07 +01:00
Emil Segerås
2dcc17500a Make TBAnimationManager the entry point for animation methods. 2014-01-08 21:19:51 +01:00
Emil Segerås
c3b3b3fe0c Moved animation files to tinkerbell core. 2014-01-07 21:26:01 +01:00
Emil Segerås
a7ee83a914 Renamed animation objects.
Should be preceeded with TB.
2014-01-07 21:14:24 +01:00
Emil Segerås
cb26d88c9f Renamed widget animation objects.
Should be preceeded with TB.
2014-01-07 21:00:16 +01:00
Emil Segerås
b0e83a9673 Support for node references and conditions. Fixes #1.
Also fixed compact parsing of colors without quotes.
2013-12-27 13:27:33 +01:00
Emil Segerås
603851f6ca Constraints part from layout improvements branch.
This change optionally pass constraints down through hierarchy
when measuring. Axis specific dependency information is bubbled
back up (so future multi-pass layout may take further action).

This enables f.ex wrapping textfields to adapt to content a bit
better, but all layout is still done in a single pass (Still WIP
on the layout branch)
2013-11-16 20:31:32 +01:00
Emil Segerås
9dee4df8bb Added 288 & 384 dpi versions of the default skins.
Still missing some bitmaps i currently don't need though.
2013-11-14 20:38:32 +01:00
Emil Segerås
a24fba18ac Renamed TBGlobalWidgetListener -> TBWidgetListener. 2013-10-27 15:52:34 +01:00
Emil Segerås
b466b915ed Moved & renamed parser/TBNodeTree.h to tb_node_tree.h.
It's not part of the parser at all.
2013-10-01 08:10:12 +02:00
Emil Segerås
897c61c723 Relayout TBScrollContainer if adapt properties change.
Also added adapt setting in ResourceEditWindow.
2013-09-21 20:12:05 +02:00
Emil Segerås
9291b072fc Cleaned up & changed layout a bit on demo resources. 2013-09-14 20:07:26 +02:00
Emil Segerås
c8480297ac Moved event debugging to runtime debug window.
Listens to all events globally.
2013-09-04 07:42:26 +02:00
Emil Segerås
924196e947 Added fragment debug drawing to runtime debug window. 2013-09-01 20:23:50 +02:00
Emil Segerås
0f255ebea9 Moved demo fonts to demo folder. 2013-07-13 16:49:46 +02:00
Emil Segerås
8c25e04e39 Major improvements to pointer/touch input:
List of changes:
-Refactorized virtual scroll methods and introduced virtual GetScrollInfo.
-Added TBScroller to do slow down scroll after panning.
-Added TBScrollerSnapListener for snapped smooth scrolling.
-Added keyboard scroll support in TBScrollContainer and TBSelectList.
-Added possibility to cancel EVENT_TYPE_CLICK for current touch (stopping scroll should not cause click)
-Added flag to TBWidgetEvent to distinguish cursor base pointer events from touch events (Fixes issue #2).
 --Pan TBEditField on touch pointer events instead of doing selection scroll.
 --Touch events should not result in setting the hover state automatically.
2013-07-10 21:03:44 +02:00