Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always showing a full file_path in the block UI seems messy #165

Open
cassidyjames opened this issue Jul 26, 2024 · 2 comments
Open

Always showing a full file_path in the block UI seems messy #165

cassidyjames opened this issue Jul 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@cassidyjames
Copy link
Member

What Happened

I was following along with our own Block Coding pong tutorial on YouTube around 2:54, and noticed that file paths get really unwieldy when shown in blocks. I wonder if we could simplify their presentation a bit here.

For example, maybe we can truncate it to just the filename when normally displayed, and only show the full path as a tooltip/when focusing to edit the path.

How to Reproduce

  1. Drag a "load file" block onto the canvas
  2. Drag/copy+paste the path to an asset, like the one in res://addons/block_code/examples/pong_game/assets/wall_hit.ogg
  3. See how wide the block looks!

screenshot

Block Coding Plugin Version

v0.6.1

Godot Engine Version

v4.2.2.stable.flathub [15073afe3]

Operating System

Fedora Silverblue 40

Logs or command-line output

No response

Anything else?

No response

@cassidyjames cassidyjames added the enhancement New feature or request label Jul 26, 2024
@manuq
Copy link
Contributor

manuq commented Jul 29, 2024

What about not having a load sound block at all? Something like:

  • The files in the project are traversed
  • Any ogg is a sound block, using as name a convertion from the file path
  • In the current example res://addons/block_code/examples/pong_game/assets/wall_hit.ogg becomes the sound block "Wall Hit".

@Chevifier
Copy link

What about not having a load sound block at all? Something like:

  • The files in the project are traversed
  • Any ogg is a sound block, using as name a convertion from the file path
  • In the current example res://addons/block_code/examples/pong_game/assets/wall_hit.ogg becomes the sound block "Wall Hit".

Thats actually a neat Idea Drag and Drop the ogg file in the window converting it to an audio block.
So we can still have the load file block but also have a dedicated audio block that searches for all ogg, mp3 etc files independent of there location in the filesystem granted it may be a slow process for larger projects but it could be cached after the first search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants