summaryrefslogtreecommitdiffstats
path: root/scene/main/timer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Revert "Update Node::get_configuration_warnings signature"Rémi Verschelde2024-02-171-2/+2
| | | | This reverts commit d3852deaa450d77edb30df2bb1c77bd7bc45befc.
* Update Node::get_configuration_warnings signatureRedMser2024-02-081-2/+2
|
* Fix auto-translations in editorkobewi2023-03-221-1/+1
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron2022-09-191-2/+2
|
* Use suffixes for units in nodes and resourcesAaron Franke2022-05-191-2/+2
|
* String: Remove TTR and DTR defines in non-tools buildRémi Verschelde2022-03-281-1/+1
| | | | | This ensures we don't use TTR in runtime code, as it's specifically meant to source translations for the editor.
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-2/+2
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Add a warning for Timer nodes with very low wait timesHugo Locurcio2021-10-091-0/+11
| | | | | | | Very low wait times behave in unpredictable ways depending on the rendered frame rate. This is because the timeout signal is only emitted once per rendered frame (or physics frame, depending on the timer's process mode).
* Fix some unnecessary includesAaron Franke2021-08-131-2/+0
|
* Use doubles for time everywhere in Timer/SceneTreeAaron Franke2021-07-261-4/+4
|
* Optimize StringName usagereduz2021-07-181-2/+2
| | | | | | | | | | | * Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
* Fix editor suffixes and degrees conversionreduz2021-06-301-1/+1
| | | | | | | | | | | | | * Functions to convert to/from degrees are all gone. Conversion is done by the editor. * Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees. * Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m" * In general, can add suffixes for EditorSpinSlider Not covered by this PR, will have to be addressed by future ones: * Ability to switch radians/degrees in the inspector for angle properties (if actually wanted). * Animations previously made will most likely break, need to add a way to make old ones compatible. * Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes. * Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
* Merge pull request #49719 from LightningAA/rename-node-is-ancestor-ofRémi Verschelde2021-06-291-1/+1
|\ | | | | Rename `is_a_parent_of()` to `is_ancestor_of()`
| * Rename `is_a_parent_of()` to `is_ancestor_of()`Lightning_A2021-06-211-1/+1
| |
* | Add PROPERTY_USAGE_NONE and use itAaron Franke2021-06-171-2/+2
|/
* doc: Sync classref with current sourceRémi Verschelde2021-02-191-12/+12
| | | | And fix various bogus bindings following previous PRs.
* Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-9/+1
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Do not start `Timer` upon manual switching of internal processAndrii Doroshenko (Xrayez)2020-11-201-2/+2
| | | | | | | | | Prevents `Timer` to prematurely start and timeout immediately if internal processing is enabled manually with `Timer.set_process_internal(true)` or `Timer.set_physics_process_internal(true)`. Even if the internal processing is enabled manually, the user still has to actually start the timer with `start()` method explicitly.
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-9/+16
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-13/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-2/+6
| | | | Part of #33027.
* Rename more 2D and 3D nodes to follow conventionRémi Verschelde2020-03-271-0/+0
| | | | Rename editor plugins to match the new node names.
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Improve the Timer wait time property hintHugo Locurcio2019-12-281-1/+1
| | | | | - Make it possible to enter more precise values (up to 3 decimals). - Make it possible to enter values above 4096.
* Added more details in Timer.start() error message.x2f2019-11-271-1/+1
|
* Added is_inside_tree() check in both Timer and Tweenshaderbeast2019-09-031-0/+3
| | | | Tween now throws error and doesnt even execute.
* Remove ERR_EXPLAIN from scene/* codeTomasz Chabora2019-08-091-2/+1
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+1
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Allows setting the Timer wait_time in start method.Anish2018-04-271-2/+5
| | | | | | | | Allows shortening the two line method of Timer.set_wait_time followed by Timer.start set wait_time as a parameter to Timer.start. Also modifies the class documentation. Fixes: #18107
* Bind many more properties to scriptsBojidar Marinov2018-01-121-0/+2
| | | | | | | Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Refactor Fixed to PhysicsPoommetee Ketson2017-10-211-1/+1
|
* Renamed fixed_process to physics_processAndreaCatania2017-09-301-10/+10
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Merge pull request #10351 from neikeq/enums-are-for-the-weakJuan Linietsky2017-08-211-2/+2
|\ | | | | ClassDB: Provide the enum name of integer constants
| * ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry2017-08-201-2/+2
| |
* | Removes editor_hint from SceneTreeIgnacio Etcheverry2017-08-191-1/+3
|/
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* Fixer looping timer accumulation in _processRémi Verschelde2017-04-051-3/+2
| | | | Follow-up to #8251.
* previous value of time_left is added to wait_time before assigning to time_leftNikhil Shagrithaya2017-04-041-2/+1
|