Commit Graph

26 Commits

Author SHA1 Message Date
urhobot
f861a10a61 GH Actions: Bump copyright to 2021. 2021-07-17 16:43:46 +00:00
urho3d-travis-ci
1151b8a2d6 Travis CI: bump copyright to 2020. 2020-01-05 06:21:40 +00:00
urho3d-travis-ci
a476f0c401 Travis CI: bump copyright to 2019. 2019-01-12 01:00:16 +00:00
urho3d-travis-ci
70049ba582 Travis CI: bump copyright to 2018.
[cache clear]
2018-01-01 05:35:37 +00:00
Yao Wei Tjong 姚伟忠
d6eb307e34 Clang-Tidy - google-explicit-constructor. 2017-12-31 13:48:28 +08:00
Yao Wei Tjong 姚伟忠
5e89e566e6 Clang-Tidy - modernize-use-override. 2017-12-31 12:11:09 +08:00
Eugene Kozlov
59391f9523 Source/Tools and Source/Samples automatic upgrade: override, typedef to using, 0 to nullptr. 2017-08-29 11:40:46 +03:00
Lasse Öörni
df669fbe1b Restore earlier HelloGUI sample, instead create separate Hello3DUI which demonstrates 3D UI render to texture. Move getting viewport related to scene from Scene to Renderer, so that Scene doesn't have to know about Renderer unnecessarily. Refactor the internal UI render calls related to rendertarget use. 2017-08-23 21:15:56 +03:00
Rokas Kupstys
6fc2c19baa More code cleanups.
* Moved `UIComponent::GetViewport()` to `Scene` class.
* Simplified resource initialization of `UIComponent` and removed need of overriding `IsEnabled()`.
* Renamed `UIComponent::GetElement()` to `GetRoot()` to be more consistent with UI subsystem.
* Removed ability to set root UI element to `UIComponent`, instead to add UI elements should be added as children to element renturned by `UIComponent::GetRoot()`.
* Cleaned up debug rendering in HelloGUI sample. Debug data is now rendered after pressing F2.
2017-08-20 10:55:58 +03:00
Rokas Kupstys
16ee7e1121 * Changed UIComponent::IsValid() to overriden UIComponent::IsEnabled()
* Separated batches and vertex buffers of normal UI and UI rendered to texture.
* Cleaned up `Render()` method adding additional `surface` parameter to render into. Passing null renders on to screen.
Support for rendering UI to texture.

This change adds support for rendering GUI into a texture. This is achieved by adding `UIComponent` component to `Node`. `UIComponent` overrides material of `Node`'s `StaticModel`. UI subsystem is changed so that batches belonging to UI elements owned by `UIComponent` are rendered into a texture that is also contained in `UIComponent`. Input is handled by UI subsystem, so anything that worked on normal UI will work on UI rendered on to 3D object. This required a minor change for input handling. Previously "screen" was considered surface of entire window. Now screen is considered area of root_element_position + root_element_size. This is fully backwards-compatible.

There is one issue i am unable to solve: since on OpenGL texture coordinates start from bottom-left corner a workaround is needed. Texture is flipped by projection matrix, however it breaks scissor test. I do not know how to properly fix it therefore scissor test is disabled when rendering into texture on OpenGL. Issue is clearly visible when scrolling a `ListView` in `HelloGUI` sample when UI is rendered on to a cube.

Other changes: lua and angelscript bindings, HelloGUI sample can toggle between rendering on screen or rendering on cube, added a ListView to HelloGUI sample window. `UI::DebugDraw()` support.
2017-08-19 20:33:00 +03:00
urho3d-travis-ci
ee054a1507 Travis CI: bump copyright to 2017.
[ccache clear]
2017-01-01 13:01:31 +00:00
urho3d-travis-ci
c4f6f315ff Travis CI: bump copyright to 2016.
[ccache clear]
2016-01-26 13:55:03 +00:00
Ivan K
f02cd63437 OBJECT -> URHO3D_OBJECT 2015-10-21 11:12:45 +04:00
aster2013
6bd1d77634 Add baseTypeName argument to OBJECT macro. 2015-10-11 22:17:55 +08:00
Lasse Öörni
bb2ebf7568 Bump copyright to 2015. 2015-01-31 21:03:53 +02:00
Yao Wei Tjong 姚伟忠
125000454c Refactor samples to use patched screen joystick layout. Closes #321.
Enhance screen joystick to also support mouse button binding. It can be used in combination with key binding, e.g. to bind SHIFT+LMB.
2014-04-22 01:12:46 +08:00
Lasse Öörni
fd140ddb32 Minor code reorganization of the HelloGUI example. Removed SubscribeToEvents() as it was only used for 1 event and events were also subscribed to elsewhere. 2014-02-11 21:41:57 +02:00
Mike3D
a0f42bee35 Added drag and tooltip to sample#2 HelloGUI 2014-02-11 09:49:53 +01:00
Lasse Öörni
6d5ddc23e0 Bump the copyright for 2014. 2014-02-01 14:37:21 +02:00
Lasse Öörni
7a55a43725 Tidied up the sample descriptions.
Exposed UIElement::SetVar() and GetVar() to Lua script.
Modified the Lua Sprites sample to use custom vars inside UIElement.
2013-09-20 07:30:07 +00:00
Wei Tjong Yao
205fffb4ad Refactored Sample.h to use class forward for Sprite class. Fixed the alignment of the forward classes to be inlined with convention used by other codes in Urho3D. Added the generated LuaScript wiki into SVN. 2013-09-12 05:44:23 +00:00
Lasse Öörni
04b00263b0 Moved CharacterDemo to the samples.
Use forward declarations in the samples.
2013-08-27 21:45:43 +00:00
Lasse Öörni
796d8871b9 Sample code cleanup. 2013-08-26 07:41:02 +00:00
Lasse Öörni
056acfcc68 Added sound effects example. 2013-08-25 09:20:56 +00:00
Lasse Öörni
2271d6ba83 Added Ragdolls sample.
Added template version of RemoveComponent to Node.
2013-08-24 14:20:02 +00:00
Wei Tjong Yao
02512cecf9 In order to move the out-of-source 'build' directory back to Urho3D project root directory, all the source codes sub-directories are now moved down one level to a new directory under project root called 'Source'. 2013-08-09 10:29:22 +00:00