Commit Graph

78 Commits

Author SHA1 Message Date
PouleyKetchoupp a7a025531b Fixed StyleBoxFlat antialiasing with aa size of 1
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-05 10:54:24 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Rémi Verschelde 0df1122acc
Merge pull request #34488 from nekomatata/style_box_flat_aa
Fixed StyleBoxFlat border size with aa on
2019-12-22 12:31:19 +01:00
PouleyKetchoupp 6ffbd36e3d Fixed StyleBoxFlat border size with aa on
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-20 13:29:43 +01:00
Hugo Locurcio 324e02596f
Lower the maximum StyleBoxFlat corner detail to 20
This value should be sufficient even for very large corner radii.

This closes #34354.
2019-12-14 23:35:01 +01:00
PouleyKetchoupp 1120de862d StyleBox preview adjusted to fit all drawn content
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-24 16:26:30 +01:00
PouleyKetchoupp 2511f275b9 StyleBoxFlat doesn't draw content when width or height is zero
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-11-17 15:38:05 +01:00
qarmin 00b86b29f1 Validate array indexes in StyleBox 2019-10-10 11:48:58 +02:00
byfron b7ed4829ba Computes UV coordinates of the canvas_item vertices of StyleBoxFlat 2019-09-02 20:57:43 +02:00
PouleyKetchoupp cb3842833a Early exit when nothing to draw in style box flat (fixes #27764) 2019-04-07 22:23:44 +02:00
PouleyKetchoupp 8346d90c5e Properly handle different border widths in rounded corner aa
Note: removed (unused and not implemented) support for multiple border colors
2019-03-19 11:51:32 +01:00
PouleyKetchoupp cb097283db Support for shadow offset in box style 2019-03-19 10:35:06 +01:00
Bojidar Marinov 8dad5f1e10
Update controls when a stylebox or icon override changes; change to CONNECT_REFERENCE_COUNTED
Also, cleanup unnessesary calls to update() and NOTIFICATION_THEME_CHANGED.

Fixes #25904.
2019-02-25 17:42:38 +02:00
Juan Linietsky d0b736f7e5 Ability to get the current canvas item being drawn from stylebox. 2019-01-24 10:22:41 -03:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Juan Linietsky f2e54057ae -Moved EditorDefaultValue to ClassDB, made it core
-Removed one and zero hints for properties, replaced by default value
2018-11-08 11:30:59 -03:00
Michael Alexsander Silva Dias cad9e4e692 Remove unnecessary "rings" variable from "draw_rings()" in StyleBox 2018-10-16 14:48:46 -03:00
karroffel a0f206aae8 fix enum cast warnings on clang 2018-10-04 09:17:59 +02:00
Juan Linietsky f6ce73f724 Visual Shaders are back. 2018-07-14 18:16:18 -03:00
Juan Linietsky 4b5227ff77 -Ability to open resources in the same window
-Plenty of fixes and improvements to new inspector
-Fixes that were needed to make inspector work better
2018-05-17 18:03:05 -03:00
Juan Linietsky 2ba8b5b27c
Merge pull request #17828 from bojidar-bg/17779-progressbar-minimum-size
Fix StyleBox ignoring region rect and ProgressBar using center size
2018-05-07 16:33:12 -03:00
sersoong 21eac24af1 Fixed stylebox crash 2018-04-27 17:30:28 +08:00
Bojidar Marinov 91eb80041d
Fix StyleBox ignoring region rect and ProgressBar using center size
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-03-28 20:56:09 +03:00
Pieter-Jan Briers b51a86a57a StyleBoxTexture: Texture instead of RES for texture and normal_map. 2018-02-22 19:27:35 +01:00
luz.paz 612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Mariano Suligoy 517ff5c8d7 attemp to fix #15870 2018-01-21 12:31:59 -03:00
Bojidar Marinov 9b8e8b2220
Bind many more properties to scripts
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
2018-01-12 00:58:14 +02:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
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.
2018-01-05 01:22:23 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Andreas Haas 4c716f3623
[DOCS] Fix a few typos. 2017-10-14 12:45:49 +02:00
toger5 2aa735757a unified draw_center naming for (9patch,StyleBoxes)
- filled -> draw_center
 - is_draw_center -> is_draw_center_enabled
 - get_draw_center -> is_draw_center_enabled
2017-08-31 15:25:24 +02:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
toger5 aff293a2fd fixed crash styleBoxTexture binding issue 2017-08-22 22:11:41 +02:00
Rémi Verschelde 4fc0a2d776 Merge pull request #10519 from toger5/remove_addition_border
Remove addition border
2017-08-22 08:10:15 +02:00
toger5 32f4918f02 added utility funtions for expand margins (in styleBox) 2017-08-21 23:07:08 +02:00
Ignacio Etcheverry 32dd9a9f66 ClassDB: Provide the enum name of integer constants 2017-08-20 22:07:43 +02:00
Rémi Verschelde aef7a3178f Merge pull request #10444 from toger5/styleBoxFlat_corner_detail_value_limitation
styleBoxFlat: clamp corner_detail + aa_size
2017-08-19 17:56:48 +02:00
toger5 69c039ffab styleBoxFlat: clamp corner_detail + aa_size 2017-08-19 15:12:46 +02:00
toger5 ad5b0674f6 Performance styleBoxFlat:
- style box flat was always drawn with 8 verts per corner in case it
   was a rounded corner... now it uses only one vert if it has no
rounded corner.
2017-08-19 14:46:04 +02:00
Ignacio Etcheverry 18938d3c0e Removes extra argument from StyleBoxFlat::get_border_color() 2017-08-19 08:59:45 +02:00
Rémi Verschelde a21ca962a4 Merge pull request #10265 from leezh/patchnine_stylebox
Added Tile and TileFit to StyleBoxes
2017-08-16 18:16:23 +02:00
toger5 701fb55a10 styleBoxFlat removed light, dark color entirely 2017-08-15 20:11:36 +02:00
toger5 015494ba56 new StyleBoxFlat removed multiBorderColor
- removed only the bindings because the drawing code is not done yet
 - kept c++ functions for setting individual border color for future implementation
2017-08-15 19:49:24 +02:00
toger5 d637cbb289 new StyleBoxFlat limits for drawing
- corner and border are decreased if necassary to achoieve clean stylboxes
 - prohibits wired drawing artifacts when using wrong values
 - corner radius are relative to the partner corner when they would result in glitches
2017-08-15 19:49:24 +02:00
toger5 356eb47fea new StyleBoxFlat added more drawing features
- corner radius bindings
 - shadow
 - antiAliasing
 - CornerDetail
2017-08-15 19:47:51 +02:00
toger5 f05e61ed09 NEW Style Box Flat Implementation
- now use polygons!
 - renamed blend -> blend_border
 - draw_center -> filled
 - GDScript biding
2017-08-15 19:36:34 +02:00
Zher Huei Lee b6ec3f02f0 Added Tile and TileFit to StyleBoxes
Was already implemented for Patch9 boxes, but wasn't exposed here.
Allows for use in other GUI elements like panels and buttons.
2017-08-12 09:57:56 +08:00
Ignacio Etcheverry 2f290038d6 Removes type information from method binds 2017-08-10 07:17:50 +02:00
Rémi Verschelde 85088275c5 Merge pull request #8209 from robertdhernandez/Texture-Region-Editor-Sync
Texture region now updates when changing an Atlas region rect
2017-08-01 00:15:37 +02:00
George Marques 2a0c0db028
Fix "vertical" property of StyleBoxLine 2017-07-19 23:30:39 -03:00