#JSON-UI General

1 messages · Page 8 of 1

mystic heart
#

Are you sure that is the only formatting code in the string you're detecting? Where are you getting the text from?

jaunty fox
#

I have a simple animation to fade out alpha value:

  "anim_notif_text_alpha_out": {
    "anim_type": "alpha",
    "easing": "in_expo",
    "duration": 3,
    "from": 1.0,
    "to": 0
  },

But whenever I try to use it

"alpha":"@hud.anim_notif_text_alpha_out",

Absolutely nothing changes.
If it helps the alpha works perfectly normally if I set it to a number like 0 or 1

stiff urchin
#

someone help me center

mystic heart
raven wigeon
#

On the hud.

#

From the chat

mystic heart
raven wigeon
mystic heart
#

I would just use (#text - 'Travis Jenkins') = #text if you aren't sure of the messages formatting

raven wigeon
#

As §lTravis Jenkins

#

Exactly.

raven wigeon
mystic heart
raven wigeon
#

Thanks

mystic heart
# raven wigeon Thanks

Yeah you're right it doesn't work for the chat. I wonder if it's using the $chat_font_type variable instead? Gonna try a few more things

#

O wait I may have found something... wtf

#

@raven wigeon ok so it looks like it's somehow 3 characters. this works "source_property_name": "('%.17s' * #text = '§lTravis Jenkins')",

#

don't ask me why lol. Maybe when you do formatting for the chat it adds an extra character to denote that it has special formatting or something

mystic heart
#

np

restive crag
#

How do I add a white underline below text?

#

Is there a property for that?

fathom bluff
restive crag
fathom bluff
#

Its quite easy actually

opal aurora
opal aurora
#

It will use 100% size of text element

#

To make it work properly, make sure the text element size is [ "default", "default" ] and only on one row

jaunty fox
#

I have a simple animation to fade out alpha value:

  "anim_notif_text_alpha_out": {
    "anim_type": "alpha",
    "easing": "in_expo",
    "duration": 3,
    "from": 1.0,
    "to": 0
  },

But whenever I try to use it

"alpha":"@hud.anim_notif_text_alpha_out",

Absolutely nothing changes.
If it helps the alpha works perfectly normally if I set it to a number like 0 or 1

fathom bluff
restive crag
jaunty fox
fathom bluff
#

"anims": [ "@namespace.anims_element" ]

#

@jaunty fox ^

restive crag
#

Ok

jaunty fox
fathom bluff
jaunty fox
fathom bluff
restive crag
restive crag
jaunty fox
restive crag
#

rejoin*

jaunty fox
#

Yeah

jaunty fox
# fathom bluff Weird, this is the correct syntax for animations

Could it be an error somewhere else?

"notification_text": {
"type": "label",
"text": "($atext - 'notif:')",
"anims":[
"@hud.anim_notif_text_alpha_out"
],
"offset":[120,5],
"font_size": "medium",
"anchor_from": "middle",
"anchor_to": "middle",
"text_alignment":"left"
}

This is the label its attached to

fathom bluff
#

By the way does your label element show up correctly in the hud?

jaunty fox
restive crag
jaunty fox
restive crag
jaunty fox
#

oh wait

#

sorry one sec I didnt realize that was alpha

fathom bluff
#

lmao

#

Without namespace and with namespace are the same

jaunty fox
#

Didnt change anything

jaunty fox
restive crag
#

Hmmm

restive crag
fathom bluff
# restive crag I gotit from a doc

First of all,No one ever use alpha to include an anims because it doesn't even work. Ask any JSON UI creator like ambro or TLGM.

Second of all, calling an element does not require namespace if that element is in the same file as this current one.

EDIT: ignore the first one

jaunty fox
#

Bro I was using alpha because the official samples do it somehow

jaunty fox
#

Official actionbar does it

  "hud_actionbar_text": {
    "type": "image",
    "size": [ "100%c + 12px", "100%c + 5px" ],
    "offset": [ 0, "50%-68px" ],
    "texture": "textures/ui/hud_tip_text_background",
    "alpha": "@hud.anim_actionbar_text_background_alpha_out",
    "controls": [
      {
        "actionbar_message": {
          "type": "label",
          "anchor_from": "center",
          "anchor_to": "center",
          "color": "$tool_tip_text",
          "layer": 31,
          "text": "$actionbar_text",
          "localize": false,
          "alpha": "@hud.anim_actionbar_text_alpha_out"
        }
      }
    ]
  },
#

Can't trust it though ig

fathom bluff
jaunty fox
#

Yeah I was copying and it didnt work so Im not gonna touch that until I understand wtf Im doing

jaunty fox
#

Is there any other steps to declaring an animation that I haven't explicitly said I've done?

fathom bluff
restive crag
fathom bluff
opal aurora
#

if the animated panel was inside a factory, animations can be updated and replayed at anytime as game wanted

#

if not inside factory, anims will play only once

jaunty fox
#

Yeah I still don't know what the problem with my thing is

acoustic ivy
#

how do you control separatly server_form buttons with collection_index?

opal aurora
#

you can also make animations loop-able, or manually trigger-able with buttons

opal aurora
#

maybe a lot of collection panels with same collection but different visibility bindings

acoustic ivy
restive crag
#

@opal aurora didn't seem to work?

            {
                "label_offset_panel": {
                    "type": "panel",
                    "size": ["100%", "100%c"],
                    "controls": [{
                        "main_label": {
                            "type": "label",
                            "offset": [2,2],
                            "size": ["default", "default"],
                            "anchor_from": "center",
                            "anchor_to": "center",
                            "text_alignment": "center",
                            "font_size": "large",
                            "text": "#form_text",
                            "font_type": "MinecraftTen",

                            "bindings": [{
                                "binding_name": "#title_text"
                            },
                                {
                                    "binding_type": "view",
                                    "source_property_name": "(not ((#title_text - 'Abilities')) = #title_text)",
                                    "target_property_name": "#visible"
                                }],

                            "controls": [{
                                "underline_image": {
                                    "type": "image",
                                    "texture": "textures/ui/white_background",
                                    "size": ["100%", "20%"],
                                    "offset": [0, 10],
                                    "anchor_from": "bottom_middle",
                                    "anchor_to": "bottom_middle"
                                }
                            }]
                        }
                    }]
                }
            },
#

It doesn't show the underline

jaunty fox
#

@fathom bluff I think I figured it out, crazy mixture of stupidity in my past code and now I gotta relearn some things but basically I had it mixed in with the Title text and was repeatedly calling that restarting the anim rapidly

fathom bluff
restive crag
opal aurora
opal aurora
fathom bluff
opal aurora
fathom bluff
fathom bluff
opal aurora
#

example of an underline control (from ui_common.json):

#
{
  "underline": {
    "type": "image",
    "size": [ "100%", 1 ],
    "$texture|default": "textures/ui/underline",
    "texture": "$texture",
    "alpha": 0.6,
    "tiled": "x",
    "anchor_from": "bottom_left",
    "anchor_to": "bottom_left"
  }
}
opal aurora
restive crag
opal aurora
#

try using the vanilla textures/ui/underline or textures/ui/White

restive crag
restive crag
jaunty fox
#

Why does a binding like this not function at all

"bindings":[
{
"binding_name":"(not ($atext = 'a'))",
"binding_name_override":"#visible"
}
],

I seriously do not understand the point of bindings or their function at all considering this does nothing

restive crag
#

Also I think variables and bindings can work together.?

jaunty fox
restive crag
#

Bindings and Variables do not work together, you need to do conditional rendering stuff.

restive crag
#

#art-and-modeling

warm prawn
#

Ha okey

mystic heart
#

Variables work in bindings, but bindings do not work in variables. Though variables will only work (in most cases) in bindings if they are accompanied by a valid binding in the same equation. An easy way to do this is set a property bag binding to a variable value and use that in the equation. Though @jaunty fox in your case, you can just use:
"visible": "(not ($atext = 'a'))"
You don't need a binding since you can use the parameter directly.

mystic heart
restive crag
#

Does F5 have some not-hardcoded bindings that could be use in different screens?

normal moat
#

nope

restive crag
normal moat
#

it is hardcoded

restive crag
normal moat
#

Yeah of course, It is hardcoded to settings and f5 button on pc

agile shale
#

Im trying to achive something allows me to change the server ui to a layout that I want, depending on the form title text. Ive done this with a chest before and it worked. Im trying to apply this on the form ui now but Im having some trzbbles with that.
Any advice?

//code above
  "long_form@common_dialogs.main_panel_no_buttons": {
    "$title_panel": "common_dialogs.standard_title_label",
    "$title_size": [ "100% - 14px", 10 ],
    "size": [225, 200],
    "$text_name|default": "#title_text",
    "$title_text_binding_type": "none",
    "$child_control|default": "server_form.long_form_panel",
    "layer": 2,
    "variables":[
      {
        "requires":"#title_text = 'Test'",
        "$child_control": "chest.charger_chest_root_panel"
      },
      {
        "requires":"#title_text = 'new'",
        "$child_control": "furnace.furnace_panel"
      }
    ]
  },
//code below

my problem is that it displays allways the last variable in the chain
And I have no idea why it does that

agile shale
#

oh... okay then :/
someone was quicker then me 😦
Oki thanks

normal moat
#

Also note that bindings never work inside variables and variables array.

agile shale
#

aight

agile shale
#

Im trying to add multiple form layouts, am I doing this wrong?
(not (#title_text = 'nav_compass') or (#title_text = 'bedwars'))
Thats the vanilla form
The problem is in the bedwars form
When I open it, it will be a form in a form
Whats wrong with it?

hexed briar
#

weird that legacy texture is still there

odd wharf
#

is the file in which this is coded hardcoded? Id like to remove the enchantment description and have it only show the name

dusty ether
#

try looking in hud_screen

#

I found some references to "item" but am not sure if they may help your case, but testing will

#

or reference "hotbar"

odd wharf
odd wharf
#

wait does #item_text mean its hardcoded

mystic heart
mystic heart
#

oh wait I don't know if that hides enchants actually

odd wharf
#

it doesn't

#

just checked

mystic heart
#

ah ok

#

Lemme checked the code where I removed it

#

@odd wharf Mine wasn't for removing enchant text, but other stuff. The only way I can think of to remove the enchants without the code getting really messy would be to surround the name of the item with a bunch of invisible characters, such as §z§z§z§z§z<item name>§z§z§z§z§z, and then transforming the item text with:
('%.20s' * $text_binding)
Unless you have a really long name, it should cut off everything after the item name.

#

Actually it'd probably be better to only put the invis characters after the item name, like <item name>§z§z§z§z§z§z§z§z§z§z>. Gives you more space to work with.

odd wharf
mystic heart
odd wharf
mystic heart
restive crag
#

What element is this in inventory screen?

lament kraken
#

i need help

nimble jungle
odd wharf
mystic heart
cunning escarp
#

would this be the right place for .lang file issues?

undone marsh
unique swan
#

Hello

#

How can I add a custom button to my json file, so is there a code for the custom button?

hard patrol
#

Don't promote your question/help forum. People will eventually come by. Have patience, please. The people around here has other stuff they need to do.

earnest wind
#

Sorry

#

Ok

restive crag
hexed briar
#

item_text something

restive crag
#

Oh ok, found it

agile shale
#

hey, here is a little general question
Ive been making a UI, which works fine and I want it to be like that...
but there is one problem
Its like my biggest enemy at the moment...
Its gui scale
When people use gui scale 1
They will see my UI in a way too big size
is there a way to display my ui in gui scale 1 or 2 exactly like in scale 0
or is there any other good solution to solve my problem:(

normal moat
#

Use percentages avoid numbers in size, offset etc., UI changes itself if you use percentages.

agile shale
#

aight
Ill try that
Thanks
I always thought that % is the percentage of the parented panel

earnest wind
#

Where can I find the jsons of the blocks?

normal moat
agile shale
#

hard coded my guy

earnest wind
agile shale
#

its hard coded

restive crag
#

Why would they make json ui data-driven then no documentations like wth

earnest wind
agile shale
#

you cant

normal moat
#

you cant get them bro

#

#1067876857103536159

cunning helm
#

anyone know how I can "link" a button I created to an existing interface?
Been stuck for ages

hexed briar
#

link what

agile shale
#

I think he made an UI and he want the button to open his ui

hexed briar
#

toggle with bindings.

cunning helm
#

Even through reading the doc people made

agile shale
#

use toggles
Its not really an "Opening the UI thing" but it displays it as you want them

#

its a work arround

cunning helm
#

okay

#

Because I was trying to figure out with the TEST button

#

but I will try your thing

agile shale
restive crag
agile shale
#

ah right

#

nvm then

earnest wind
#

I'm trying to find the json file of shulker

agile shale
#

for what?

#

like what do ya wanna do with it

restive crag
earnest wind
agile shale
#

do ya wanna get a block hitbox for your entity? or what are you trying to do?

earnest wind
#

it is the only block that opens the inventory when clicked

#

shulker_box

agile shale
#

you mean like a barrel or the chest?

earnest wind
#

things come out when broken

agile shale
#

ah thats what u mean

hexed briar
#

if it about blocks, go #1067876857103536159

earnest wind
#

All items fall to the ground when broken

agile shale
#

ye ask in blocks
I dont think thats possible tho

cunning helm
hexed briar
#

uh no

cunning helm
#

ah

hexed briar
#

Try to look it around #old-json-ui with search feature thing

#

you may able to find it.

#

It's not complicated, it's just hard to explain.

restive crag
#

Search feature thing 😱

hexed briar
#

atleast for me even though the code looks simple

agile shale
#

I really dont like these new chat group things of discord
They seems so unorganised

hexed briar
#

forums?

agile shale
#

ye these things

#

a chat like this is way more organised

hexed briar
#

well the change was made after #1019665628946247761 was deem successful experiment.

#

the experiment was trying to get people to use forums as like their own questions and chat along with it

#

that's why every add-ons now has forums, it was replacement to that

agile shale
#

yeah...
still
I liked it better before
Im just happy that UI has still a chat u know xD

hexed briar
#

every forums has its own general chat.

#

you should definitely see ones in the pinned post on every fourms

agile shale
#

I see yeah
ok
I have to get used to that

cunning helm
agile shale
#

so you want to trigger your UI using a toggle is that correct?

vital edge
#

best UI ever the scroll is very proportionally manageable

odd wharf
#

is there a way to make an element in the hud screen adjust transparency with the hud opacity setting?

#

*and play the animation the makes it slowly disapear whislt opening the inventory or some other container

opal aurora
#

Why not make them scrollable instead of sticking at the top of that

restive crag
#

I made a title based form, but how can i make the title invisible?

restive crag
#

Nvm found a way

jolly pagoda
#

How do i go about changing the duration that the tooltip will appear on screen

timber harness
#

how can i use a lang in json ui

#

item lang file

topaz stone
#

can you use bindings for a texture?

"image": {
  "type": "image",
  "texture": "#texture",
  "bindings": [
    {
      "binding_type": "view",
      "source_property_name": "(('textures/') + (#text))",
      "target_property_name": "#texture"
    }
  ]
}
topaz stone
median spoke
topaz stone
#

idk

median spoke
topaz stone
#

yea

#

but im 100% sure its the right texture

median spoke
#

I once had a problem like this, in my case I forgot to include a / in the actual text. Maybe it's something like that for you?

topaz stone
#

btw thanks for the help lmao

median spoke
topaz stone
#

thanks

median spoke
#

Yay!

topaz stone
#

also one more question lol

#

how would you edit a string but only if something is met

#

like only remove the first couple characters if the text has a string in it

#

because they both need a different "target_property_name"

median spoke
#

I don't know sorry

topaz stone
#

oh all good

#

good night

median spoke
#

You too

still sundial
restive crag
#

Is there a way to override all elements in hud and only show specific one?

normal moat
#

modifications

restive crag
normal moat
#
"hud_title_text": {
    "ignored": true
}
```I didn't understand what you mean by override.
restive crag
#

Example when you like open a server form, it only shows the server form, not the hud screen.

normal moat
restive crag
#

Uhh

#

How do I explain properly

normal moat
#

if you want to not show the display, just render a black image

restive crag
#

I dont want that

normal moat
restive crag
#

I only show a panel

normal moat
#

then why you said server form

restive crag
normal moat
#

they are different screens

#

One way is to have a toggle that shows your panel and hides all the other elements

normal moat
#

add your element to hud_content and add bindings to your element and root panel

#

it's very easy

restive crag
#

Oh ok

#

I just toggle the root panel?

quasi acorn
#

What's the best way to show the xp bar in creative?

normal moat
quasi acorn
#

doesn't work, too bad

normal moat
#

ahh

quasi acorn
#

What variable should you replace #exp_progress with to get a specific score?

unique swan
#

can you send me the json file of the scrollbar?

opal aurora
#

try this (code for 1.20.10 or newer):

#
{
  "exp_progress_bar_and_hotbar/resizing_hotbar_no_xp_bar": {
    "ignored": true
  },

  "exp_progress_bar_and_hotbar/resizing_xp_bar_with_hotbar": {
    "bindings": [
      {
        "binding_name": "#show_survival_ui"
      },
      {
        "binding_name": "#is_creative_mode"
      },
      {
        "binding_type": "view",
        "source_property_name": "(#show_survival_ui or #is_creative_mode)",
        "target_property_name": "#visible"
      }
    ]
  }
}
#

it should hide hotbar correctly if in spectator mode but the xp bar is still visible in creative mode, that's why the "bindings" is a bit complex

normal moat
#

i guess im outdated xd

quasi acorn
#

other question:
How does #exp_progress work?
I don't understand where it's defined and what values it returns

normal moat
quasi acorn
#

and create a custom exp system?

normal moat
#

Yeah, if we set a max value and the value is from 0 to max value, it can be used as a percentage for the bar using clip ratio.

quasi acorn
#

thank you very much for the info!

#

though this doesn't work (I get a full xp bar)
is it due to the binding type being wrong?

    "full_progress_bar": {
        "type": "image",
        "texture": "textures/ui/experiencebarfull",
        "clip_direction": "left",
        "clip_pixelperfect": false,
        "$my_exp_progress": 0.5,
        "bindings": [
            {
                "binding_name": "$my_exp_progress",
                "binding_name_override": "#clip_ratio",
                "binding_type": "global"
            }
        ]
    },```
normal moat
#

well you have to get a value first

quasi acorn
opal aurora
normal moat
#

#1139545952609374218 message

opal aurora
#

if you want to clip specific ratio, use "clip_ratio": <float>

#

(no bindings)

quasi acorn
normal moat
#

okay, np

quasi acorn
#
    "full_progress_bar": {
        "type": "image",
        "texture": "textures/ui/experiencebarfull",
        "clip_direction": "left",
        "clip_pixelperfect": false,
        "$my_exp_progress": 0.5,
        "bindings": [
            {
                "source_property_name": "$my_exp_progress",
                "target_property_name": "#clip_ratio",
                "binding_type": "view"
            }
        ]
    }```
From what I understand this should work, but it doesn't
what did I miss?
opal aurora
quasi acorn
opal aurora
#

no "bindings" required (if your case)

quasi acorn
# opal aurora this

I'm planning to change that
would it work if I had an operation in "source_property_name"?

opal aurora
#

missing source_control_name's or other binding_name's

unique swan
#

How can I write on the button like this?

quasi acorn
edgy nacelle
#

@normal moat can we talk in dm i want to talk about something

quasi acorn
#

@opal aurora I got it to work by heavily inspiring my self from other stuff I saw in this server, but I still don't get why my previous thing didin't work


        "$exp_max_value": 10.0,
        "bindings": [
          {
            "binding_name": "#objective_sidebar_name",
            "binding_type": "global"
          },
          {
            "binding_name": "#player_score_sidebar",
            "binding_type": "collection",
            "binding_collection_name": "scoreboard_scores"
          },
          {
            "binding_type": "view",
            "source_property_name": "(1 - ((#player_score_sidebar * 1) / $exp_max_value))",
            "target_property_name": "#clip_ratio"
          }
        ]
opal aurora
opal aurora
#

Add "property_bag": { "#float": 1.0 },, then replace all the "1" inside your last "source_property_name" with #float

#

That's to override the output value format from integer to float

quasi acorn
#

as long as I keep "$exp_max_value" a float it seems to detect it

fathom bluff
unique swan
fathom bluff
#

If i remember correctly, the sample file already have it

#

Go read it

unique swan
#

@fathom bluff can you attach the file

topaz stone
normal moat
#

variables array not with bindings

topaz stone
still sundial
#

How can i display scoreboard value on UI? RawText?

normal moat
# still sundial How can i display scoreboard value on UI? RawText?
"label": {
    "type": "label",
    "text": "#score",
    "bindings": [
        {
            "binding_name": "#player_score_sidebar",
            "binding_type": "collection",
            "binding_collection_name": "scoreboard_scores"
        },
        {
            "binding_type": "view",
            "source_property_name": "('§z' + #player_score_sidebar)",
            "target_property_name": "#score"
        }
    ]
}
still sundial
topaz stone
normal moat
#

you can't use bindings in variables

still sundial
topaz stone
unique swan
obsidian crest
unique swan
cunning escarp
#

would anyone know why my .lang file is only renaming one item instead of each item in the list?

cunning escarp
#

i was told to go here-

#

where am I supposed to go?

cunning escarp
earnest wind
#

Hi

#

Is it possible to remove the recipe book panel and button in survival mode?

cunning escarp
#

but otherwise ive got nothin

restive crag
#

Is there something wrong here? I get the ancestry something error thingy like that with $text_button.

    "button_toggle@common_toggles.light_text_toggle": {
        "$toggle_name": "$name",
        "$text_button|default": "",
        "$button_text": "$text_button",
        "$toggle_view_binding_name": "$binding_name",
        "$toggle_size|default": [30, 30],
        "size": "$toggle_size"
    },
opal aurora
#

If yes, but still having error, try adding its "default" value

restive crag
opal aurora
restive crag
#

Oh ok

restive crag
opal aurora
restive crag
#

Ok

restive crag
#

How would I achieve blur effect?

opal aurora
restive crag
opal aurora
#

"bilinear" is also not what you need

opal aurora
restive crag
opal aurora
restive crag
opal aurora
#

example: image [ 16, 16 ] on image panel [ 64, 64 ]

restive crag
#

Ohh OK 👍

unique swan
#

How can I put a space between buttons?

acoustic ivy
#

Then whats the better way

unique swan
#

How can I provide space between buttons?

restive crag
#

Quick reminder for you guys, if you like put any font(example MinecraftTen) in a label and then add text that contains \n, the font is gonna reset to normal font.

normal moat
#

yeah

unique swan
unique swan
opal aurora
hexed briar
#

any .ttf fonts in general.

restive crag
hexed briar
#

you need to create each labels with each offset manually

normal moat
#

yeah

opal aurora
#

those are my ideas, still don't know how they made that possible inside marketplace worlds

broken trail
#

inside marketplace worlds

#

wdym

normal moat
#

he means marketplace worlds have the line break in ttf fonts. i think

broken trail
#

yea I know but where exactly

opal aurora
#

(uh it's just limiting horizontal size)

hexed briar
#

probably both limiting horizontal size and line spacing.

normal moat
lean nexus
#

how do i make a custom image background for my server_form?

#

Like how do i make that background invisible and have a custom one?

cunning helm
#

Do you think it's possible add an icon at the left of the text?

#

Like so

dreamy quarry
#

I want to use chest inventory to display as a crafting table.

#
  "baker_station": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size":[20, "100%c"],
    "layer": 31,
    "collection_name": "container_items",
    "controls" : [
      {"[email protected]_grid_item" : {
        "size" : [ 26 , 26 ],
        "$cell_image_size": [ 26, 26 ],
        "collection_index": 0
      }
      },
      {"[email protected]_grid_item" : {
        "size" : [ 26 , 26 ],
        "$cell_image_size": [ 26, 26 ],
        "collection_index": 1
      }
      },
      {"[email protected]_grid_item" : {
        "size" : [ 26 , 26 ],
        "$cell_image_size": [ 26, 26 ],
        "collection_index": 2
      }
      },
      {"[email protected]_grid_item" : {
        "size" : [ 26 , 26 ],
        "$cell_image_size": [ 26, 26 ],
        "collection_index": 3,
        "enabled": false,
        "$background_images": "common.empty_panel",
        "controls": [
          { "[email protected]_arrow_empty_image": {} },
          {
            "baker_arrow_full_image": {
              "type": "image",
              "layer": 3,
              "texture": "textures/ui/arrow_active",
              "anchor_from": "top_left",
              "anchor_to": "top_left",
              "size": [ 22, 15 ],
              "clip_direction": "left",
              "bindings": [
                {
                  "binding_name": "#want to binding item counts to clip ratio",
                  "binding_name_override": "#clip_ratio",
                  "binding_condition": "always"
                }
              ]
            }
          }
        ]
      }
      }
    ]
  }
#

I want to bind item count to clip_ratio but idk

#

Can someone help X<

acoustic ivy
#

how do i make a server form fit the entire screen

opal aurora
dreamy quarry
#

idk how to get items amount data in here X<

opal aurora
dreamy quarry
fierce cove
acoustic ivy
#

how do i make a server form fit the entire screen

dreamy quarry
dark island
#

@normal moat Hello, I wanted to write to you about a topic.

normal moat
#

stop pinging please

dreamy quarry
#

oh sorry

dark island
#

I downloaded a server_form.json file from youtube and I wanted to add form.body but it wasn't added, what is the problem?

dark island
limber quartzBOT
#
How to ask a good question!

Be specific and include relevant details about the question upfront.
• What are you trying to accomplish?
• If you have code, which part is not working?
• What have you already tried?
• Have you searched the Bedrock Wiki?

dark island
# normal moat ?question

I got a server_form.json file from youtube and added form.body() but it didn't work, what's wrong?

dark island
normal moat
#

nope

dark island
normal moat
#

idk? maybe a problem with script or ui, idk.

dark island
hexed briar
#

bro stop bothering him

dreamy quarry
#

I can't add u It seem you close it

hexed briar
#

jesus christ

dark island
normal moat
#

wth is happening 😂

dark island
restive crag
normal moat
#

?json ui is tough

limber quartzBOT
#
JSON UI is tough!

Welcome to JSON UI!

If you are reading this, there is a good chance that you were inspired by The Hive, Galaxite, or some other addon or server. Welcome! This is the right place to learn about these topics.

To get started in learning JSON UI, we recommend you check out the Wiki first: https://wiki.bedrock.dev/json-ui/json-ui-intro.html.

However, please be aware of these things:

  • JSON UI is much tougher than other addon topics.
  • JSON UI is 100% only documented from vanilla reference and reverse engineering. There are no documentation directly from Mojang.
  • We will not give you step-by-step instructions on how to create UI from Hive/Galaxite.

JSON UI is one of the toughest addon topics, so please be patient. Try and attempt small tasks. Ask concrete, answerable questions. We won't spoon-feed you.

dark island
normal moat
#

i dont do work

dark island
#

then I add the body code to the server_form.json file because I can't add body to my form

#

it can't be added, so it's like there's something missing

dark island
normal moat
#

#form_text

dark island
#
        "[email protected]_panel": {
          "anchor_to": "top_left",
          "anchor_from": "top_left",
          "$show_background": false,
          "size": [
            "100%",
            "100%"
          ],
          "$scrolling_content": "server_form.long_form_scrolling_content",
          "$scroll_size": [
            5,
            "100% - 4px"
          ],
          "$scrolling_pane_size": [
            "100% - 4px",
            "100% - 2px"
          ],
          "$scrolling_pane_offset": [
            2,
            0
          ],
          "$scroll_bar_right_padding_size": [
            0,
            0
          ]
        }
      }
    ]
  },
  "long_form_scrolling_content": {
    "type": "stack_panel",
    "size": [
      "100% - 4px",
      "100%c"
    ],
    "orientation": "vertical",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "controls": [
      {
        "label_offset_panel": {
          "type": "panel",
          "size": [
            "100%",
            "100%c"
          ],
          "controls": [
            {
              "main_label": {
                "type": "label",
                "offset": [
                  2,
                  2
                ],
                "color": "$main_header_text_color",
                "size": [
                  "100%",
                  "default"
                ],
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "text": "#form_text"
              }
            }
          ]
        }
      },``` is that the body?
normal moat
#

yeah

dreamy quarry
#

hello! LeGend

dark island
dreamy quarry
#

I try a lot but failed X<

normal moat
#

someone may answer

dark island
# normal moat idk then

No, I want to add a body, it doesn't work, so "test": { There is a panel named, should I add it to it?

dark island
normal moat
dark island
#

@normal moat So where should I add this?

#

Ohh

normal moat
#

ui folder

dark island
#

I'm not saying that, where should I put it in the server_form.json file

dark island
normal moat
#

wdym by you add it. it's your code and i said what to do. it is very easy

dark island
normal moat
#

put vanilla server_form.json in RP/ui folder

#

If this isn't the problem, then your script is wrong

dark island
#
"long_form_scrolling_content": {
    "type": "stack_panel",
    "size": [
      "100% - 4px",
      "100%c"
    ],
    "orientation": "vertical",
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "controls": [
      {
        "label_offset_panel": {
          "type": "panel",
          "size": [
            "100%",
            "100%c"
          ],
          "controls": [
            {
              "main_label": {
                "type": "label",
                "offset": [
                  2,
                  2
                ],
                "color": "$main_header_text_color",
                "size": [
                  "100%",
                  "default"
                ],
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "text": "#form_text"
              }
            }
          ]
        }
      },
    "long_form": {
        "controls": [
            {
                "default@common_dialogs.main_panel_no_buttons": {
                    "$title_panel": "common_dialogs.standard_title_label",
                    "$title_size": [
                        "100% - 14px",
                        10
                    ],
                    "size": [
                        225,
                        200
                    ],
                    "$text_name": "#title_text",
                    "$title_text_binding_type": "none",
                    "$child_control": "server_form.long_form_panel",
                    "layer": 2,
                    "bindings": [
                        {
                            "binding_type": "global",
                            "binding_name```
dark island
normal moat
dark island
normal moat
#

yes

dark island
normal moat
#

?jsonlint

limber quartzBOT
#
Json Lint

Linting is the ability to validate code as correct, or incorrect. JsonLinter is a website that will point out json-formatting issues like mismatches curly braces for you.

Link: https://jsonlint.com/

normal moat
#

go to the site and check for syntax errors in your own file

dark island
dark island
#

I don't understand how long_form can be wrong

stiff urchin
#

how to create custom boss life bar?

dark island
dark island
#

@normal moat bro the site you posted says there is no error but when i enter the game it kicks me out of the game why?

acoustic ivy
#

how do i make a server form fit the entire screen in every Gui scale modification

unique swan
#

Hi, I want to add 2 forms to my server_form.json file, how can I do it?

cunning helm
plain heath
#

how do I make multiple ui's using action form? like if the title is this than activate this ui and so on

#

maybe someone has an example pack

wintry crater
#

with file used in actionform?

restive crag
wintry crater
#
                      {
                "chest_ui@chest_ui.chest_panel": {
                    "layer": 2,
                    "bindings": [
                        {
                            "binding_name": "#title_text"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(not ((#title_text - '§c§h§e§s§t') = #title_text))",
                            "target_property_name": "#visible"
                        }
                    ]
                }
            }

i still dont understand json ui, how can i makeit visible if the title is "cosmetics"? (this is from Herobrine64)

normal moat
wintry crater
#

uhh what does this code do? '§c§h§e§s§t'

normal moat
#

because the color codes don't appear in text

restive crag
#

How do grid_position works?

normal moat
#

according to grid dimensions

#

If grid dimensions are [2, 2] then, grid positions are -

#

@restive crag

restive crag
normal moat
#

sizes, but no offset and anchors if we take general case

restive crag
normal moat
#

?? $button_text

restive crag
normal moat
#

$button_offset

restive crag
#

Oh ok

last pollen
#

What's the name of these 2?

unique swan
#

How can I put a space between buttons in mcpe?

#

so □ □ like this

#

buttons like this

last pollen
#

uhm

#

not finished

#

sorry

#
"padding": {
    "size": [ 2, 2 ]
}
hexed briar
#

it's pudding

#

actually I don't know anymore

#

both pudding and padding are confusing

#

why not just name it to space

unique swan
#

what i want is just add space to custom button

last pollen
last pollen
hexed briar
cunning helm
#

Not quit sure but I fucked up somewhere lol

#

don't pay attention to the missing textures

unique swan
#

why button can't detect command

#

?

unique swan
#

The buttons are too combined, how can I separate them?

#

buttons too close

acoustic ivy
unique swan
restive crag
#

Is it possible to use multiple view bindings in a one element?

mortal monolith
#

Yes

restive crag
#

OK good to know

mystic heart
restive crag
mystic heart
restive crag
mystic heart
#

I haven't used that button before so I'm not sure if that setup is wrong or right. But you need to take the element which has the defined size, and then wrap that in a panel

restive crag
mystic heart
restive crag
mystic heart
# restive crag You mean the element inside the `long_form_scrolling_content` controls?

I'm not really sure what your setup looks like so I'm not sure what the elements are you're referring to. The wrapping panel is usually not set up for most templates, so you have to make it yourself. You make a panel element and then put the button in the controls. Then instead of using the button in the stack panel/grid, you use the panel you made.

restive crag
mystic heart
last pollen
mortal monolith
#

Hello, how to make a scrolling Panel?

#

I tried but it doesn't work

restive crag
mortal monolith
#

Oh well

nimble mortar
#

how can i do a different inventory screen when the entity has an especific name?

restive crag
#

there's #player_name binding but its hardcoded sadly.

timber harness
#

-can a namespace have more than one screen?
-can a screen controled by a screen?
-can i make conditional rendering based with screen?

hexed briar
timber harness
hexed briar
#

only bindings works for now, don't put ignored or crash I guess

#

and turn off your reply pings

timber harness
timber harness
hexed briar
#

why are you still reply ping

timber harness
#

oh srry that was the last one

timber harness
hexed briar
#

changing child elements in screen element will do.

timber harness
#

aight thx

wintry crater
#

how can i move it here?

restive crag
#

Yes

hexed briar
#

anchor.

wintry crater
#

uhhh where?

restive crag
hexed briar
#

long form element.

wintry crater
#

do i need to rejoin the world to see changes?

hexed briar
#

Obviously, the UI is client-side.

#

expect the requesters like script-api that send packet to show server forms.

restive crag
#

Is there a way to force hidegui without the need to click to a button or anything?

hexed briar
#

well actually yes

#

hide gui is actually bindings and can be to set true/false everytime you press f3 or hide GUI button

hexed briar
#

you can force to hide by I guess using visible or ignored property

#
{
        "binding_name": "#hud_visible",
        "binding_name_override": "#visible",
        "binding_type": "global"
      },```
#

this is also used for hud alpha thing in the game settings.

{
        "binding_name": "#hud_alpha",
        "binding_name_override": "#alpha",
        "binding_type": "global"
      },
      {
        "binding_name": "#hud_propagate_alpha",
        "binding_name_override": "#propagateAlpha",
        "binding_type": "global"
      }```
#

Be warned though, that mobile controls won't go away.

restive crag
hexed briar
#

because it works differently.

#

sure f3/hide gui turns that bindings into true but in the hardcoded side like touch controls wont either go away

timber harness
#
  "main_screen_content": {
    "type": "panel",
    "size": [0, 0],
    "controls": [
        {
          "server_form_factory": {
              "type": "factory",
              "control_ids": {
              "long_form": "@server_form.long_form",
              "custom_form": "@server_form.custom_form"
          }
        }
      }
    ]
  }

how to add more control ids? without interupting

hexed briar
#

your best bet is just make those touch controls texture as invisible

hexed briar
restive crag
#
  "main_screen_content": {
    "type": "panel",
    "size": [0, 0],
    "controls": [
        {
          "server_form_factory": {
              "type": "factory",
              "control_ids": {
              "long_form": "@server_form.long_form",
              "custom_form": "@server_form.custom_form"
          }
        },
          "server_form_factory": {
              "type": "factory",
              "control_ids": {
              "long_form": "@server_form.custom_long_for.m",
              "custom_form": "@server_form.custom_modal_form"
          }        
      }
    ]
  }
hexed briar
#

use condition render with both elements I suppose

timber harness
hexed briar
#

It's not stack panels so no it will not.

timber harness
hexed briar
#

No.

timber harness
#

oh

timber harness
hexed briar
#

Use the modification property I guess??

restive crag
timber harness
timber harness
restive crag
#

I find JSON UI weird cus like not #toggle_state returns true and #toggle_state returns false..

restive crag
#

It's up to your form

timber harness
#

so i add binding that hide the long_form when title is something?

hexed briar
timber harness
#

can i add controls ids with that?

hexed briar
#

Why

timber harness
#

i want custom form

hexed briar
#

you can

timber harness
#

example? and what way?

hexed briar
#

just make it reference to your new elements

#

from there you can add that if you wanted

timber harness
#

ok thx

#

can this just be like this

  "main_screen_content": {
    "controls": [
        {
          "server_form_factory": {
              "type": "factory",
              "control_ids": {
              "long_form": "@server_form.long_form",
              "custom_form": "@server_form.custom_form"
          }
        },
          "server_form_factory": {
              "type": "factory",
              "control_ids": {
              "long_form": "@server_form.custom_long_for.m",
              "custom_form": "@server_form.custom_modal_form"
          }        
      }
    ]
  }
#

or use modifications

timber harness
#

also may i know why it use factory?, can it just be like this instead

  "main_screen_content": {
    "controls": [ { "custom_form1@server_form.custom_long_form": { } }
    ]
  }
timber harness
#

why is this not working?

  "long_form": {
    "modifications": {
      "array_name": "bindings",
      "operation": "insert_back",
      "value": [
        {
          "binding_type": "global",
          "binding_name": "#title_text",
          "binding_name_override": "#text"
        },
        {
          "binding_type": "view",
          "source_property_name": "(not (#text = 'testing'))",
          "target_property_name": "#visible"
        }
      ]
    }
  }
}
#

oh must be an array

cunning helm
#

Do you know the json name of the loading screen?

hexed briar
#

progress_screen.

cunning helm
#

aa thank you

edgy nacelle
#

@warm prawn look at dm

nimble mortar
#

i want horse inventory

gentle hemlock
#

Hello

acoustic ivy
#

how do you change the y size of a server form button?

alpine wyvern
#

does UI only allow you to modify existing menus and is script-api required for new menus?

pine matrix
#

Is there a way to force the new mobile control scheme on players? The this one here

hexed briar
#

nope

#

mobile controls are hardcoded.

pine matrix
#

dang

opal aurora
pine matrix
#

It don’t work for my stuff, as some items I made have the chargeable component, which, when mobile players try to mine with them, just use the item instead.

wintry crater
#

how can i remove the slide animation in server form ui?

restive crag
#

Is there any dialog template that doesn't have close button in vanilla UI files?

indigo bolt
#

Hello

#

I want to talk about a topic are you available (server_form.json information)

digital finchBOT
#
little0959

hello portuguese

#
little0959

Is there a way to force the new mobile control scheme on players? The this one here po português

#
little0959

olá

#
little0959

Parece que você configurou o preenchimento errado em algum lugar. Se colocar todos os botões em um só lugar, parece que o tamanho é inválido (e definido como 0), o que pode acontecer se o tamanho do elemento filho depender do pai e o tamanho do elemento pai depender do filho, o que é inválido. Tente definir o painel de embrulho para um tamanho exato e veja se isso funciona.

last pollen
#

How do you fix this?

young dune
#

do glyphs load like images do? or are they instant?

indigo bolt
#

@normal moat hello i want to talk to you about something

indigo bolt
haughty island
#

Why does my command auto complete for mobile doesn't work now. It used to work in 1.16. I have checked the new chat_screen.json, the button id is still the same

"[email protected]_button": {
     "$button_content": "chat.down_autocomplete",
    "$pressed_button_name": "button.chat_autocomplete"
  },
  "[email protected]_button": {
     "$button_content": "chat.up_autocomplete",
    "$pressed_button_name": "button.chat_autocomplete_back"
  }```
halcyon spear
#

Is there an error? The text won't show on screen, But when put the text in without the panel it sows:```js
"test": {
"type": "panel",
"size": [
"100%",
"100%"
],
"anchor_from": "center",
"anchor_to": "center",
"offset": [
0,
0
],
"controls": [
{
"type": "label",
"text": "hud text",
"anchor_from": "center",
"anchor_to": "center",
"offset": [
-4,
4
]
}
]
},

indigo bolt
#

How can I create a 2nd form in 1 server_form.json file?

indigo bolt
#

@normal moat dm Any chance to have a look?

#

ohh sorry for tagging

normal moat
limber quartzBOT
#
DMs are not ideal

When you ask a question via DM, you are restricting the total number of people who can help you from all potential server members to just one. Asking in the public channels is the best way to get a good, community-sourced answer to your question, allowing other observers to give their input.

While you are certainly welcome to DM with each other, please be aware it is against our rules to send unsolicited DMs requesting help.

indigo bolt
normal moat
#

message requests?

indigo bolt
normal moat
indigo bolt
normal moat
#

wdym?

indigo bolt
#

There is 1 form, I want it to be in the 2nd form

normal moat
#

I didn't get it

#

Do you want to change how the layout or how the form looks?

indigo bolt
normal moat
#

conditional render ig

indigo bolt
normal moat
#

You have to conditional render the form B and O so they don't open at the same time and then have to change the controls of the form O to change the look

indigo bolt
normal moat
#

Do you know JSON UI?

indigo bolt
indigo bolt
normal moat
# indigo bolt yes i understand a little

If you know a little, you should check out vanilla files and see examples across the server to know how UI actually works and then try small things like adding text to screen yourself.

indigo bolt
normal moat
#

uhhbao_comm_dead

restive crag
#

Can we render both long form and custom form at the same time?

#

Yes or No

restive crag
#

Oh that's unfortunate

normal moat
indigo bolt
# normal moat no

bro there is only 1 title based server form in your video I want to use different long form in the world

normal moat
normal moat
hexed briar
#

json-ui

past stirrup
#

OreUI is better imo

#

:>

normal moat
restive crag
hexed briar
past stirrup
hexed briar
#

you have come to the wrong territory

past stirrup
past stirrup
normal moat
#

though ik react

past stirrup
hexed briar
#

this is json-ui territory

#

:trolage:

past stirrup
timber harness
hexed briar
#

the entire forums is #1067869374410657962

past stirrup
#

:<

hexed briar
#

all your base are belong to us

past stirrup
#

Nooo!!

#

wait

#

i don’t have a base

hexed briar
#

oh

restive crag
#

I'm confused why'd they made json-ui data driven then no docs at all

timber harness
#

they say its deprecated

hexed briar
#

If I did research correctly

#

the docs was supposed to be out during ore-ui indev or where the new bedrock ui concept was shown on some E3 or something

#

but instead, it's deprecated and they doesn't seem to put docs anymore

normal moat
#

bcuz of ore ui probably

past stirrup
#

i don’t think they will ever release the docs

#

because they’re replacing it with oreui

normal moat
#

yeah

restive crag
#

hm fair

past stirrup
#

hey at least oreui is more capable and powerful :D

hexed briar
#

bro

past stirrup
timber harness
#

why its more powerful

normal moat
#

react, html, css, js

past stirrup
normal moat
#

more control

past stirrup
#

yeah

#

you can even listen to key presses :>

hexed briar
#

con: performance drip

past stirrup
past stirrup
normal moat
timber harness
past stirrup
hexed briar
restive crag
hexed briar
#

aswell already made a tweet for it

timber harness
past stirrup
past stirrup
#

no

restive crag
#

I think it can pretty much do anything unless they limit it

past stirrup
#

yeah

hexed briar
#

how are they gonna data-driven it

#

that's the question

past stirrup
timber harness
past stirrup
#

js

normal moat
past stirrup
timber harness
#

is oreui html?

hexed briar
#

yeah I bet someone definitely gonna make malicious thing out of it

past stirrup
timber harness
timber harness
past stirrup
restive crag
hexed briar
#

If they run sandbox ingame I swear to god my phone gonna explode

timber harness
#

the way you make ui is so easy

past stirrup
timber harness
#

just add a screengui (screen) and then you can add frame buttons and stuff

normal moat
#

ahh like visual editor?

indigo bolt
#

@normal moat I did as you said

hexed briar
#

roblox is probably beloved because of LUA scriptings and realtime editor.

timber harness
indigo bolt
haughty island
#

Does anyone know why command auto complete button is not working now in my pack that used to work in 1.16

timber harness
#

but roblox ui not use html

restive crag
#

ye

hexed briar
#

yeah, I like lua scripting ngl

#

It looks nicer than js to me

timber harness
#

it doesnt have class

past stirrup
#

👀 scriptapi with lua when?

timber harness
#

imagine minecraft has its own app to make game's modifications

normal moat
haughty island
#

I have this in chat_screen.json for command auto complete. It used to work in 1.16 but now it doesn't

"[email protected]_button": {
     "$button_content": "chat.down_autocomplete",
    "$pressed_button_name": "button.chat_autocomplete"
  },
  "[email protected]_button": {
     "$button_content": "chat.up_autocomplete",
    "$pressed_button_name": "button.chat_autocomplete_back"
  }```
hexed briar
#

I had written lua stuff back probably 10 years ago and probably forgot now

restive crag
hexed briar
#

but js is uh, I don't know

#

no comment

haughty island
#

Uh

timber harness
past stirrup
indigo bolt
normal moat
normal moat
haughty island
#

I did

#

It hasn't changed

#

I have previous chat button too and it works fine

indigo bolt
haughty island
#

I don't understand why command auto complete doesn't work

unique swan
#

@normal moat hello bro How are you

normal moat
#

not good

timber harness
#

lol

past stirrup
normal moat
#

people keep pinging me for help here lol

restive crag
haughty island
past stirrup
normal moat
hexed briar
timber harness
hexed briar
#

I been pinged so many times even bought to dms so eh, not happening

#

this is your curse now

haughty island
#

Can you help me with my command auto complete button for mobile

timber harness
#

a curse for a json ui expert

hexed briar
#

good thing I changed my profession to art

past stirrup
normal moat
hexed briar
#

that called ignore.

normal moat
hexed briar
#

also there's option to turn ping off

#

I think

#

yeah it was

indigo bolt
# normal moat yeah that

I accidentally deleted the file so I had to download a new one (I'm making things very difficult)

haughty island
#

I don't like to constantly ask for help but I need my command auto complete button to work so can anyone help

hexed briar
#

you can post questions on the forum and hoping that someone may able to help

indigo bolt
hexed briar
#

bro stop already

haughty island
#

I posted it

haughty island
#

Disadvantage of using discord on mobile

opal aurora
past stirrup
#

but we should be able to create uis using scriptapi in the future

#

not sure about modifying existing uis yet

#

but my guess is that we will be able to re-use their routes

opal aurora
#

I want them to be implemented as a resource pack, not behavior pack

#

So I can use them anywhere

haughty island
past stirrup
past stirrup
#

:D

opal aurora
#

But can I use them now?

past stirrup
#

sadly you can’t

#

yet

opal aurora
past stirrup
#

iirc one of the devs said that we’re gonna get some components when oreui releases, i hope we get the ability to read and create facets from day one

opal aurora
past stirrup
normal moat
past stirrup
#

you’re gonna find some other modules but don’t worry too much about them

normal moat
past stirrup
normal moat
#

oh okay, thanks

indigo bolt
#

I swear I won't tire your head

unique swan
#

@warm prawn Engeli aç

unique swan
#

hello everyone, how can I add a background to the long_form_panel?

unique swan
#

@normal moat How can I add a custom button to my own server_form.json file?

hexed briar
#

bro

#

stop pinging LeGend jesus christ

unique swan
#

How can I create a custom button?

hexed briar
#

no one gonna tell if you gonna mass pings and dms like that

safe root
#

I have an image overlayed on screen with /title, how would I make it remove all hud elements apart from the title types

stiff urchin
#

can anyone help me to Position the UI in the right place

stiff urchin
safe root
#

why is json ui always so toxic

#

this is why I don't use these channels

indigo bolt
indigo bolt
safe root
#

I'm not saying it's hard. I'm saying the community around Json UI is toxic for zero reason.

#

People like you make it hard.

#

Nvm

#

other dude was the toxic one

#

but yea

hexed briar
#

again, people has life too. not just always answering people's questions

#

and secondly, people kept asking the exact same questions all over again in #1067869374410657962 and therefore increasing insanity to people who still answering like me or LeGend

safe root
#

Apparently people can't read

hexed briar
#

and there's search on a forums or discord search feature where you can find questions easily

#

turned out they just, went and didn't care anything

#

hence the toxicity which there's something I can't do about it

#

there's people who post wiki about json-ui intro everyday and they didn't seem to care or take a read for once

safe root
#

Yeah I know, I just use this discord a professional place to learn, and I come to this channel when I need help and it's always filled with toxicity.

hexed briar
#

It's easy to understand how json-ui works, but what not is people don't care instead going for straight question and answer.

safe root
#

Well my question has merit, because I've tried to get it to work for 12 hours. Searched for previous solutions, tried them and it hasn't worked. So I'm completely lost if you'd be able to help.

hexed briar
#

so what do you want to do exactly

safe root
#

I've got a screen overlay (cctv) which is visible when an actionbar is set to a specific string, and due to the functionality the player has to be in survival/adventure or creative. Thus displaying the Hud elements, I'd like it so that when the same string is used it removes the hud elements, i.e. heart, hunger, hotbar but not the actionbar/title stuffs.

hexed briar
#

you can do the same thing but opposite. instead of having "ignored": "(not $string)", you can do "ignored": "$string" and vice versa.

#

bindings may work better because you don't have to link everything into factory

safe root
#

I'm using bindings, but I just don't know where it should go to make it work.

hexed briar
#

what does it look like?

safe root
#

Can't send the whole thing but I assume this is what you're looking for.

"hud_content": {
    "type": "panel",
    "$hud_size": [ "100%", "100%" ],
    "$hud_player_rend_desktop_offset|default": [ 15, 15 ],
    "variables": [
      {
        "requires": "($is_holographic and not $is_living_room_mode)",
        "$hud_player_rend_desktop_offset": [ 100, 50 ]
      },
      {
        "requires": "($compress_hud_width)",
        "$hud_size": [ "90%", "100%" ]
      }
    ],
    "size": "$hud_size",
    "controls": [
      {
        "[email protected]_panel": {
          "bindings": [
            {
              "binding_name": "#hud_title_text_string",
              "binding_name_override": "#text",
              "binding_type": "global"
            },
            {
              "binding_type": "view",
              "source_property_name": "(not ((#text = '§0')))",
              "target_property_name": "#visible"
            }
          ]
        }
      },
      {
        "[email protected]_root_panel": {
          "bindings": [
            {
              "binding_name": "#hud_title_text_string",
              "binding_name_override": "#text",
              "binding_type": "global"
            },
            {
              "binding_type": "view",
              "source_property_name": "((#text = '§0'))",
              "target_property_name": "#visible"
            }
          ]
        }
      },
      { "camera_renderer@camera_renderer": {}}
    ]
  }```
hexed briar
#

oh, you've made the whole gui invisible.

#

maybe try to reference title/actionbar here on hud_content

#

and remove the both title/actionbar reference from root_panel

#

then add condition rendering on hud_content like what you did but opposite so it can display

safe root
#

wait 🤦‍♂️ I'm an idiot

#

got it working xd

safe root
hexed briar
#

always read the root source first so yeah

#

every vanilla screens should have the screen element or root element with the same name as file name

#

e.g hud_screen.json will have hud_screen element etc

#

from there, you can look each referencers where it from so you can troubleshoot with ease.

stiff urchin
#

you have no sense of humor

hexed briar
#

I see no 'funny'

vocal urchin
#

Someone help

#

It is not server form

mild crow
#

Hello

#

I want my custom button to work for only 1 text, how can I do it?

restive crag
#

What element controls the title of a server form?

limber quartzBOT
rigid pier
#

ohaa smrll of curry bile serverde

unique swan
#

? json ui documentation

limber quartzBOT
unique swan
wind elm
#

Ok so I'm really just starting out with JSON UI and I'm wondering if molang can be used in UI, if not then how would I extract a value from a scoreboard

halcyon spear
#

What's the fle name for the error loading wolrd screen?

timber harness
normal moat
normal moat
wintry crater
#

can someone help me :> how can i add image at the top of actionform?

quasi acorn
#

Can you get scores from the list display?

toxic comet
#

will the new ore ui update change the way animations are implemented?

hexed briar
#

I swear to god that #1067869374410657962 are flooded with stolen UI's

wintry crater
#
        "offset": [
            "-70%",
            "0"
        ],

why this is not working?

#

how to add value with %?

hexed briar
#

% is a dynamic type of thing.

#

where every screen size and resolution are matters

#

so, I guess don't use that and use the fixed value instead

wintry crater
#

i tried the fixed value and when i test it on my phone the ui move too much at left side but on pc it looks normal

hexed briar
#

use anchors instead.

wintry crater
#

ok ill try that

opal aurora
hexed briar
#

Mhm.

opal aurora
#

example: adding a button (but "what will it do" is the problem)

west trail
hexed briar
#

Json-UI in general aren't that hard for those who've learned basic json stuff before.

#

what hard is people doesn't have the common sense enough to read the wiki.

#

the tutorial of adding your own UI is literally right there.

#

even if I wanna contribute on the wiki about how to add your own forms in server forms, people wouldn't even read it

#

Even myself who has absolutely no knowledge of json-ui back in one day can already get custom npc ui screen working, and just a reminder that npc ui is harder than server forms.

#

so, json-ui isn't not that hard. it's just common sense that people can't corporate properly.

restive crag
#

JSON UI is pretty easy, just gotta know what element/file to edit.

mortal monolith
#

Yes

#

It is hard to learn, but in the end it is achieved

#

🙂

hexed briar
#

Json-ui is just mediocre in term of difficulty.

#

not easy or hard, but it's simple enough to understand them

#

Wiki has where you would implement your own elements on hud_screen

#

aswell with nearly all tutorials about what that element is and how to use it

normal moat
unique swan
#

How can I add a scrollbar to my form?

timber harness
#

jsonui is just kinda hard in general

acoustic ivy
#

We can't talk objectively tho bc everyone has their own level of comprehension some people are smarter and can understand the topic easily with wiki others no

#

I've been working and trying to learn JsonUI for more than a year 8/18/22 and I'm still at the level of a beginner

#

And I just recently started to understand the logic, in the wiki for example there's nothing related to server_forms and you would have to rely on discord search for that which sucks bc not always you will find the solution to your issue

stiff urchin
#

Friends, is it possible to create a slot there is more for attchable use

#

In the player's inventory, where I can leave an equipped item to appear in the player's attchable

#

Or not?

#

Can anyone help me with this?

stiff urchin
#

not even the inventory slot for that?

#

Like leave the item in the slot but appear in the attchable

hexed briar
#

you can't create more slots.