summaryrefslogtreecommitdiff
path: root/scene/resources/style_box.cpp
AgeCommit message (Collapse)Author
2021-11-03Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio
This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-08-12Use real_t and double where appropriate in ParticlesAaron Franke
2021-08-10StyleBox fake AA improvements (aa_size float property)Hendrik Brucker
2021-06-12Fixed a bunch of connection errors in TextureEditorPluginYuri Roubinsky
2021-03-03Hide more options of disabled propertiesMichael Alexsander
2021-02-16Fix StyleBoxLine's incorrect style margin valuesMichael Alexsander
2021-02-10Removed _change_notifyreduz
-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.
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-02-01Merge pull request #37547 from aaronfranke/tauRémi Verschelde
Use Math_TAU and deg2rad/etc in more places and optimize code
2021-01-18Fix typo in theming methods ("botton" -> "bottom")Hugo Locurcio
2021-01-09Use Math_TAU and deg2rad/rad2deg in more places and optimize codeAaron Franke
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-28Rename Rect2 and Rect2i grow_margin() to grow_side()Marcel Admiraal
2020-12-23Rename Control margin to offsetMarcel Admiraal
2020-12-09Cleanup unused engine codeTomasz Chabora
2020-10-24Refactored 2D shader and lighting systemreduz
-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.
2020-09-24Add a property hint to StyleBoxFlat `shadow_size` for editor usabilityHugo Locurcio
This adds a visible range to the slider so it can be dragged more easily. This closes #42309.
2020-08-29Adds automatic update for region_rectZak
When changing the texture region for a StyleBox, the regions was not updating automatically in the Texture editor.
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: Enforce separation line between function definitionsRémi Verschelde
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.
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-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-27Rename more 2D and 3D nodes to follow conventionRémi Verschelde
Rename editor plugins to match the new node names.
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- 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.
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-05Fixed StyleBoxFlat antialiasing with aa size of 1PouleyKetchoupp
Also made aa size consistent when computing uv coordinates and fixed a warning about aa_border_width not initialized in some cases. fixes #34830
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-22Merge pull request #34488 from nekomatata/style_box_flat_aaRémi Verschelde
Fixed StyleBoxFlat border size with aa on
2019-12-20Fixed StyleBoxFlat border size with aa onPouleyKetchoupp
The different Rect used to draw rings were wrongly calculated when anti-aliasing was enabled. Also getting rid of some overlapping glitches when using transparent colors for the filling or borders. Fixes #34104
2019-12-14Lower the maximum StyleBoxFlat corner detail to 20Hugo Locurcio
This value should be sufficient even for very large corner radii. This closes #34354.
2019-11-24StyleBox preview adjusted to fit all drawn contentPouleyKetchoupp
This change allows StyleBox preview to take shadows and content margins into account to display how a whole panel would be rendered. The preview control clips contents so that in any case it doesn't bleed on controls around. Fixes #33801
2019-11-17StyleBoxFlat doesn't draw content when width or height is zeroPouleyKetchoupp
Causes unnecessary computations and drawing, and a division by zero when calculating uv coordinates. This case happened with ScriptEditor's member overview (ItemList), initialized with a minimum width of 0. Fixes #33634
2019-10-10Validate array indexes in StyleBoxqarmin
2019-09-02Computes UV coordinates of the canvas_item vertices of StyleBoxFlatbyfron
2019-04-07Early exit when nothing to draw in style box flat (fixes #27764)PouleyKetchoupp
2019-03-19Properly handle different border widths in rounded corner aaPouleyKetchoupp
Note: removed (unused and not implemented) support for multiple border colors
2019-03-19Support for shadow offset in box stylePouleyKetchoupp
2019-02-25Update controls when a stylebox or icon override changes; change to ↵Bojidar Marinov
CONNECT_REFERENCE_COUNTED Also, cleanup unnessesary calls to update() and NOTIFICATION_THEME_CHANGED. Fixes #25904.
2019-01-24Ability to get the current canvas item being drawn from stylebox.Juan Linietsky
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-08-Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky
-Removed one and zero hints for properties, replaced by default value
2018-10-16Remove unnecessary "rings" variable from "draw_rings()" in StyleBoxMichael Alexsander Silva Dias
2018-10-04fix enum cast warnings on clangkarroffel
2018-07-14Visual Shaders are back.Juan Linietsky
2018-05-17-Ability to open resources in the same windowJuan Linietsky
-Plenty of fixes and improvements to new inspector -Fixes that were needed to make inspector work better
2018-05-07Merge pull request #17828 from bojidar-bg/17779-progressbar-minimum-sizeJuan Linietsky
Fix StyleBox ignoring region rect and ProgressBar using center size
2018-04-27Fixed stylebox crashsersoong
2018-03-28Fix StyleBox ignoring region rect and ProgressBar using center sizeBojidar Marinov
ProgressBar used the center size of the stylebox to calculate its minimum size, thus disallowing certain setups. If the old behaviour is wanted, it can be forced by providing a custom minimum size, or by giving proper margins to the stylebox. Fixes #17779.
2018-02-22StyleBoxTexture: Texture instead of RES for texture and normal_map.Pieter-Jan Briers
2018-02-21Fix typos with codespellluz.paz
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt` Whitelist consists of: ``` ang doubleclick lod nd que te unselect ```