#Second Customui

1 messages · Page 1 of 1 (latest)

lofty sphinx
#

Hi guys, so now, i made a "profilMenu" opening when we click on a button but i wanted to know something : To make it custom, did i need to put it the server_form.json, or create another file ? What should i write in it to modify it ?

obsidian tinsel
#

it can be another file or server_form.json

#

it doesnt really matter

#

but to have custom forms you want to not show the custom form's title or body, etc. inside of the standard vanilla long_form

#

use conditional rendering

lofty sphinx
#

because it is for a profil, so i need to show stats like kills etc..

obsidian tinsel
#

this is what i mean

lofty sphinx
obsidian tinsel
#

thats just showing you how to use conditional rendering

#

it can be done with any file really

lofty sphinx
#

oh okay

obsidian tinsel
#

you'll want to do it in server_form.json

lofty sphinx
#

but then, how did i say that this custom is for the profilMenu ?

obsidian tinsel
#

you gotta add a server form factory

#

or a new form in the default long form so it renders

lofty sphinx
#

so difficult

obsidian tinsel
lofty sphinx
#

"@server_form.our_long_form_panel" but what does that mean ?

#

and, when did I mention the form name ?

obsidian tinsel
#

@server_form is the namespace of the file

#

.our_long_form_panel is the element being referenced

#

which exists in that namespae

lofty sphinx
#

yes but i never mention the name of the form in the json ?

obsidian tinsel
lofty sphinx
#

yes ofc

obsidian tinsel
#

you've got a long way to go

#

dont start trying to use server forms without any json ui knowledge

lofty sphinx
zinc rivet
lofty sphinx
# zinc rivet Create ur custom form in another file and then define it in the server_form its ...
       {
                            "form_button@common_buttons.light_text_button": {
                                "$pressed_button_name": "button.form_button_click",
                                "anchor_from": "top_left",
                                "anchor_to": "top_left",
                                "size": "$button_size",
                                "$button_text": "#null",
                                "$button_text_binding_type": "collection",
                                "$button_text_grid_collection_name": "form_buttons",
                                "$button_text_max_size": ["100%", 20],
                                "bindings": [
                                    {
                                        "binding_type": "collection_details",
                                        "binding_collection_name": "form_buttons"
                                    }
                                ]
                            }
                        }
                    ]
                }
            }
        ]
    }
}

this is the end of my server_form file, where should i put the comma, and tell me what i need to write ? (for the custom form, it is written in : form/profilMenu/profilMenu.json

zinc rivet
lofty sphinx
#

mention me when u can @zinc rivet

lofty sphinx
#

@zinc rivet ?

weary vine
#

What time zone you are @lofty sphinx? I can help you and show some of my work, so you will see it and have clearer view how to do it

weary vine
#

Amazing, I will have time in like 30 min, do you want quick meet to showcase you this?

lofty sphinx