661 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
651039b0e8 Redesigning UITextInput and all the derivatives to use TextDocument. 2020-06-15 01:44:29 -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
d6861d117b Include <string> in the new class (MSVC is complaining). 2020-05-28 19:07:00 -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
85aa2a3a32 Modernized the Input class, added support for scancodes (still need to test a little bit more).
Improved SyntaxColorScheme.
Some minor improvements here and there.
2020-05-28 06:00:49 -03:00
Martín Lucas Golini
2de37d3a45 More improvements to the UICodeEditor and TextDocument.
Improved the SyntaxHighligther.
2020-05-26 05:48:22 -03:00
Martín Lucas Golini
cd4684a148 Minor fixes.
Bumped SDL version for VC build.
2020-05-25 19:15:06 -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
472edd7e41 Added vertical scrollbar to the UICodeEditor.
Some minor fixes.
2020-05-24 06:14:54 -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
c462e9e7c9 Some fixes and improvements to the TextDocument and UICodeEditor classes. 2020-05-21 20:41:41 -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
18847a5974 More WIP on the code editor. 2020-05-20 19:37:21 -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
909088b46d Layout improvements WIP. 2020-05-04 04:52:36 -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
59f07ac3d8 Implemented element definition and style sheet styles cache. These improve the performance of the CSS style reload and states changes.
Several fixes:
UITextInput hint fixes.
UITextInputPassword aligment fixes.
UISlider fixes.
2020-04-26 05:24:43 -03:00
Martín Lucas Golini
c893e05cde Several fixes. 2020-04-26 04:56:50 -03:00
Martín Lucas Golini
f9053c0d61 Several fixes. 2020-04-25 00:31:02 -03:00
Martín Lucas Golini
a8b38a371a ElementDefinition cache WIP. 2020-04-23 02:06:20 -03:00
Martín Lucas Golini
5f1d776750 CSS optimizations WIP. 2020-04-22 01:42:44 -03:00
Martín Lucas Golini
fa20d393cd Several performance improvements.
Added events: Node::onIdChange, UIWidget::onClassChange, UIWidget::onTagChange.
UIItemContainer is now a widget (required for CSS).
Fixes in UIListBox and UITable.
CSS::StyleSheetStyle is now stored as a shared pointer.
Fixes in UICheckBox, UIRadioButton, UISlider, UIScrollBar, UITab, UIWinMenu, and more.
Better debug tooltips (now shows padding and margin).
Fix in UISceneNode::loadLayoutNodes, ensures that the current SceneNode is the one that it's loading.
2020-04-16 05:31:43 -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
9a43551b6b More CSS specification clean up and improvements.
UIPushButton refactorization.
Fixed crash on tooltip close.
And several minor changes to adapt the CSS specification changes into the widgets.
2020-04-04 02:43:19 -03:00
Martín Lucas Golini
a3afe7a8e2 Added em and rem units support.
Fixed a bug in tooltips.
2020-03-25 03:19:56 -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
3921f81ced Added border-radius support.
Added alias support for shorthands.
Added BorderType::Outline.
Added support for background/foreground masks.
Fixes to the border rendering.
Several fixes and clean up.
2020-03-13 05:10:53 -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
04c407077f Several improvements in the CSS Animations.
UITabWidget now acts as a draw invalidator, skipping the draw invalidation if the element invalidating is not visible in the current tab.
premake5 file now supports different architectures.
Updated README.md and docs.
Minor fixes in UIColorPicker.
Updated SOIL2 and efsw.
Added LICENSE file.
2020-02-25 01:15:27 -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
73e9489f81 InputEvents improvements and some minor fixes and optimizations. 2020-02-19 02:07:03 -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
c2e0d867fd Added support for multiple background-image and foreground-image.
Added support for structural pseudo class :not().
2020-02-17 04:06:47 -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
57c31ffcb4 Code clean up and some minor fixes.
premake5 is being reworked, might fail in some situations.
2020-01-18 19:40:27 -03:00