Announcement

Collapse
No announcement yet.

Dynamic Enums or Custom Drop Downs for the Details Panels

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Dynamic Enums or Custom Drop Downs for the Details Panels

    Currently I am able to make manual enums that I can Use to configure certain Systems, Monsters/Treasure/NPC Types ETC. But the issue is when making modifications to my system these may expand. I wonder if there could be a custom drop down that could be populated dynamically by Customization options with an IDed and Named indexes...

    Like:

    npcType.addItem(0,"Wander");
    npcType.addItem(1,"Patrol");
    npcType.addItem(2,"Stationary");
    npcType.addItem(3,"Ambiant");


    If there is something like that already please let me know.

    Thank you,
    Kevin
    12 CatBlack Studios - One man with a dream, to create amazing things...
    RPG Engine Toolkit: https://www.unrealengine.com/marketp...engine-toolkit
    Auto Terrain Cover V3: https://forums.unrealengine.com/show...ver-V3-Release
    Youtube: https://www.youtube.com/channel/UCuT...VDuzeIeJ6_j1pA
    Facebook: https://www.facebook.com/pages/12-Ca...52913014823124

    #2
    You could use a class pointer and it will show a combo of all classes derived from a particular parent. Or you could use a name property, and use a details customization to have a combo box with certain options.
    Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
    Twitter: @EpicJamesG

    Comment


      #3
      Hm, how would this be doable?
      I'm trying to have a byte which can be set to a number. Depending on this number I want to show a dropdown menu (dynamic enum??) with e.g. numbers from 1 to 'byte-number'. This dropdown list would need to change dynamically when changing the byte.
      This all shall take place in the details panel in the editor (PostEditChangeProperty()...).

      I don't have any ideas so far : s.

      Comment


        #4
        in 4.9, you can expose FDataTableRowHandle and FDataTableCategoryHandle inside DataTable.h

        just change their USTRUCT() to USTRUCT(BlueprintType), then you can use them as an exposed blueprint property, and it will give you a drop down list of all the row names. (the category handle will give you drop down lists of other columns)

        Click image for larger version

Name:	DataTableDropDownCombo.png
Views:	1
Size:	357.6 KB
ID:	1087154

        Comment


          #5
          in 4.9, you can expose FDataTableRowHandle and FDataTableCategoryHandle inside DataTable.h

          just change their USTRUCT() to USTRUCT(BlueprintType), then you can use them as an exposed blueprint property, and it will give you a drop down list of all the row names. (the category handle will give you drop down lists of other columns)

          Wait. How does that work? Can you give a pure C++ example of turning Data Table rows into a drop down picker.

          Comment


            #6
            Originally posted by WiseDragonFilms View Post


            Wait. How does that work? Can you give a pure C++ example of turning Data Table rows into a drop down picker.
            https://forums.unrealengine.com/comm...unctions/page6
            12 CatBlack Studios - One man with a dream, to create amazing things...
            RPG Engine Toolkit: https://www.unrealengine.com/marketp...engine-toolkit
            Auto Terrain Cover V3: https://forums.unrealengine.com/show...ver-V3-Release
            Youtube: https://www.youtube.com/channel/UCuT...VDuzeIeJ6_j1pA
            Facebook: https://www.facebook.com/pages/12-Ca...52913014823124

            Comment

            Working...
            X