- Added new buttons: - Flatten tool mode (not implemented) - Up / down toggle modifier Switches between moving terrain up or down - Connected toggle modifier Used to cause corners to be disconnected - Added ModifierToggleButton script Inversed by holding modifier button - "Corner" tool shape button switches to single tile texture in paint mode - Modify editing code to use modifier buttonsmain
parent
5541872d20
commit
be477542b8
17 changed files with 312 additions and 34 deletions
After Width: | Height: | Size: 139 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://c5j5v62f7p6qt" |
||||||
|
path="res://.godot/imported/connected_off.png-9d4314286cb3dda8aeb51987f4722c68.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://assets/textures/terrain/editing/connected_off.png" |
||||||
|
dest_files=["res://.godot/imported/connected_off.png-9d4314286cb3dda8aeb51987f4722c68.ctex"] |
||||||
|
|
||||||
|
[params] |
||||||
|
|
||||||
|
compress/mode=0 |
||||||
|
compress/high_quality=false |
||||||
|
compress/lossy_quality=0.7 |
||||||
|
compress/hdr_compression=1 |
||||||
|
compress/normal_map=0 |
||||||
|
compress/channel_pack=0 |
||||||
|
mipmaps/generate=false |
||||||
|
mipmaps/limit=-1 |
||||||
|
roughness/mode=0 |
||||||
|
roughness/src_normal="" |
||||||
|
process/fix_alpha_border=true |
||||||
|
process/premult_alpha=false |
||||||
|
process/normal_map_invert_y=false |
||||||
|
process/hdr_as_srgb=false |
||||||
|
process/hdr_clamp_exposure=false |
||||||
|
process/size_limit=0 |
||||||
|
detect_3d/compress_to=1 |
After Width: | Height: | Size: 133 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://dsbovbbrtuv8f" |
||||||
|
path="res://.godot/imported/connected_on.png-d142e6ffef231eda75d9207321617fb4.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://assets/textures/terrain/editing/connected_on.png" |
||||||
|
dest_files=["res://.godot/imported/connected_on.png-d142e6ffef231eda75d9207321617fb4.ctex"] |
||||||
|
|
||||||
|
[params] |
||||||
|
|
||||||
|
compress/mode=0 |
||||||
|
compress/high_quality=false |
||||||
|
compress/lossy_quality=0.7 |
||||||
|
compress/hdr_compression=1 |
||||||
|
compress/normal_map=0 |
||||||
|
compress/channel_pack=0 |
||||||
|
mipmaps/generate=false |
||||||
|
mipmaps/limit=-1 |
||||||
|
roughness/mode=0 |
||||||
|
roughness/src_normal="" |
||||||
|
process/fix_alpha_border=true |
||||||
|
process/premult_alpha=false |
||||||
|
process/normal_map_invert_y=false |
||||||
|
process/hdr_as_srgb=false |
||||||
|
process/hdr_clamp_exposure=false |
||||||
|
process/size_limit=0 |
||||||
|
detect_3d/compress_to=1 |
After Width: | Height: | Size: 124 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://dc0q2xn2cgcjw" |
||||||
|
path="res://.godot/imported/corner_paint.png-d3f97054fffda3dc2896d8416d2182b9.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://assets/textures/terrain/editing/corner_paint.png" |
||||||
|
dest_files=["res://.godot/imported/corner_paint.png-d3f97054fffda3dc2896d8416d2182b9.ctex"] |
||||||
|
|
||||||
|
[params] |
||||||
|
|
||||||
|
compress/mode=0 |
||||||
|
compress/high_quality=false |
||||||
|
compress/lossy_quality=0.7 |
||||||
|
compress/hdr_compression=1 |
||||||
|
compress/normal_map=0 |
||||||
|
compress/channel_pack=0 |
||||||
|
mipmaps/generate=false |
||||||
|
mipmaps/limit=-1 |
||||||
|
roughness/mode=0 |
||||||
|
roughness/src_normal="" |
||||||
|
process/fix_alpha_border=true |
||||||
|
process/premult_alpha=false |
||||||
|
process/normal_map_invert_y=false |
||||||
|
process/hdr_as_srgb=false |
||||||
|
process/hdr_clamp_exposure=false |
||||||
|
process/size_limit=0 |
||||||
|
detect_3d/compress_to=1 |
After Width: | Height: | Size: 113 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://bcb8w33ns56go" |
||||||
|
path="res://.godot/imported/flatten.png-f2f312eef574983bc85e28cb99e262b2.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://assets/textures/terrain/editing/flatten.png" |
||||||
|
dest_files=["res://.godot/imported/flatten.png-f2f312eef574983bc85e28cb99e262b2.ctex"] |
||||||
|
|
||||||
|
[params] |
||||||
|
|
||||||
|
compress/mode=0 |
||||||
|
compress/high_quality=false |
||||||
|
compress/lossy_quality=0.7 |
||||||
|
compress/hdr_compression=1 |
||||||
|
compress/normal_map=0 |
||||||
|
compress/channel_pack=0 |
||||||
|
mipmaps/generate=false |
||||||
|
mipmaps/limit=-1 |
||||||
|
roughness/mode=0 |
||||||
|
roughness/src_normal="" |
||||||
|
process/fix_alpha_border=true |
||||||
|
process/premult_alpha=false |
||||||
|
process/normal_map_invert_y=false |
||||||
|
process/hdr_as_srgb=false |
||||||
|
process/hdr_clamp_exposure=false |
||||||
|
process/size_limit=0 |
||||||
|
detect_3d/compress_to=1 |
After Width: | Height: | Size: 135 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://covyafauwthij" |
||||||
|
path="res://.godot/imported/height_down.png-47ae6eeb5feb0ddf7bd952befb4351fe.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://assets/textures/terrain/editing/height_down.png" |
||||||
|
dest_files=["res://.godot/imported/height_down.png-47ae6eeb5feb0ddf7bd952befb4351fe.ctex"] |
||||||
|
|
||||||
|
[params] |
||||||
|
|
||||||
|
compress/mode=0 |
||||||
|
compress/high_quality=false |
||||||
|
compress/lossy_quality=0.7 |
||||||
|
compress/hdr_compression=1 |
||||||
|
compress/normal_map=0 |
||||||
|
compress/channel_pack=0 |
||||||
|
mipmaps/generate=false |
||||||
|
mipmaps/limit=-1 |
||||||
|
roughness/mode=0 |
||||||
|
roughness/src_normal="" |
||||||
|
process/fix_alpha_border=true |
||||||
|
process/premult_alpha=false |
||||||
|
process/normal_map_invert_y=false |
||||||
|
process/hdr_as_srgb=false |
||||||
|
process/hdr_clamp_exposure=false |
||||||
|
process/size_limit=0 |
||||||
|
detect_3d/compress_to=1 |
After Width: | Height: | Size: 149 B |
@ -0,0 +1,34 @@ |
|||||||
|
[remap] |
||||||
|
|
||||||
|
importer="texture" |
||||||
|
type="CompressedTexture2D" |
||||||
|
uid="uid://dxbfohim13ti1" |
||||||
|
path="res://.godot/imported/height_up.png-d84180c0cff17a8285e5e5cb8f54e819.ctex" |
||||||
|
metadata={ |
||||||
|
"vram_texture": false |
||||||
|
} |
||||||
|
|
||||||
|
[deps] |
||||||
|
|
||||||
|
source_file="res://assets/textures/terrain/editing/height_up.png" |
||||||
|
dest_files=["res://.godot/imported/height_up.png-d84180c0cff17a8285e5e5cb8f54e819.ctex"] |
||||||
|
|
||||||
|
[params] |
||||||
|
|
||||||
|
compress/mode=0 |
||||||
|
compress/high_quality=false |
||||||
|
compress/lossy_quality=0.7 |
||||||
|
compress/hdr_compression=1 |
||||||
|
compress/normal_map=0 |
||||||
|
compress/channel_pack=0 |
||||||
|
mipmaps/generate=false |
||||||
|
mipmaps/limit=-1 |
||||||
|
roughness/mode=0 |
||||||
|
roughness/src_normal="" |
||||||
|
process/fix_alpha_border=true |
||||||
|
process/premult_alpha=false |
||||||
|
process/normal_map_invert_y=false |
||||||
|
process/hdr_as_srgb=false |
||||||
|
process/hdr_clamp_exposure=false |
||||||
|
process/size_limit=0 |
||||||
|
detect_3d/compress_to=1 |
@ -0,0 +1,17 @@ |
|||||||
|
[Tool] |
||||||
|
public partial class ModifierToggleButton : Button |
||||||
|
{ |
||||||
|
[Export] public Texture2D OnTexture { get; set; } |
||||||
|
[Export] public Texture2D OffTexture { get; set; } |
||||||
|
[Export] public Key ModifierKey { get; set; } |
||||||
|
|
||||||
|
|
||||||
|
public override void _Ready() |
||||||
|
=> Toggled += (on) => Icon = on ? OnTexture : OffTexture; |
||||||
|
|
||||||
|
public override void _Input(InputEvent ev) |
||||||
|
{ |
||||||
|
if ((ev is InputEventKey { Keycode: var key }) && (key == ModifierKey)) |
||||||
|
ButtonPressed = !ButtonPressed; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue