summaryrefslogtreecommitdiff
path: root/scene/gui/spin_box.cpp
AgeCommit message (Collapse)Author
2022-06-27Add a const call mode to Object, Variant and Script.K. S. Ernest (iFire) Lee
For this to work safely (user not call queue_free or something in the expression), a const call mode was added to Object and Variant (and optionally Script). This mode ensures only const functions can be called, making it safe to use from the editor. Co-Authored-By: reduz <reduzio@gmail.com>
2022-03-10Discern between virtual and abstract class bindingsreduz
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-09align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke
2021-12-06Rename minimum_size_changed() methodkobewi
2021-11-16Rename built-in `SGN()` macro to `SIGN()`Hugo Locurcio
This matches the name of the GDScript function (except it's uppercase here).
2021-11-12Use "enum class" for input enumsAaron Franke
2021-10-09Fix missing argument names in bindingsRémi Verschelde
While at it, tweak some boolean setters to use `p_enabled` for the bool. Also renames `draw_minimap()` to `set_draw_minimap()`.
2021-09-21Added option for spinbox to update it's value on line edit 'text_changed' ↵Eric M
rather than 'text_entered'
2021-08-28Add support for internal nodeskobewi
2021-08-23Entirely removes BIND_VMETHOD in favor of GDVIRTUALreduz
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-07-18Optimize StringName usagereduz
* 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.
2021-07-17Create many types of popups on demandreduz
* LineEdit popups created on demand. * TextEdit popups created on demand. * SpinSlider popups created on demand. * ResourcePicker popups created on demand. Improves editor responsiveness.
2021-06-20Use mouse and joypad enums instead of plain integersAaron Franke
Also MIDIMessage
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-16Documentation search fixesGregory Basile
Updates rich_text_label so that the built-in documentation can be searched Previously, it would only find the first result and would not select other results Renames "_entered" functions to "_submitted"
2021-04-05Fix crashes in *_input functionsRafał Mikrut
2021-03-23Rename ButtonList enum and members to MouseButtonAaron Franke
2021-03-06Release mouse when SpinBox leaves scene treekobewi
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-01-26Fix unintended SpinBox mouse captureVolka
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-23Rename Control margin to offsetMarcel Admiraal
2020-11-26[Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg
use Text Server interface. Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
2020-08-14Merge pull request #38223 from EricEzaM/spinbox-update-lineedit-after-bad-inputRémi Verschelde
Fixed bug where spinbox would not update to it's actual value after non-numeric input
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-04-28Rename InputFilter back to InputRémi Verschelde
It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690.
2020-04-26Fixed bug where spinbox would not update to it's actual value after ↵Eric M
non-numeric input
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-26Popups are now windows also (broken!)Juan Linietsky
2020-03-26Refactored input, goes all via windows now.Juan Linietsky
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26Refactored Input, create DisplayServer and DisplayServerX11Juan Linietsky
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-11Texture refactorJuan Linietsky
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
2020-01-11Add apply method to SpinBoxJóhannes Gunnar Þorsteinsson
2020-01-01Update copyright statements to 2020Rémi Verschelde
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.
2019-12-10Update minimum size of SpinBox on theme changeTomasz Chabora
2019-10-21Fixes spinbox not releasing focus on value changeEmmanuel Barroga
Trying to release focus of the spinbox's lineedit would not work when done in the "value_changed" callback. The reason is because the "value_change" signal is called first, then the "get_focus" method is called next. This causes the spinbox to get_focus after you try to release focus within the "value_changed" callback. To resolve this, spinbox should get focus first and then emit "value_changed".
2019-08-30Ignore the prefix and suffix in the SpinBox expressionHugo Locurcio
This fixes a regression caused by 86a31e9e385c7909a0cdd24a5ee790c3dca03b98.
2019-08-29Calculate the SpinBox value using the Expression classHugo Locurcio
This closes #31780.
2019-08-12Fix Right-Click Menu Deselecting Edits ContentEmmanuel Barroga
Right-clicking a property to open the context menu deselects the text field. This causes the context menu to be useless because it doesn't have anything to edit.
2019-07-23Inspector: Make default float step configurableRémi Verschelde
Also allow lifting the decimal step formatting with a hint range step of 0. A new `range_step_decimals()` is added for this to avoid breaking compatibility on the general purpose `step_decimals()` (which still returns 0 for an input step of 0). Supersedes #25470. Partial fix for #18251.
2019-07-10Use reference to constant in functionsqarmin
2019-05-21Pass mouse events to SpinBox from its LineEditTomasz Chabora
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-10Fixed issue #11893 (SpinBox Capturing mouse)Rodolphe Suescun
To prevent the SpinBox from capturing mouse, added a "drag.allowed" variable that is set to true only when clicking inside the control. Entering the control with the left mouse button pressed will not trigger drag anymore. Also modified the value update code when dragging so it does not modify the base_val.