summaryrefslogtreecommitdiffstats
path: root/editor/editor_spin_slider.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Some code simplificationsMarkus Sauermann2023-02-071-1/+0
| | | | | | | | | 1. `number_width` isn't used later 2. `return_type` is used only once 3. AudioServer::get_singleton()->get_channel_count() always returns a channel_count of 1 or larger 4. negative `aa->backward` conditional 5. `current_canvas` == `find_world_2d()->get_canvas()` 6. identical if `render_shadows`
* Clean-up, harmonize, and improve StyleBox APIYuri Sizov2023-01-191-4/+4
| | | | | | - Make all margin properties follow the same naming convention (their getter and setter too). - Remove a virtual counterpart of `get_style_margin` from API. - Allow to override `get_minimum_size` from scripting and remove `get_center_size`.
* Fix TAB key usage in EditorSpinSlider (and hence inpector).Juan Linietsky2023-01-121-5/+12
| | | | | | | * This ensures that the tab key usage is correct in all situations in EditorSpinSlider * The ESC key can also close the lineedit popup. I can't find a proper issue to fix, but partially solves the concerns raised in #37723.
* 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".
* Add inspector plugin for key time edit & Change find key argumentSilc Renew2022-12-221-66/+77
|
* Fix focus after pressing Enter in EditorSpinSliderMarkus Sauermann2022-11-261-0/+1
| | | | | | With the change from Popup to Controls for the Input-Node, it becomes necessary to adjust focus after hiding the Input-Node to the initial Control.
* Change EditorSpinSlider's popup to Controlkobewi2022-10-151-7/+4
|
* Merge pull request #66337 from EricEzaM/sprite-framesRémi Verschelde2022-10-131-1/+1
|\ | | | | | | Ensure control built-in shortcuts are matched exactly & add shortcuts for SpriteFrames editor
| * Ensure all checks of `is_action` in the editor which are for 'shortcut' use, ↵Eric M2022-09-241-1/+1
| | | | | | | | check the action exactly.
* | EditorSpinSlider: Make sure grabber doesn't get hidden during grabbingDNKpp2022-09-301-1/+1
|/ | | | Fixes #63544.
* Fix key mapping changes when moving from macOS to other platformbruvzg2022-09-071-1/+1
| | | | | Removes separate `Command` key (use `Meta` instead). Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
* Merge pull request #65140 from Mickeon/editor-spin-slider-newlineRémi Verschelde2022-09-051-1/+1
|\
| * Modify newlines in Editor Spin Slider tooltipMicky2022-09-011-1/+1
| | | | | | | | Makes both key suggestions easier to read.
* | Implement Physical Light Units as an optional setting.clayjohn2022-08-311-1/+5
|/ | | | | | This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value. In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
* Rename `CanvasItem.update()` to `queue_redraw()`Micky2022-08-291-13/+13
| | | | | | | | | | Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
* Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde2022-08-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTIFICATION_THEME_CHANGED" This reverts commit 4b817a565cab8af648c88cfc7ab6481e86ee3625. Fixes #64988. Fixes #64997. This caused several regressions (#64988, #64997, https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605) which point at a flaw in the current logic: - `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with `NOTIFCATION_THEME_CHANGED` as introduced in #62845. - Some classes use their `THEME_CHANGED` to cache theme items in member variables (e.g. `style_normal`, etc.), and use those member variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE` notification is now deferred, they end up accessing invalid state and this can lead to not applying theme properly (e.g. for EditorHelp) or crashing (e.g. for EditorLog or CodeEdit). So we need to go back to the drawing board and see if `THEME_CHANGED` can be called earlier so that the previous logic still works? Or can we refactor all engine code to make sure that: - `ENTER_TREE` and similar do not depend on theme properties cached in member variables. - Or `THEME_CHANGE` does trigger a general UI update to make sure that any bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE` does arrive for the first time. But that means having a temporary invalid (and possibly still crashing) state, and doing some computations twice which might be heavy (e.g. `EditorHelp::_update_doc()`).
* Merge pull request #62846 from ↵Rémi Verschelde2022-08-271-1/+0
|\ | | | | | | | | AaronRecord/remove_redundant_theme_updates_in_enter_tree Remove `NOTIFICATION_ENTER_TREE` when paired with `NOTIFICATION_THEME_CHANGED`
| * Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record2022-08-271-1/+0
| |
* | Add read-only mode to AnimationTreeEditor pluginsSaracenOne2022-08-251-0/+4
|/
* Implement Quaternion EditorSilc Renew2022-08-241-0/+4
|
* Rename OSX to macOS and iPhoneOS to iOS.bruvzg2022-07-211-1/+1
|
* Rename Control PRESET_WIDE to PRESET_FULL_RECTFireForge2022-07-181-1/+1
|
* Refactor Font configuration and import UI, and Font resources.bruvzg2022-07-061-2/+5
|
* Add a const call mode to Object, Variant and Script.K. S. Ernest (iFire) Lee2022-06-271-1/+1
| | | | | | | 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>
* Merge pull request #59770 from fire-forge/rounded-cornersRémi Verschelde2022-06-101-3/+3
|\
| * Add rounded corners to EditorProperty and EditorSpinSliderFireForge2022-05-251-3/+3
| | | | | | | | | | | | | | | | - Adds rounded corners to the EditorProperty child background, EditorSpinSlider label background, and resource sub-inspector borders and background. - Allows customizing EditorSpinSlider label background through a new Theme StyleBox property, label_bg. - Makes margins consistent in resource sub-inspectors. - Removes space between buttons in NodePath, Resource, and multiline string editors. - Adds space between label background and content for vertical property editors.
* | Fix `EditorSpinSlider` mouse reset position on tree exitJohannes Witt2022-06-071-0/+1
|/
* Merge pull request #60086 from fire-forge/editorspinslider-hide-sliderRémi Verschelde2022-05-161-0/+4
|\
| * Expose EditorSpinSlider.hide_sliderFireForge2022-04-091-0/+4
| |
* | Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-021-4/+0
|/ | | | | | | | | | | Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
* Rename warp mouse functions to warp_mouseMarkus Sauermann2022-03-271-2/+2
|
* Unify TextServer built-in module and GDExtension code.bruvzg2022-03-171-1/+1
|
* Handle NOTIFICATION_WM_CLOSE_REQUEST in EditorSpinSliderMarkus Sauermann2022-03-161-0/+1
|
* Initialize bools in the headers in editorAaron Franke2022-03-121-11/+0
|
* Make EditorSpinSlider label color a theme propertyFireForge2022-03-041-12/+1
|
* Port existing _notification code to use switch statements (part 1/3)jmb4622022-02-161-14/+16
|
* Editor: Cleanup some includes dependenciesRémi Verschelde2022-02-151-1/+0
| | | | | | | | | | | Removes some unnecessary includes from `editor_node.h`, and instead add those where they're used. Removes unnecessary `editor_node.h` includes in various editor classes. Renames `dynamicfont` to `dynamic_font` in a couple files. Misc cleanup while jumping through that rabbit hole.
* Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker2022-02-121-2/+2
|
* Revert "Add missing SNAME macro optimization to all theme methods call"Rémi Verschelde2022-02-081-1/+1
| | | | | | | | This reverts commit a988fad9a092053434545c32afae91ccbdfbe792. As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used everywhere but only in critical code paths. For theme methods specifically, it was by design that only getters use `SNAME` and not setters.
* Add missing SNAME macro optimization to all theme methods calljmb4622022-02-061-1/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Make EditorSpinSlider grabbers thicker to be more noticeableHugo Locurcio2021-12-151-1/+1
|
* Merge pull request #55519 from ↵Rémi Verschelde2021-12-101-7/+14
|\ | | | | | | Calinou/editor-spin-slider-float-draw-filled-slider
| * Draw the filled part of the slider on float EditorSpinSlidersHugo Locurcio2021-12-011-7/+14
| | | | | | | | | | | | This makes it more obvious that the slider has a "filled" part on the left, which improves visibility especially in wider inspectors (such as the Project Settings and Editor Settings).
* | Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-3/+3
| | | | | | | | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* | align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke2021-12-091-2/+2
|/
* Added `reset_size` method to `Control` and `Window` classesYuri Roubinsky2021-11-221-1/+1
|
* Use "enum class" for input enumsAaron Franke2021-11-121-10/+12
|
* Make EditorSpinSlider wait for text on key_up/downFrancois Belair2021-10-261-2/+12
|
* Implement TextServer GDExtension interface, remove TextServer GDNative ↵bruvzg2021-10-011-3/+2
| | | | interface.