Comments (3)
Sub-Region Rect defines what part of the texture you want to use. Unless you want to use only part of the texture, it should be set to the default value of 0, which means whole texture.
The only properties relevant for 9 Patch are the Texture Margins.
from godot.
Right, that is what I suspected the intended behavior might be, but I do feel like the editor might could be a little clearer when it comes to communicating that to the user. None of the field seem to have anything to do with 9-Patch textures at first glance
from godot.
@JoshuaSteward1193 I might suffered the same problem, recently I download kenney UI which contains a 48 x 48 border texture, so I want to apply the border to a custom theme of Button. this is my solution finally solve the nine patch problem.
- Create a new theme
- Create a new Button Type
- Create a new normal StyleBoxTexture
- Edit StyleBoxTexture
- In StyleBoxTexture inspector, drag texture into the texture property
- set Texture Margins property to
left: 16px; top 16px; right: 16px; bottom: 16px
why 16px ? since my texture size is 48 x 48 ,and it's a ninepatch texture which means should be 3 x 3 blcok. so 48 / 3 is 16px and it behaves as what I expected
.I will upload the border texture here.
from godot.
Related Issues (20)
- macOS: App signing fails when using C# HOT 4
- Dead keys trigger two times every other press when used as input on Windows
- `EditorNode3DGizmo::add_collision_triangles` replaces previous meshes instead of adding HOT 1
- RectangleShape2D Differs In-Game
- Godot freezes my entire computer under several different conditions
- Godot application does not focus the window when launched from another client (itch, editor, steam, etc)
- [AnimationTree Optimizer] .blend / .glb animation interpolation error HOT 2
- Local to scene resource unlinks in inherited scenes when changed outside them HOT 4
- Crash when trying to modify Emitting parameter on CPUParticles2D when Signal finished() is linked to queue_free() HOT 1
- Crash when transitioning between scenes with SDFGI enabled and disabled respectively HOT 1
- Web export with gdextension not working on 4.3 HOT 5
- AudioStreamInteractive: Pop and mistiming in seamless transitions
- Version 3.6.rc1 freezing when try to export AAB. APK export works fine.
- Animation panel: moving cursor to Scene view focuses it, preventing further use of Animation keyboard shortcuts HOT 1
- `RichTextLabel.get_line_offset` returns incorrect value for MSDF fonts
- Godot 4.3 Beta 3 - Failed loading resource , wav files and assigning it to export var HOT 2
- AddressSanitizer: heap-buffer-overflow caused by embree buffer padding added using resize() instead of reserve() HOT 1
- Screen will flash white on startup when the resizable window option is turned off
- Errors while reimporting assets on mac HOT 1
- `godot --headless --import` hangs indefinitely the first time it is run HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot.