summaryrefslogtreecommitdiffstats
path: root/scene/resources/style_box.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>
* GDExtension: Mark virtual function as `is_required` in `extension_api.json`David Snopek2024-09-111-1/+1
| | | | Co-authored-by: Jovan Gerodetti <jovan.gerodetti@titannano.de>
* Extract StyleBoxFlat, StyleBoxTexture and StyleBoxLine in their own fileHendrik Brucker2023-07-171-924/+0
|
* Remove useless polygons from StyleBoxFlat drawingDavid Giardi2023-05-201-24/+38
|
* Fix blurry borders on antialiased FlatStyleBoxDavid Giardi2023-04-171-32/+40
| | | | | | | | | | | This is a fix of the antialiasing logic of FlatStyleBox. It is now possible to have smooth rounded corners while keeping the edges sharp on the pixels. The antialiasing gradient positioning is ajusted so that the "hard" border corresponds to the middle of that gradient instead of one end. Checked against rendering of rounded rectangles in a vector graphics software.
* Add a theme usability setting which updates the touch area of UI elements ↵Fredia Huya-Kouadio2023-01-281-1/+1
| | | | (e.g: scrollbar) for the editor on touchscreen devices
* Don't change region_rect when setting texturekobewi2023-01-261-5/+0
|
* Remove size restrictions from StyleBoxTextureYuri Sizov2023-01-261-16/+0
|
* Clean-up, harmonize, and improve StyleBox APIYuri Sizov2023-01-191-104/+105
| | | | | | - 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`.
* 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".
* Simplify GDVIRTUAL_REQUIRED_CALL callskobewi2022-11-301-8/+4
|
* Simplify GDVIRTUAL_CALL callskobewi2022-10-191-11/+5
|
* Unbind StyleBox*.set_*_individual() methodsFireForge2022-09-071-5/+0
| | | | | | | | | Unbinds the following methods: - StyleBox.set_default_margin_individual() - StyleBoxFlat.set_corner_radius_individual() - StyleBoxFlat.set_expand_margin_individual() - StyleBoxTexture.set_expand_margin_individual() - StyleBoxTexture.set_margin_size_individual()
* Add set_default_margin_all/individual to StyleBoxFireForge2022-09-071-0/+35
|
* Add `is_zero_approx` methods to `Vector2`, `3`, and `4`Jonathan Nicholl2022-09-021-1/+1
|
* Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-3/+3
|
* Add suffixes to all nodes and resourcesFireForge2022-06-111-31/+31
|
* Improve StyleBox previewreduz2022-05-261-5/+7
| | | | | | | * Show checkerboard on background. * Add margins. * Show Ninepatch lines (toggleable). * Move the region to its own section so it does not pollute.
* Merge pull request #58599 from Calinou/styleboxflat-add-skewRémi Verschelde2022-04-281-16/+34
|\ | | | | Add a Skew property to StyleBoxFlat
| * Add a Skew property to StyleBoxFlatHugo Locurcio2022-02-261-16/+34
| | | | | | | | | | | | | | This makes it possible to create more aesthetically pleasing styleboxes for GUI theming, especially in games that have a futuristic appearance (where skewed buttons and progress bars are common).
* | Merge pull request #52624 from e8newallm/52577Rémi Verschelde2022-04-281-4/+8
|\ \ | | | | | | Corrected ordering of Left/Top/Right/Bottom properties
| * | Corrected directional properties to be ordered Left->Top->Right->BottomMatthew Newall2021-09-191-4/+8
| | |
* | | Discern between virtual and abstract class bindingsreduz2022-03-101-0/+33
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Use List Initializations for Vectors.Anilforextra2022-01-121-11/+12
| |
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | | | | | Happy new year to the wonderful Godot community!
* | Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio2021-11-031-1/+1
|/ | | | | This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
* Use real_t and double where appropriate in ParticlesAaron Franke2021-08-121-2/+2
|
* StyleBox fake AA improvements (aa_size float property)Hendrik Brucker2021-08-101-67/+76
|
* Fixed a bunch of connection errors in TextureEditorPluginYuri Roubinsky2021-06-121-3/+0
|
* Hide more options of disabled propertiesMichael Alexsander2021-03-031-0/+7
|
* Fix StyleBoxLine's incorrect style margin valuesMichael Alexsander2021-02-161-2/+11
|
* Removed _change_notifyreduz2021-02-101-9/+0
| | | | | | -For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
* Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-51/+5
|
* Merge pull request #37547 from aaronfranke/tauRémi Verschelde2021-02-011-2/+2
|\ | | | | Use Math_TAU and deg2rad/etc in more places and optimize code
| * Use Math_TAU and deg2rad/rad2deg in more places and optimize codeAaron Franke2021-01-091-2/+2
| |
* | Fix typo in theming methods ("botton" -> "bottom")Hugo Locurcio2021-01-181-2/+2
|/
* 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 🎆
* Rename Rect2 and Rect2i grow_margin() to grow_side()Marcel Admiraal2020-12-281-1/+1
|
* Rename Control margin to offsetMarcel Admiraal2020-12-231-94/+94
|
* Cleanup unused engine codeTomasz Chabora2020-12-091-10/+0
|
* Refactored 2D shader and lighting systemreduz2020-10-241-22/+1
| | | | | | | | | | -Removed normal/specular properties from nodes -Create CanvasTexture, which can contain normal/specular channels -Refactored, optimized and simplified 2D shaders -Use atlas for light textures. -Use a shadow atlas for shadow textures. -Use both items aboves to make light rendering stateless (faster). -Reorganized uniform sets for more efficiency.
* Add a property hint to StyleBoxFlat `shadow_size` for editor usabilityHugo Locurcio2020-09-241-1/+1
| | | | | | This adds a visible range to the slider so it can be dragged more easily. This closes #42309.
* Adds automatic update for region_rectZak2020-08-291-0/+1
| | | | When changing the texture region for a StyleBox, the regions was not updating automatically in the Texture editor.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-9/+17
| | | | | 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/+27
| | | | | | | | | | | | | | | | | | | | | | | 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-59/+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.
* Renaming of servers for coherency.Juan Linietsky2020-03-271-3/+3
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Rename more 2D and 3D nodes to follow conventionRémi Verschelde2020-03-271-1/+2
| | | | Rename editor plugins to match the new node names.
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-18/+18
| | | | | | | | | | | | | | | | | | | | | - 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.