Multiple UI Animations in the Godot Engine

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

Комментарии • 22

  • @skaruts
    @skaruts 3 месяца назад +8

    Just a little sidenote, your properties are already strings, so the *str()* function is redundant. You can enforce the type with the array type *"Array[String]",* or by doing *"for property:String in properties"* in your loop. The *str()* function doesn't make sure the original value is a string, it just converts whatever it is into whatever string it can be converted to.

  • @Morphinometr
    @Morphinometr 3 месяца назад +3

    Looks like perfect case for custom resources for tween properties. You can create and store this settings and apply them with one click to different instances.

  • @minuteman1043
    @minuteman1043 3 месяца назад +7

    The next step would be to make the hover settings a resource to keep your animations synced and organized across the UI.

    • @AnnualSeveral
      @AnnualSeveral 3 месяца назад

      Can you elaborate a bit on this please, maybe an example. 🙏

    • @stayathomedev
      @stayathomedev  3 месяца назад +2

      Can do a video on that! No problem

    • @minuteman1043
      @minuteman1043 3 месяца назад +3

      ​@@AnnualSeveral"Resource is the base class for all Godot-specific resource types, serving primarily as data containers." From the docs.
      An Animation, Curve, Gradient, Material, Mesh, Shader, Scene... All of these are resources.
      With a custom resource you can define the data and systems yourself, then save and load them across your project like you would a texture or sound. The uses are nearly endless.
      In this case, you could create a single "animation_settings" resource and load it in your "animation_components." Then, when you change that one resource in your project files, the change will be synced across your main menu, settings menu, load/save, ect.

  • @LevantinLynx
    @LevantinLynx 3 месяца назад +2

    You are an absolute treasure trove for tutorials and really understanding what is being done and why. Thank you so much and keep up the outstanding work. 👍

  • @MuffinMan_Ken
    @MuffinMan_Ken 3 месяца назад +2

    I believe the resized signal will be sent if the parent control changes your button's size, so rather than using deferred calls and such, you can subscribe to that event and then re-run your setup. This will make your stuff work properly if the GUI itself can resize

    • @eturnerx
      @eturnerx 3 месяца назад

      Can confirm. I use: target.resized.connect(on_resize)

  • @asadityas67
    @asadityas67 3 месяца назад

    I love your work, Definitely implementing this in our Supply Chain Management RPG.

  • @AnnualSeveral
    @AnnualSeveral 3 месяца назад

    This is fantastic. I love the use of components, explanations, and everything!
    Id love to see some design patterns if you haven't covered them already.

  • @ThantiK
    @ThantiK 3 месяца назад

    Hell yeah, this is awesome stuff!

  • @generrosity
    @generrosity 3 месяца назад +1

    random thought - you could show you can add a custom icon to your custom components with @icon("res://path/to/optional/icon.svg")

  • @morganp7238
    @morganp7238 3 месяца назад +3

    Do not use get_tree().create_tween() use self.create_tween() or the tweens will not work when get_tree().paused = false

  • @atticuslv1399
    @atticuslv1399 Месяц назад

    can you make a video of how to make a expandable panel?

  • @MuffinMan_Ken
    @MuffinMan_Ken 3 месяца назад

    Why would properties ever not be a string? Rather than declaring it as just an Array, you could declare it as Array[String] and then you'd know it would always be a string.

  • @maykefernandesdossantos7374
    @maykefernandesdossantos7374 3 месяца назад

    love the engine but the fact that you have to code things that at this point are common for game dev is kinda annoying 😅, is there a plugin to do most of the heavy lift?

    • @stayathomedev
      @stayathomedev  3 месяца назад

      Once this is coded it really makes everything super quick. I'm not sure there's a plugin but this may turn into one.

    • @skaruts
      @skaruts 3 месяца назад +1

      Godot already does most of the heavy lifting. Imagine having to write the tween and GUI code yourself, and the transforms, and the rendering...
      Heck, I've been building an app with some text/code editing functionalities, and I barely had to make an effort to get syntax highlighting going in it, as well as undo/redo.

    • @maykefernandesdossantos7374
      @maykefernandesdossantos7374 3 месяца назад

      ​@@skaruts I will give it a try, maybe u are right 👍 I will be playing with ui soon 😂