13013 Commits

Author SHA1 Message Date
robfram
d40f40e1c9 Fix pressing F3 do both changing to script editor AND find next text
As `KEY_F3` was used both for changing to script editor window and, in
the script editor, for finding the next result in the last search, and
the key event is **not** consumed, the resulting behaviour was similar
to press `F3` twice, first to change to script editor and second to
find the next result of a previous search.

This PR sets the `key_pressed` status of `InputEvent` to `false` if
this event is responsible of an editor change, simulating the
consumption of the event.

Fix #17334

(cherry picked from commit 8939f44f6ac5594348e4d671d121680822bd8dc8)
2018-04-28 17:09:55 +02:00
robfram
fa831f0224 Fix non-valid characters for input_action
Add a new function to check action names, `_validate_action_name`, in
the spirit of `_valprop`. Offending characters include non-printable
ascii, and `\/=:"`. Also set only one text for the UI message.

(cherry picked from commit da6c07698f591b3eac773770dc776bf095c3d9ef)
2018-04-28 17:07:20 +02:00
robfram
141e389c3f Fix non working action names containing whitespaces
Now the action name is quoted if it contains spaces. Also, quotation
mark (") is added to the forbidden character list for action names, as
it was also a bug.

Fix #17322

(cherry picked from commit ea94a8259624a1915fa4b92682755e28f2bb6af5)
2018-04-28 17:04:20 +02:00
Poommetee Ketson
72350eebb2 ScriptTextEditor: fix capitalize offset
(cherry picked from commit caa0d513ab89d46dbf694182ab47a77f5fbe31ed)
2018-04-28 16:45:17 +02:00
Jorn Van denbussche
80fbea28fb Fixes importing hdr files with extra header info
(cherry picked from commit 886156da2ca14bfdd7e06858bfc25f6507944d38)
2018-04-28 16:42:27 +02:00
Hein-Pieter van Braam
7ec8a6e756 Fix converting a tilset if the existing file is not a tileset
See ed3b080ca6ebc4361306a786dcc2d45481ee8ed9
2018-04-28 16:40:31 +02:00
Poommetee Ketson
ddb31e9c5a EditorNode: fix clicking ok keeps trying to save
(cherry picked from commit e12e6cacdb823caf4227f63f4bd175a593918813)
2018-04-28 16:29:58 +02:00
Bernhard Liebl
dc97f91a18 Fix column width on AutoLoad table on hidpi displays
(cherry picked from commit f494d5ac5cb849f6fbe80e0b84449e9d8f361e32)
2018-04-28 16:28:47 +02:00
ShyRed
171542d96a Update TileMap when its TileSet changes
Make TileMap monitor its TileSet for changes and emit a signal when the TileSet changes. This makes the editor update and show the updated version of the TileSet.

(cherry picked from commit 67f4944a21487dce92746bdb716303a7860b081c)
2018-04-28 16:25:33 +02:00
robfram
b855bc44ae Implement line clipping for TextureProgress to avoid bad rendering due to imprecise UV mapping
Original code used a quick aproximation for simulating the
correspondent texel in the `TextureProgress` texture as radial
progress indicator. This lead to visualization errors. Changed it for
a Liang-Barsky line clipping algorithm stripped to its minimum for
this specific use case.

Fix #17364.

(cherry picked from commit 7991bd168da1e0b8d0dc34635a35057aab466349)
2018-04-28 16:19:52 +02:00
ShyRed
c39e32ae60 Update Sprite when Texture changes
Make Sprite monitor its Texture for changes and trigger an update when the sprite changes.

(cherry picked from commit a23c0877f1bb26edb75aa344f1049a7b7a91f079)
2018-04-28 16:13:28 +02:00
Bernhard Liebl
5eef26b64e Fix broken hover/select coloring of keys in animation editor
(cherry picked from commit 172aa6c61e27f6506f265983fc18e1f5e248efeb)
2018-04-28 16:07:03 +02:00
Pieter-Jan Briers
0d2a2a9300 Fixes canvas light shaders.
Fixes #16904

Restore more out functionality, fix built-ins.

Requested changes, I think?

(cherry picked from commit 25ba49fd88ec460a6c4f39f93222671d5e2bab6e)
2018-04-28 16:03:23 +02:00
Bernhard Liebl
6d767b0f9a AnimationPlayer: fix scrubbing after play backwards
(cherry picked from commit b553b38e7be52003f44bb05165fdae25c5863ab7)
2018-04-28 15:55:36 +02:00
robfram
d49579b038 Fix overwriting all common properties when using Change Type tool
If you change the type of an existing node, it checks if you have
modified the initial value of their properties before overwriting
their values in the new node.

For example, if you created a `Label` and changed it to
`LineEdit`, the `mouse_filter` property was created as `Ignore`
for the original `Label` node, and was maintained after changing
it to `LineEdit` causing not to work as expected. Now it checks if
`Ignore` is the default value for `Label` nodes, and as it is, the
property value is left unchanged, maintaining the default value
for `LineEdit`, which is `Stop`.

Fix #13955 and alike.

(cherry picked from commit 8ea4ea0d53e772673dea69a9df83aa8445ad49ea)
2018-04-28 15:47:57 +02:00
Poommetee Ketson
a3ba1b0280 Fix script template on _ready behavior
(cherry picked from commit 01ec06d9ae9880c065dd6601656a5462c10690fd)
2018-04-15 01:18:49 +02:00
Marcelo Fernandez
c2e02e2066 Added error checks for fscache saving
(cherry picked from commit 06e537fec5a4c4ed16a2f3b616c59d19be573c60)
2018-04-15 01:17:01 +02:00
Chaosus
3503ee4be6 Fix invalid mix function overload
(cherry picked from commit 97bef8d9082da17dc1e3d1ee1956f01633f9fa31)
2018-04-15 01:13:38 +02:00
Bernhard Liebl
069b429795 AnimationPlayer: fix popups close on double click
(cherry picked from commit 6d51b6ab429fca592505d9bdbf44130f12dd3ecc)
2018-04-15 01:08:45 +02:00
Saracen
2f7aa6c2aa Make the shader token names consistent.
(cherry picked from commit b095e21d91719cf8f454315aedb70616f914eec1)
2018-04-15 01:07:37 +02:00
Chaosus
a29680c25a [Mono] Improve Mathf
(cherry picked from commit 655a4e6540ff91f7b8d684359ca8cea6ab7aa410)
2018-04-15 00:57:14 +02:00
Alexander Alekseev
3a430e46b9 [mono] Fixes #17936 as GodotSharp (Core\Basic.cs) requires C#7 now, but we most probably should keep C#6 yet
(cherry picked from commit 5677aed175f70d5f6762771c1bdfe9425023836e)
2018-04-15 00:56:14 +02:00
Nikodem Lokatelj
b4733a1da9 Fixed _issue_activated to take the correct issue id from the list
(cherry picked from commit 4fdee1d9f1265e29c836ba8887157682ad6e76f0)
2018-04-15 00:55:25 +02:00
Wilson E. Alvarez
8ebd4bb874 Move GodotSharp and MonoBuildTab member variables to initializer list
(cherry picked from commit 3f86fefb64cc8caeaeb1eb65471dfd18191eae85)
2018-04-15 00:54:00 +02:00
Chaosus
63a88c69ac Added wrap functions to C#
(cherry picked from commit d52722c6da069549f56530fc56fe09e9a74027ce)
2018-04-15 00:52:29 +02:00
Ignacio Etcheverry
bfc94dd4c9 Mono: Runtime main args and assembly search fixes
- Setup runtime main args during initialization. This must be done manually by embedders who do not call mono_runtime_run_main. Fixes NullReferenceException in System.Environment.
- Continue to search the assembly in the rest of the search locations if loading it from one of them failed.

(cherry picked from commit fa1d656af4c4ea81ca04c7f0117e421855327a28)
2018-04-15 00:48:15 +02:00
Andreas Haas
6472d8c7d4 Mono: Avoid invalid class names.
Disallow reserved keywords as class names and prefix base class with the Godot
namespace if it's the same as the class name.

Fixes #12483

(cherry picked from commit 700d07cf7cae4e28de107e0c274b27c857d98450)
2018-04-15 00:48:11 +02:00
Hein-Pieter van Braam
e4fadebc3b Fix a merge error 2018-04-15 00:43:26 +02:00
Ignacio Etcheverry
548ec63f76 EditorExport: Allow export plugins to add shared libraries
(cherry picked from commit a38b59b656e6834d466df37379266c29d6364490)
2018-04-15 00:04:18 +02:00
Ignacio Etcheverry
9e4d34aebb Mono: Add project export plugin
(cherry picked from commit 9fd606c549ac53ba2ab1a877be564b1fb56531db)
2018-04-15 00:04:14 +02:00
Paul Joannon
d02c891a4b [mono] write classes with no constructor as abstract
(cherry picked from commit ef5672d3f94a7321ed779c922088bb72adbb1521)
2018-04-14 23:54:11 +02:00
Paul Joannon
3bd414786c [mono] rename functions to conform to PascalCase
in:
* StringExtensions.cs
* Transform.cs

(cherry picked from commit d7020aef8d99cbf1ef7af15088de243061da282c)
2018-04-14 23:53:56 +02:00
Carter Anderson
c7adcc8dca Fix mono basis GetEuler bug and marshalling/unmarshalling
(cherry picked from commit 91f271fa9e7f1dd0fc36f434c4b7a795a8c463c0)
2018-04-14 23:20:33 +02:00
Aaron Franke
577f3ccaf9 Replace float with real_t, default Vectors, other misc C# improvements
Replace float with real_t in most files, defined at the top of each file via using. Objects such as Vector3 now accept doubles as inputs, and convert to real_t internally. I've added default Vectors such as Vector3.Zero. Other misc C# improvements such as Mathf.RoundToInt(). Color continues to use float only because high precision is not needed for 8-bit color math and to keep things simple. Everything seems to compile and work fine, but testing is requested, as this is the first time I've ever contributed to Godot.

(cherry picked from commit ff97c97c930f80209480c630622b1b64372bd65a)
2018-04-14 23:20:03 +02:00
robfram
bffd4f0548 Fix bad autocomplete of partially written node paths when using syntactic sugar notation ($)
If you had a tree like Node2D->Sprite->Camera2D and you write a
code like $Node2D/Spr and chose the autocompletion sugested
Node2D/Sprite, the resulting string was $Node2D/Node2D/Sprite
instead $Node2D/Sprite. If you chose Node2D/Sprite/Camera2D, then
you ended with $Node2D/Node2D/Sprite/Camera2D.

Fix #15813.

(cherry picked from commit 95f186b62184c846571c7278842ac4923f461d5a)
2018-04-14 23:14:30 +02:00
Hugo Locurcio
4c8c383876 Update Hack font to v3.003
(cherry picked from commit 93f52813bf62e6b6d0eed9d0fe18b342d23b2aac)
2018-04-14 23:11:18 +02:00
Marcelo Fernandez
125b403c0f WASAPI driver will now resample when the device rate != audio/mix_rate
(cherry picked from commit d21a2019f1982f0e69baff9769c5961fdca86aad)
2018-04-14 22:07:30 +02:00
Marcelo Fernandez
5f5ec7e162 WASAPI audio driver compile fix on mingw
(cherry picked from commit 3316a64e12cb38d499e39b53d9905ce222a0b82e)
2018-04-14 22:03:10 +02:00
Marcelo Fernandez
a91d9cb918 Fix possible crash when audio channels change
(cherry picked from commit 87ebdd60416f953181e2ce93286f97a9c233fa49)
2018-04-14 21:47:05 +02:00
Marcelo Fernandez
a7ea441504 Fix PulseAudio problems with 8 channels devices
(cherry picked from commit 34395c6a3844f59b5880f52cd79ee826cbb92366)
2018-04-14 21:46:11 +02:00
Marcelo Fernandez
4b5472b100 Fix error detecting for PulseAudio pa_stream_new call
(cherry picked from commit 86e101ec823e916080cb113031ff04edbe3757c6)
2018-04-14 21:46:06 +02:00
Rémi Verschelde
3dc4447cb8 CoreAudio: Fix iphone build after audio device refactor (#17742)
(cherry picked from commit e955fbc36e2c86e1c005c5a5ae57bda689071a9f)
2018-04-14 21:44:57 +02:00
Marcelo Fernandez
9a21f964ba Added new audio device functions to set/get the audio device
(cherry picked from commit ecc1b34cbc2375a57afad822218324d8b88fa721)
2018-04-14 21:42:44 +02:00
Marcelo Fernandez
1f07f71b6c Fix PulseAudio driver for audio devices that report unknown number of channels
(cherry picked from commit 11fbfab7ece953d380152b98e83f78b5ea941bb6)
2018-04-14 21:38:26 +02:00
Alexander Holland
259b9664ef auto-completion edge jump
arrow up/down jumps to end/start on edges

(cherry picked from commit e36dd4282b2c4a5b2f2b00e57ee347c4fcd14e71)
2018-04-14 21:29:48 +02:00
Leon Krause
b5a55810c5 Disable FreeType SIMD in HTML5 builds
SIMD is currently unsupported in WebAssembly.

(cherry picked from commit 315983c90d55250794931bd819333daa0f2d2fd0)
2018-04-14 21:15:37 +02:00
robfram
4fc6256010 Change shebang of pre-commit-clang-format hook to make it portable
The default one is "#!/bin/bash", but BSD systems doesn't have bash
in that path. For portability reasons, it should be changed to
"#!/usr/bin/env bash".

More info: https://en.wikipedia.org/wiki/Shebang_%28Unix%29#Portability

(cherry picked from commit 52abf4ba84b5a41ac9903af0ba1087bf18be2187)
2018-04-14 20:59:39 +02:00
bruvzg
ce1b62a01f Explicitly set OpenGL profile to core (X11, Windows).
Enable GLES2 on Windows.

(cherry picked from commit ad67911f1a45370558f968cdc1540f707534c28f)
2018-04-14 20:56:49 +02:00
Emanuele Fornara
28d4271e3e skip demo download prompt if ssl is unavailable
(cherry picked from commit 0071c04dcb5399431e7c13397c1e4228c2c8b8d0)
2018-04-14 20:44:54 +02:00
Lars Kokemohr
30b5265417 completed-signal is emitted by all GDScriptFunctionStates of a coroutine now, allowing to yield for completion of a function with more than one yield inside.
(cherry picked from commit 3dfef37628a3b17cca4ce5370631fb572376ed98)
2018-04-14 20:42:44 +02:00