Commit Graph

9612 Commits

Author SHA1 Message Date
Yao Wei Tjong 姚伟忠
912df7381c Remove support for VS 2013. 2017-12-15 23:13:21 +08:00
SirNate0
b9f39755db Minor fixes: cleaning up comments, variable initilization, early return 2017-12-12 21:17:53 -06:00
2gitcans
33c495f9c0 removed unused parameter from UI::SendDoubleClickEvent 2017-12-12 17:05:07 -07:00
2gitcans
9ef9300ada Use M_MARGE_VALUE instead of 99999.0f 2017-12-10 17:43:30 -07:00
2gitcans
135085714d formating correction 2017-12-10 15:45:43 -07:00
2gitcans
a411214e7c Removed Tabs, replaced FLT_MAX with large float. Capitalized event params 2017-12-10 15:29:34 -07:00
2gitcans
b8f6d0061a Merge branch 'enhancement/doubleclickinfo' into feature/doubleclickdist 2017-12-10 14:21:53 -07:00
2gitcans
25b4d9cf0d addded Lua bindings 2017-12-10 14:21:25 -07:00
2gitcans
6e0caa1341 Added angelscript api calls 2017-12-10 14:18:42 -07:00
2gitcans
00b103b5d6 Added missing distance check to the end of ProcessClickBegin. Seperate private function for dispaching double click events and added position of beggining click to double click events. 2017-12-10 14:13:32 -07:00
2gitcans
e78e3ab165 added UI::SetMaxDoubleClickDist and UI::GetMaxDoubpleClickDist 2017-12-10 13:34:07 -07:00
SirNate0
8ef31d75bb Added enum support for ScriptInstance attributes. Presently names are cached in the Script class. 2017-12-03 15:45:49 -06:00
Eugene Kozlov
54ed4c917f
Merge pull request #2176 from thesquib/2ddemos
Updated 2D samples from pull request #641
2017-12-02 20:33:18 +03:00
Eugene Kozlov
2ae6c6b85f
Merge pull request #2185 from rokups/update-3D-UI
3D UI cleanup and update
2017-12-02 20:31:24 +03:00
Eugene Kozlov
8bb8aa28e8 Minor changes. 2017-12-02 17:53:50 +03:00
Rokas Kupstys
4571e9ba20 Hide UIElement3D from public API, clean up UIElement3D and UIComponent.
`UIElement3D` is no longer in public API. This prompted addition of `UIComponent::SetViewportIndex(unsigned index)` API for controlling which viewport is used for UI input mapping. If component does not belong to a node then index will be cached and used when component is added to a node. Not setting viewport index or setting invalid index will result in use of viewport at index 0.

`UIElement3D` no longer holds `UIComponent` pointer. Instead it holds `Node` pointer and obtains `Scene` and `StaticModel` directly from the model. This allows model to be removed and re-added without breaking. Note that after re-adding (likely new) `StaticModel` it is user's responsibility to set material returned by `UIComponent` to a new `StaticModel`.

`UIElement3D` no longer caches model pointer if component does not own the model. As a result of that flag `isStaticModelOwned_` was removed.

Swapped protected members and methods in `UIComponent` to fit style guidelines.
2017-11-26 20:47:42 +02:00
Rokas Kupstys
a27620bae2 Rename UI::SetRenderTexture() to UI:SetElementRenderTexture(). 2017-11-25 18:39:54 +02:00
Eugene Kozlov
26ff4fce30 Fix AssImp compilation with VS 2017. Remove cmake_vs2013.bat. Closes #2191. 2017-11-25 09:04:41 +03:00
Eugene Kozlov
2711d7b73f Update contributor list. Remove unnecessary casts. 2017-11-24 23:24:00 +03:00
urho3d-travis-ci
70b8fc7609 Travis CI: API documentation update at 2017-11-24 20:15:29 UTC.
[ci package]

Commit: e9c72fac33

Message: Merge pull request #2184 from hsnabn/color-fromuint

Add Color::FromUInt.
2017-11-24 20:15:29 +00:00
Eugene Kozlov
e9c72fac33
Merge pull request #2184 from hsnabn/color-fromuint
Add Color::FromUInt.
2017-11-24 23:00:45 +03:00
thesquib
0a5f12c495 Fix incorrect comment in AS 2017-11-23 23:04:08 +13:00
thesquib
7acefc3d88 Setup tests correctly in CMakeLists 2017-11-23 23:04:08 +13:00
thesquib
b46db86f24 Updated for current Urho3D, modified isometric demo to include interactions similar to the 2d platformer. 2017-11-23 23:01:51 +13:00
Mike3D
e7ff66e6d7 Added 2 Urho2D samples (isometric demo and platformer) 2017-11-23 23:01:50 +13:00
Rokas Kupstys
c5c560e759 3D UI cleanup and update
Turns out 3D UI implementation was not flexible enough. This change allows ultimate freedom by splitting up responsibilities correctly.

UIComponent is no longer responsible for storing batches and vertex data. This information was moved to new `RenderToTextureData` struct inside `UI` subsystem. `UI` and `UIComponent` are no longer friends of each other.

New class `UIElement3D` was created. It is used as root UI element of UI rendered in a 3D scene. It implements `ScreenToElement()` method which is used for translating screen coordinates to element coordinates. Previously `UIComponent` did translation of these coordinates. `UIElement3D::ElementToScreen()` is not implemented at this time and returns `{-1, -1}` (invalid coordinates). It is also possible to set a custom viewport to root element of `UIComponent` and this viewport will be used for processing user input.

In order to render UIElement to a texture it is enough to call SetRenderTexture(texture), where texture is set up as `TEXTURE_RENDERTARGET`. In order to properly support input of `UIElement` rendered to a texture user should subclass `UIElement` and implement `ScreenToElement()` method which properly translates global screen coordinates to local element coordinates.

New API:
* UIElement::SetRenderTexture(Texture2D*)
* UI::SetRenderTexture(UIElement*, Texture2D*)
2017-11-22 16:19:06 +02:00
Aban Hussain
16da4de876 Color::FromUInt: Divide by float to avoid rounding issues. 2017-11-22 02:41:24 +05:00
Aban Hussain
ecb888f941 Add Color::FromUInt to Lua and AngelScript APIs. 2017-11-22 02:25:22 +05:00
Aban Hussain
3d7e8aba02 Add FromUInt function to Color. 2017-11-22 02:24:54 +05:00
Yao Wei Tjong 姚伟忠
3b68cc6b64 For CI - upgrade Linaro compiler toolchains for ARM-CI.
[ci only: ARM] [skip appveyor]
2017-11-21 21:32:26 +08:00
Eugene Kozlov
fce50003d2 Revert initial signature of Object::IsInstanceOf. Add Object::Cast instead. 2017-11-20 23:18:54 +03:00
urho3d-travis-ci
9061e26157 Travis CI: API documentation update at 2017-11-19 22:16:36 UTC.
[ci package]

Commit: 28734f6a1c

Message: Merge pull request #2177 from eugeneko/master

Misc fixes and features #2
2017-11-19 22:16:36 +00:00
Eugene Kozlov
28734f6a1c
Merge pull request #2177 from eugeneko/master
Misc fixes and features #2
2017-11-20 00:25:06 +03:00
Eugene Kozlov
bcf15eef26
Merge pull request #2168 from rokups/misc-fixes-and-features
Misc fixes and features
2017-11-20 00:24:41 +03:00
Eugene Kozlov
7b60ab1724 Rename Variant custom type strings. 2017-11-19 15:41:54 +03:00
Eugene Kozlov
65253d48c8 Make Object::IsInstanceOf return tested type. 2017-11-19 15:41:31 +03:00
Eugene Kozlov
90f4cf8b8d Add template version of Context::RegisterSubsystem. 2017-11-19 15:38:51 +03:00
Eugene Kozlov
8809c05278 Fix crash when GImpactMesh is collided with TriangleMesh. Fixes #2172 2017-11-19 15:38:14 +03:00
Eugene Kozlov
abf556c66a Hide added item in hierarchy ListView if parent item is collapsed. 2017-11-19 15:35:49 +03:00
Eugene Kozlov
7b036b57af Add allocation-less version of Texture2D::GetImage. 2017-11-19 15:34:34 +03:00
Eugene Kozlov
ee77457006 Add UIElement::IsChildOf helper function. 2017-11-19 15:33:25 +03:00
Eugene Kozlov
06864f5d54 Non-functional refactoring of wheel handling. 2017-11-19 15:32:46 +03:00
Eugene Kozlov
56506a359e Add ScrollView horizontal/vertical bar visibility properties. 2017-11-19 15:29:43 +03:00
Rokas Kupstys
c93b3b513a AngelScript bindings. 2017-11-17 19:17:04 +02:00
Rokas Kupstys
0bb81bf8be Lua bindings for new methods. 2017-11-17 19:17:04 +02:00
Rokas Kupstys
9b5d759c60 Add "monitor" parameter to Graphics::GetDisplayDPI method. 2017-11-17 19:17:04 +02:00
Eugene Kozlov
8fd843703e Minor changes. 2017-11-17 19:17:04 +02:00
Eugene Kozlov
ba95abbad8 Add few bindings. Add some TODOs. Non-functional changes. 2017-11-17 19:17:03 +02:00
Eugene Kozlov
f2c78c2ab8 Move new graphics APIs 2017-11-17 19:17:03 +02:00
Eugene Kozlov
293370db1f Rename Graphics::RaiseWindow to Graphics::Raise. 2017-11-17 19:17:03 +02:00