"hud_actionbar_text": {
"type": "image",
"size": [
"100%c + 12px",
"100%c + 5px"
],
"offset": [
0,
"50%-68px"
],
"texture": "textures/ui/hud_tip_text_background1",
"alpha": 1,
"controls": [
{
"actionbar_message": {
"type": "label",
"anchor_from": "center",
"anchor_to": "center",
"color": "$tool_tip_text",
"layer": 31,
"text": "$actionbar_text",
"localize": true,
"alpha": "@hud.anim_actionbar_text_alpha_out",
"bindings": [
{
"binding_name": "$actionbar_text"
},
{
"binding_type": "view",
"source_property_name": "($actionbar_text = 'ABF')",
"target_property_name": "visible"
}
]
}
}
]
},
#new to Json Ui can someone explain theese errors
1 messages · Page 1 of 1 (latest)
so what are bindings?
if you dunno anything just read this one time: https://wiki.bedrock.dev/json-ui/json-ui-intro.html
i think bindings are for ediding hard coded varialbes
||Bindings are used to control properties or variables||
Bindings are values that are provided by json-ui engine for us to use
bindings don't work with variables, how hard you try
really?
I mean you can assign its value like : "$text": "#text" but nonthing else
ok so.. how bindings would help me
to get what's title is showing on the screen (/title command) or what message is sent on chat
and much more
ok so to get the actionbar_text i have to get a binding?
correct
like use it to get it
actionbar doesnot work with bindings.
instead it has a hardcoded Variable named $actionbar_text
oh ok
so now how is it supposed to change the texture
i just have to change this?
"texture": "textures/ui/hud_tip_text_background1",
it is very hard to make someone understand json ui
to something like if (condition) texture1 else texture2
it is also very hard to understand it
yeah
an how would i do something like this
I just recommend to read in this stage
there is nothing about if else
theres no if else
and then how does it choose the textuer
theres are these operators u use inside variables array or in bindigns
{
"element": {
...
"$actionbar_text": "$atext",
"text": "$text",
"$text|default": "",
"variables": {
"requires": "($atext = 'hello')",
"$text": "hello"
}
}
}
if actionbar is hello then it sets the text to hello
Again, I cannot explain everything. Just read the wiki and vanilla files
what about if it HAS hello
string1 - string2 = 'text' ?
(not (($atext - 'hello') = $atext))
this statement is true if actionbar has hello in it
...
y i understand
game crashes 💀
"$atext": "$actionbar_text",
"variables": {
"$texture|default": "textures/ui/hud_tip_text_background1",
"requires": "(not (($atext - 'hello') = $atext))",
"$texture": "textures/ui/hud_tip_text_background",
"#texture": "$texture"
},
what do you need 2 texture variables for?
idk
you will need only #texture and requires
"#" is only for bindings and property bag
you can't use it in variables or variations
im trying to edit the texture
like why is json ui this complicated
it doesnt make sense
"texture": "textures/ui/hud_tip_text_background",
"variables": {
"#texture": "textures/ui/hud_tip_text_background1",
"requires": "(not (($atext - 'hello') = $atext))"
},
like this?
do you need framework that use html instead of Json-UI?
and use compiler to make it work native
probably more understandable
its like prefering old events instead of js custom components
what
Json-UI in html by framework
oreui does work like this
no. I mean I can create a compiler to implement Json-UI in html way
i dont think so
oh in that way, but do you mean a transpiler or a compiler?
"texture": "textures/ui/hud_tip_text_background",
"variables": {
"#texture": "textures/ui/hud_tip_text_background1",
"requires": "(not (($atext - 'hello') = $atext))"
},
is that right?
To be more precise, yes.
idk anymore. By my theory yes, but someone will 100% say no. I aint sure anymore lol
I asked if you will code a transpiler or a compiler
transpiler. Just html to Json-UI.
I have already thought about this concept, it should be better than regular Json-UI.
i wanted to update my form to be more dynamic but since there are a only few people that knows json ui and its hard its quite impossible for me#1320052540582264912
same, but it needs some advanced JSON UI knowledge
it would be cool to see
if youre up to it sure
advanced Json-UI knowledge?
yeah it is
yup?
i wanted also to make that but then i rembembered that neither i do know json ui]
I know Json-UI really well, as you can see:
https://pipangry.github.io/GrimUI/
https://pipangry.github.io/JsonEncryptor/
https://pipangry.github.io/docs-starlib/
ok?
i see
- The most powerful (features/optimization) form UI
- The most powerful and secure obfuscator for Json-UI
- Well made templates for Forms.
why dont you make an html to json ui compliler
Also I know how to optimize this thing in Json-UI
yeah we get it
There are a lot of things related to hardcore values here. But I've already thought about this concept. So maybe I will try.
im good only in scripts
#1252014916496527380
you will have all my support if you make it
you want something like this?
Yes
I ran out of battery lol
wait
😈
😰
thanks
Okk ty
why does everyone use the colour symbols in json ui, is it needed?
because you can easily ignore those. When you have something like: "banner#something" you need to delete "banner#". With "§" you can just ignore them and/or place "§r"
This is especially useful when you can't directly edit the text with (#text_binding - 'thingy'). It also allows you to write the prefix as part of the text itself.
'brown' prefix makes the text brown
brownThe quick brown fox jumps over the lazy dog => The quick fox jumps over the lazy dog
now with §b§r§o§w§n
§b§r§o§w§n§rThe quick brown fox jumps over the lazy dog => The quick brown fox jumps over the lazy dog
(Also, there is no need to remove the prefix from the text, as §b§r§o§w§n is not displayed)
ty
I have a separate question, im using offsets in a child of a stack pannel, is that possible? heres my code:
the element that the offset its working on is mines_image
ill try that, thanks
"mines_image": {
"type": "panel",
"size": ["20%","100%"],
"anchor_from" : "center",
"anchor_to" : "center",
"controls": [
{
"image": {
"type":"image",
"texture":"textures/ui/mines",
"offset": [ 10, -20 ],
"size": ["100%","100%"]
}
}
]
}
just like that
ty