Commit Graph

228 Commits

Author SHA1 Message Date
Martín Lucas Golini
7de3420a9f Minor change in the syntax tokenizer to support "^" from the patterns.
Added diff file support.
Added UIMenuRadioButton.
Added support to shortcut/keybinding text display in UIMenuItem.
Improved UIMenuBar and UITouchDraggableWidget.
2020-06-18 02:56:27 -03:00
Martín Lucas Golini
82f4fc1656 Renamed UICommonDialog to UIFileDialog. 2020-06-11 14:15:30 -03:00
Martín Lucas Golini
aeedc65db6 Improved the Code Editor, now supports tabs and split views (WIP).
Several general fixes.
2020-06-02 22:21:07 -03:00
Martín Lucas Golini
56f79a6dfd UISplitter WIP. 2020-06-01 05:30:16 -03:00
Martín Lucas Golini
e45c813e53 Renamed UIWinMenu to UIMenuBar. 2020-05-30 21:03:25 -03:00
Martín Lucas Golini
3ea6ab392c Reimplemented TextDocument::load* and save*, now uses IOStream (also fixes some issues with line endings).
String class now uses char32_t as base type, to be compatible with std::u32string.
Some minor refactor: replaced Uint32 type in hashes in favor of String::HashType. Replaced Uint32 type in keycodes in favor of Keycode.
Changed String::hash(String) from CRC32 to std::hash<std::u32string> (many times faster).
And more random refactors and small features in the code editor.
2020-05-30 05:57:27 -03:00
Martín Lucas Golini
2550e6a52f Added KeyBindings class.
UICodeEditor now uses the KeyBindings class.
2020-05-28 18:52:19 -03:00
Martín Lucas Golini
84c40649c8 Removed rx-cpp since it's problematic. Added System::LuaPatternMatcher in replacement. This should fix the Windows and macOS builds.
Fixed UISceneNode size, now it's set in pixels instead of dp to allow to always be the same size as the window.
Fixed styles and layouts not updating in time before calling draw.
Fixed a double delete crash when using UIDropDownList and UIWinMenu.
Now UI elements can be dragged even if the mouse cursor goes out of the window limits.
UIScrollBar slider now can be dragged also from the horizontal edges that are not part of the button slider (this allows to scroll from the edge for example in maximized windows).
Fixed TextDocument on emscripten.
Disabled fullscreen window minimizing on focus loss (SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS).
2020-05-25 05:18:38 -03:00
Martín Lucas Golini
2c05f3f579 Added CodeEditor project to be able to test comfortably the UICodeEditor and the TextDocument.
Renamed Window::setCaption to Window::setTitle.
Several fixes in TextDocument.
2020-05-24 04:14:52 -03:00
Martín Lucas Golini
94a2e4a0c3 Syntax Highlighting working.
Some minor refactor.
2020-05-23 23:41:06 -03:00
Martín Lucas Golini
d95f2d8944 Syntax Highlighting WIP. 2020-05-23 06:17:56 -03:00
Martín Lucas Golini
825626a9d2 Several fixes and improvements in TextDocument and UICodeEditor.
TextDocument now supports undo/redo (still testing, may have some bugs).
2020-05-22 04:36:17 -03:00
Martín Lucas Golini
1f91f612de More editor improvements. Also changed the editor name, now is UICodeEditor. 2020-05-21 02:31:34 -03:00
Martín Lucas Golini
098c882a8d Added UICodeEditor, currently is a WIP.
Improvements in TextDocument.
2020-05-20 05:59:46 -03:00
Martín Lucas Golini
67a5e25cf2 TextDocument WIP. 2020-05-18 04:01:25 -03:00
Martín Lucas Golini
a9fb27f31d Minor fixes on Text and TextEdit. 2020-05-12 16:43:22 -03:00
Martín Lucas Golini
87e3d64b63 Added renamed Display::getPixelDensity() to Display::getPixelDensitySize() and now Display::getPixelDensity() returns the float value of the pixel density.
Moved the global test to tests/test_all.
Added a ui_perf_test used to test specific performance issues in the UI.
Fixed the element/widget inline style (now respects the specificity).
Some optimizations in UIListBox.
2020-05-03 03:39:31 -03:00
Martín Lucas Golini
5f1d776750 CSS optimizations WIP. 2020-04-22 01:42:44 -03:00
Martín Lucas Golini
e48b77ddfc Several fixes to allow Widgets to work without skins and enable pure CSS themes.
Added String::contains.
Improved Vector2.
Improved Text::findCharacterFromPos.
Improved set minimum widget size.
Improved var() parsing.
2020-04-09 05:20:55 -03:00
Martín Lucas Golini
887d2f331d Improved access to the inner widgets from CSS.
Minor fix in docs Makefile.
Minor fix in keyboard shortcuts.
2020-04-06 03:07:56 -03:00
Martín Lucas Golini
ffc8fd3953 More code clean up and continued with the CSS Specification documentation. 2020-04-05 04:22:34 -03:00
Martín Lucas Golini
f9ab6d0137 Added DrawableImageParser, this class parses the background-image and foreground-image functions and allow to register more functions. 2020-03-16 02:11:08 -03:00
Martín Lucas Golini
359685cb6f Added UIBackgroundDrawable. WIP CSS Borders. 2020-03-10 03:57:49 -03:00
Martín Lucas Golini
312f02105f CSS Borders WIP (not working yet). 2020-03-09 15:12:43 -03:00
Martín Lucas Golini
8c108c5ed9 Added UIViewPager.
Node::onChildCountChange reports the child that's being added or removed.
Added Ease::toString.
Added UIWidget::lengthFromValueAsDp.
2020-02-27 14:16:11 -03:00
Martín Lucas Golini
f8c21880d1 Replaced StyleSheetPropertyTransition in favor of StyleSheetPropertyAnimation.
This class allows to animate CSS "animation" and "transition". Some CSS animations are working, pending fill-mode implementation, tests and surely many fixes.
Fixed a critical bug in windows resize introduced in the latest Input improvements.
2020-02-24 03:01:32 -03:00
Martín Lucas Golini
48d0f06b2b Started implementation of CSS Animations, WIP. 2020-02-18 03:58:58 -03:00
Martín Lucas Golini
4320841ade Removed StyleSheetElement interface in favor of using UIWidget directly. Thanks to this all dynamic_casts has been removed at the cost of a little less readable code. 2020-02-10 03:19:07 -03:00
Martín Lucas Golini
9d32e29ffb Added TexturePacker console tool and updated to a new version of the Texture Atlas format.
More premake5 project refactor.
Fixed some Stysheet Properties types and fixed some StyleSheetProperty transitions.
2020-01-19 17:17:09 -03:00
Martín Lucas Golini
317ed08625 Added new example: UI Hello World.
Added new markdown document with the UI Basics explanation.
Fixed some minor bugs in UIPushButton.
Added new Event: OnFontStyleChanged.

--HG--
branch : dev
2020-01-13 02:26:28 -03:00
Martín Lucas Golini
bec45f8b4b Added doxyrest support.
Cleaned up several documentation related stuffs.

--HG--
branch : dev
2020-01-03 03:42:14 -03:00
Martín Lucas Golini
35d0d9b1d9 README changes.
--HG--
branch : dev
2020-01-02 18:13:17 -03:00
Martín Lucas Golini
e61f7b393e Minor bug fix.
--HG--
branch : dev
2019-12-27 03:21:00 -03:00
Martín Lucas Golini
6b13111d19 General enums refactor. This will break the API for several things.
The idea is that this enums should never be used by code from now on, and
always use the XML+CSS features.

--HG--
branch : dev
2019-12-15 17:21:39 -03:00
Martín Lucas Golini
0705dad434 Added CSS media queries support (needs testing, basic support seems to be working).
--HG--
branch : dev
2019-12-15 00:32:31 -03:00
Martín Lucas Golini
3735bf8aa0 Added CSS custom properties (variables) support (https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties).
Added Node::getParentWidget().
clang-format'ed SceneNode and UISceneNode (no functional changes).

--HG--
branch : dev
2019-12-12 17:30:16 -03:00
Martín Lucas Golini
3a21f2e640 Added TriangleDrawable.
CSS vector properties now are separated by space instead of comma.
Added offset to ArcDrawable.
Added new background-image and foreground-image functions: rectangle(), triangle(), circle().
Added some new parameters for the UIEditor, also some minor fixes.

--HG--
branch : dev
2019-12-11 19:56:32 -03:00
Martín Lucas Golini
9ba1caba65 More WIP.
--HG--
branch : dev-css-refactor
2019-11-29 18:09:44 -03:00
Martín Lucas Golini
f20f4beba4 More progress.
--HG--
branch : dev-css-refactor
2019-11-28 21:32:56 -03:00
Martín Lucas Golini
ad08beb76f Experimental refactor in progress.
--HG--
branch : dev-css-refactor
2019-11-28 01:22:15 -03:00
Martín Lucas Golini
f7119463f1 Some minor refactor for the CSS transitions. Starting new transition system.
--HG--
branch : dev
2019-11-27 01:39:33 -03:00
Martín Lucas Golini
36fae19cdb Replaced some mDpSize for getSize().
Implementing CSS::StyleSheetLength.

--HG--
branch : dev
2019-11-22 16:18:57 -03:00
Martín Lucas Golini
45cf7f4f73 UINodeDrawable replacing UISkinState for UINode background and foreground.
WIP new properties support.
Added "text-align" property to UITextView.
Fixed a bug in StyleSheetSelectorRule.

--HG--
branch : dev
2019-11-13 17:40:38 -03:00
Martín Lucas Golini
87c80a0872 Fixed UISlider (again).
UIImage now can own Drawables.
UIColorPicker improvements.
Removed UISliderButton (not used anymore).

--HG--
branch : dev
2019-11-11 00:51:24 -03:00
Martín Lucas Golini
58eda1da03 Color Picker WIP.
--HG--
branch : dev
2019-11-10 04:14:33 -03:00
Martín Lucas Golini
da74085a06 Fixed Color::toHsv(), Color::fromHsv(), Color::toHsl().
Added to Colors::fromString(): rgb(), rgba(), hsl(), hsla(), hsv(), hsva().

--HG--
branch : dev
2019-11-09 21:51:09 -03:00
Martín Lucas Golini
bb30c62fab Removed support for SFML2 module (mantaining this backend does not make any sense at this point).
Removed custom Platform implementations for windows and cursor control (control is taken by the SDL2 backend).
And some clean up.

--HG--
branch : dev
2019-10-06 02:49:41 -03:00
Martín Lucas Golini
9aa7b4b7d0 Renamed TextureSaver to ScopedTexture.
Added System::ThreadPool.
Refactored ResourceLoader.
Removed OjbectLoader and all object type loaders.
Some minor refactors.

--HG--
branch : dev
2019-09-08 02:26:33 -03:00
Martín Lucas Golini
e3873780ad Added Actions::Runnable.
UINode::setSkinColor invalidates draw.
Added Node::runOnMainThread.

--HG--
branch : dev
2019-06-24 22:03:36 -03:00
Martín Lucas Golini
a176383c07 Fixed crash when changing skin states from the stylesheet.
--HG--
branch : dev
2019-06-21 01:00:44 -03:00