Commit graph

1743 commits

Author SHA1 Message Date
Bojidar Marinov 136e1e18ba
Add Rect2 TileMap::get_used_rect(), closes #4390 2017-02-20 23:02:03 +02:00
Hein-Pieter van Braam b696beea65 Correct hash behavior for floating point numbers
This fixes HashMap where a key or part of a key is a floating point
number. To fix this the following has been done:

* HashMap now takes an extra template argument Comparator. This class
gets used to compare keys. The default Comperator now works correctly
for common types and floating point numbets.

* Variant implements ::hash_compare() now. This function implements
nan-safe comparison for all types with components that contain floating
point numbers.

* Variant now has a VariantComparator which uses Variant::hash_compare()
safely compare floating point components of variant's types.

* The hash functions for floating point numbers will now normalize NaN
values so that all floating point numbers that are NaN hash to the same
value.

C++ module writers that want to use HashMap internally in their modules
can now also safeguard against this crash by defining their on
Comperator class that safely compares their types.

GDScript users, or writers of modules that don't use HashMap internally
in their modules don't need to do anything.

This fixes #7354 and fixes #6947.
2017-02-16 18:44:29 +01:00
Juan Linietsky 903a3aa5f0 a ton of bug fixes to the renderer 2017-02-16 08:55:43 -03:00
Rémi Verschelde 3fadcac7c4 Merge pull request #7814 from Hinsbart/timer_pause
SceneTreeTimer: Ability to set pause mode
2017-02-16 08:52:19 +01:00
Juan Linietsky da11d6d9e8 Many fixes to make exported scenes work better, still buggy. 2017-02-15 08:34:02 -03:00
Andreas Haas 4de29f9c7a
SceneTreeTimer: Ability to set pause mode
Adds an additional flag to SceneTree::create_timer() that tells it whether or not to process when the game is paused.
Defaults to false in order to not break existing functionality.
2017-02-15 08:02:08 +01:00
Andreas Haas dd4c2709e4
Spinbox: don't ignore double clicks.
Fixes the problem with spinboxes not updating when clicking too fast.
2017-02-14 00:57:49 +01:00
Rémi Verschelde ea7e8c8e86 Merge pull request #7795 from hpvb/rename-md-macro
Rename the _MD macro to D_METHOD
2017-02-13 15:46:17 +01:00
geequlim 4ebc30e303 Fix compile error with TextureButton
Export TextureButton::ResizeMode as its own enum values
2017-02-13 21:17:47 +08:00
Hein-Pieter van Braam 411ee71b4d Rename the _MD macro to D_METHOD
This new name also makes its purpose a little clearer

This is a step towards fixing #56
2017-02-13 12:50:02 +01:00
Hein-Pieter van Braam 0f687f0ccb Remove use of _SCS from ADD_METHOD
This saves typing and is a step towards fixing #56
2017-02-13 10:37:47 +01:00
Rémi Verschelde 70b9aa379d Merge pull request #7581 from Faless/v6_wild_bind
TCP/UDP listen bind to address and bugfixes
2017-02-12 23:31:40 +01:00
Rémi Verschelde 117a83fcb9 Merge pull request #7352 from Zylann/polyline
Polyline
2017-02-12 23:30:04 +01:00
Rémi Verschelde 73cedc3901 Merge pull request #7775 from Hinsbart/particles_flip
Particles2D: implement texture flip parameters.
2017-02-12 23:25:34 +01:00
Rémi Verschelde b2db9279fa Merge pull request #7769 from GodotExplorer/pr-resizeable-texturebutton_3
Enhance TextureButton and TextureRect with resize
2017-02-12 23:22:41 +01:00
Rémi Verschelde 458bd83dfc Merge pull request #7747 from sanikoyes/Pr-fix-tween-transform2d
Fix tween Transform2D typo
2017-02-12 23:18:38 +01:00
Rémi Verschelde 53b7bbfcce Merge pull request #7722 from RandomShaper/improve-touch-button
Fix touch button issues
2017-02-12 23:12:18 +01:00
Rémi Verschelde d791f5f06e Merge pull request #7712 from kbake/deselect-selection-on-ctrl-home/end
Selected text is now deselected on ctrl+home/end
2017-02-12 23:09:34 +01:00
Rémi Verschelde c51990ec9d Merge pull request #7706 from RandomShaper/touch-button-shape-master
Add shape property to TouchScreenButton
2017-02-12 23:09:16 +01:00
Pedro J. Estébanez 49e7e2cd2a Solve TouchScreenButtons issues
Fix touch button needing double tap after pause (applies to those not set to pass-by)
Fix error when a pressed TouchScreenButton with no associated action exits the tree
(with some refactoring of duplicate code)
2017-02-10 20:54:54 +01:00
Andreas Haas 6a2dccaf77
Particles2D: implement texture flip parameters. 2017-02-10 00:50:21 +01:00
geequlim ab375117ba Add STRETCH_KEEP_ASPECT_COVERED to TextureRect StretchMode
Make TextureButton to the same resize behavior with TextureRect
2017-02-09 22:52:52 +08:00
Juan Linietsky 07bbcf91f7 basic contact shadows implementation, will most likely need some polishing 2017-02-08 07:35:14 -03:00
sanikoyes 9123e91634 Fix tween Transform2D typo 2017-02-07 15:45:49 +08:00
Juan Linietsky 5cc63dee0f ability to adjust propagation in gi probe 2017-02-06 05:12:15 -03:00
Juan Linietsky 6f2e16306a Several bugfixes, improving the import workflow 2017-02-06 00:38:39 -03:00
kbake 1169f4e040 Selected text is now deselected on ctrl+home/end
This fixes Issue #7694 and also the error mentioned in the comments of that issue.
2017-02-03 02:01:41 -05:00
Juan Linietsky a02933bb3c wav file importing! 2017-02-02 22:51:58 -03:00
Pedro J. Estébanez 7b2fa207e9 Add shape property to TouchScreenButton
Adapted from 67a0da34a2
2017-02-02 12:16:14 +01:00
Pawel Kowal b602096b9b Fix #7011 ScrollContainer takes into account child's EXPAND flag when scrolling is enabled
(cherry picked from commit e9316a009e)
2017-02-02 08:24:37 +01:00
Rémi Verschelde 39f11ffc51 Merge pull request #7666 from Paulb23/line_length_guideline
Fixed line lenght guideline, and added colour option
2017-02-02 08:12:46 +01:00
Juan Linietsky 2cd2ca7bbc Lot of work in new importer, importing textures now works. 2017-02-01 09:46:36 -03:00
Paulb23 6b42cd5fe6 Fixed line lenght guideline drawing with color option 2017-01-28 14:36:57 +00:00
Juan Linietsky 4c28f35b2c Merge pull request #7002 from RandomShaper/vcs-friendliness
Greater VCS friendliness
2017-01-25 14:52:40 -03:00
Juan Linietsky 7e1afeafd4 Audio bus editing is COMPLETE! 2017-01-25 14:31:52 -03:00
Juan Linietsky 3b019bf644 Ability to delete, drag and drop audio buses! 2017-01-23 23:12:41 -03:00
Fabio Alessandrelli 88a56ba783 Remove set_ip_type from network classes (no longer needed)
- TCP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `connect` -> resolve using best protocol (UNSPEC), socket from address type

- UDP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `put_packet`/`put_var` -> resolve using TYPE_ANY (UNSPEC), socket from address type
    (to change socket type you must first call `close` it)
2017-01-23 20:18:22 +01:00
Rémi Verschelde a19a28288c Merge pull request #7610 from Hinsbart/shape_warning
CollisionShape2D: Fix warning icon not updating.
2017-01-23 07:55:50 +01:00
Rémi Verschelde 5ec3b5f2c9 Merge pull request #7604 from RayKoopa/gui_button_style_pressed
Respect style boxes for Button states other than "normal"
2017-01-23 07:55:24 +01:00
Andreas Haas 16eee2f59b
CollisionShape2D: Fix warning icon not updating.
`CollisionPolygon2D` also had this problem.
2017-01-22 14:11:17 +01:00
Juan Linietsky 0aa7242624 WIP new AudioServer, with buses, effects, etc. 2017-01-21 19:01:00 -03:00
Ray Koopa 2baeb531e6 Respect style boxes for Button states other than "normal" 2017-01-21 23:00:59 +01:00
Juan Linietsky ee0f53df52 Merge pull request #7528 from tagcup/real_t_float_fixes
Use real_t rather than float or double in generic functions (core/mat…
2017-01-20 19:24:49 -03:00
Rémi Verschelde 8e84e53ebb Merge pull request #7574 from RayKoopa/canvas_item_fix_is_hidden
Fix Spatial::is_visible and editor calls to CanvasItem/Spatial::is_visible
2017-01-19 16:12:00 +01:00
Ferenc Arn 81d9fe44df Use property convention introduced in b085c4 (_ rather than / as separator).
Fixes #7476.
2017-01-18 18:56:27 -06:00
Ray Koopa faa13adad3 Fix editor method calls to is_visible for Spatial and CanvasItem and is_visible itself for Spatial 2017-01-18 22:00:00 +01:00
Ferenc Arn 6f4f9aa6de Overloaded basic math funcs (double and float variants). Use real_t rather than float or double in generic functions (core/math) whenever possible.
Also inlined some more math functions.
2017-01-16 13:36:33 -06:00
Pedro J. Estébanez 7dbb1c0571 Improve .tscn VCS
Serialize dictionaries adding newlines between key-value pairs
Serialize group lists also with newlines in between
Serialize string properties escaping only " and \ (needed for a good diff experience with built-in scripts and shaders)

Bonus:
Make AnimationPlayer serialize its blend times always sorted so their order is predictable in the .tscn file.

This PR is back-compat; won't break the load of existing files.
2017-01-16 18:03:51 +01:00
BastiaanOlij 3a02df7739 Working on compile issues for iOS 2017-01-16 23:14:13 +11:00
Rémi Verschelde f44ee891be Style: Fix statements ending with ';;' 2017-01-16 08:49:52 +01:00