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
Rokas Kupstys
eacf671d12
String FileSystem::GetTemporaryDir() const API
2017-11-17 19:17:03 +02:00
Rokas Kupstys
964f4c6759
Context::RemoveAllAttributes(StringHash) API
2017-11-17 19:15:50 +02:00
Rokas Kupstys
690afb2985
Add vertexStart parameter to DebugRenderer::AddTriangleMesh()
2017-11-17 19:15:50 +02:00
Rokas Kupstys
b8689422cc
Add Int64 support to Serializable::OnSetAttribute and Serializable::OnGetAttribute
2017-11-17 19:15:50 +02:00
Rokas Kupstys
e1409e6ddc
New API for XMLElement
...
bool AppendChild(XMLElement element, bool asCopy=false)
bool Remove()
2017-11-14 11:34:52 +02:00
Rokas Kupstys
2e7bef8ca3
New API for Image
...
bool Image::HasAlphaChannel() const;
bool Image::SetSubimage(const Image* image, const IntRect& rect);
2017-11-14 11:34:52 +02:00
Rokas Kupstys
fba10847c6
Operators and getters for Rect and IntRect
...
Rect received following operators and getters:
Rect& operator +=(const Rect& rhs)
Rect& operator -=(const Rect& rhs)
Rect& operator /=(float value)
Rect& operator *=(float value)
Rect operator /(float value) const
Rect operator *(float value) const
Rect operator +(const Rect& rhs) const
Rect operator -(const Rect& rhs) const
Vector2 Min() const
Vector2 Max() const
float Left() const
float Top() const
float Right() const
float Bottom() const
IntRect received following operators and getters:
IntRect& operator +=(const IntRect& rhs)
IntRect& operator -=(const IntRect& rhs)
IntRect& operator /=(float value)
IntRect& operator *=(float value)
IntRect operator /(float value) const
IntRect operator *(float value) const
IntRect operator +(const IntRect& rhs) const
IntRect operator -(const IntRect& rhs) const
IntVector2 Min() const
IntVector2 Max() const
int Left() const
int Top() const
int Right() const
int Bottom() const
2017-11-14 11:34:52 +02:00
Rokas Kupstys
46785cb0c2
Mark IntVector(const int*) constructor as explicit and add IntVector(const float*) constructor
2017-11-14 11:34:52 +02:00
Rokas Kupstys
6909b741f1
Add base hash parameter to StringHash::Calculate() in order to allow incremental hash calculation
2017-11-14 11:28:07 +02:00
Rokas Kupstys
c3632eff78
Fix FileSystem::ScanDirInternal() improperly detecting file extension when file name contains more than one dot.
2017-11-13 17:17:33 +02:00
Rokas Kupstys
6d7ae4f755
Define remaining key constants
2017-11-13 17:17:33 +02:00
Rokas Kupstys
6045a86345
New RenderPath APIs
...
/// Return true of any of render targets or commands with specified tag are enabled.
bool IsEnabled(const String& tag) const;
/// Return true if renderpath or command with given tag exists.
bool IsAdded(const String& tag) const;
2017-11-13 17:17:33 +02:00
Rokas Kupstys
0b2ade9efb
New Graphics APIs
...
/// Returns the index of the display containing the center of the window on success or a negative error code on failure.
int GetCurrentMonitor() const;
/// Returns true if window is maximized or runs in full screen mode.
bool GetMaximized() const;
/// Raises window if it was minimized.
void RaiseWindow() const;
/// Return display dpi information: (hdpi, vdpi, ddpi). On failure returns zero vector.
Vector3 GetDisplayDPI() const;
2017-11-13 17:17:33 +02:00
Rokas Kupstys
5cd0e558a9
Fix Graphics::GetWindowPosition() to return actual window position when it is created. Position is queried from SDL
2017-11-13 17:17:32 +02:00
Rokas Kupstys
d5bd3eea26
Define DRAWABLE_UNDEFINED constant and display a warning when drawable is created with invalid flags.
2017-11-13 17:17:32 +02:00
Rokas Kupstys
fe1a20025f
"float Time::GetFramesPerSecond() const" API
2017-11-13 17:17:32 +02:00
Rokas Kupstys
c4c8e7cf6b
"Object::SetBlockEvents(bool)" and "bool Object::GetBlockEvents()" APIs - allow blocking certain objects from sending and receiving events
2017-11-13 17:17:32 +02:00
Rokas Kupstys
39d0676e3a
Define STB_VORBIS_HEADER_ONLY only if was previously undefined - avoids warnings.
2017-11-13 17:17:32 +02:00
Eugene Kozlov
4c7d0f3a71
Merge pull request #2091 from urho3d/refactor-attributes
...
Attribute refactoring
2017-11-12 20:21:50 +03:00
Eugene Kozlov
6961d6f358
Use "post-set callback" instead of "epilogue". Update docs.
2017-11-12 20:17:40 +03:00