#I removed the text from the action bar, but I can't remove the background, how do I do it?

1 messages · Page 1 of 1 (latest)

civic gyro
#
  "namespace": "hud",

  "hud_actionbar_text/actionbar_message": {
    "$atext": "$actionbar_text",
    "visible": "(not (not ($atext = $update_bar_1) and not (($atext - $update_bar_1) = $atext)))"
  },
  

  "stamina": {
    "type": "label",
    "offset": [ 229, -40 ],
    "anchor_from": "bottom_left",
    "anchor_to": "bottom_left",
    "layer": 10,
    "text": "($atext - $update_bar_1)",
    "$atext": "$actionbar_text",
    "visible": "(not ($atext = $update_bar_1) and not (($atext - $update_bar_1) = $atext))"
  },
  
  "stamina_factory": {
    "type": "panel",
    "factory": {
      "name": "hud_actionbar_text_factory",
      "control_ids": {
        "hud_actionbar_text": "[email protected]"
      }
    }
  },
  
  "root_panel": {
    "modifications": [
      {
        "array_name": "controls",
        "operation": "insert_front",
        "value": {
          "[email protected]_factory": {}
        }
      }
    ]
  }
}
civic gyro
#

nvm i fixed this

forest lichen
civic gyro
#

I can text you next week.

forest lichen
pine kernel
# civic gyro ```{ "namespace": "hud", "hud_actionbar_text/actionbar_message": { "$at...

place this and disappear

"hud_actionbar_text": {
        "type": "image",
        "anchor_from": "top_middle",
        "anchor_to": "top_middle",
        "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",
        "$atext": "$actionbar_text",
        "visible": "(not (not ($atext = $update_bar_1) and not (($atext - $update_bar_1) = $atext)))",
        "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",
                    "$atext": "$actionbar_text",
                     "visible": "(not (not ($atext = $update_bar_1) and not (($atext - $update_bar_1) = $atext)))"
                }
            }
        ]
    }
forest lichen
pine kernel
#

bossbar ?

#

or something similar ?{

forest lichen
pine kernel
forest lichen
pine kernel
forest lichen
pine kernel
pine kernel
pine kernel
forest lichen
forest lichen
pine kernel
forest lichen
pine kernel
forest lichen
#

I just realized I don't know how to do it with /title @a title. So could you help me with that? I don't know how I would place the images

pine kernel
pine kernel
#

the title letters can be removed

forest lichen
#

Sorry for the late reply

pine kernel
#

@forest lichen
how to use

  • in $clip_max you must enter the maximum percentage it will have, for example I put 5 and don't forget the .0, it is very important

  • in texture you must place the image with the number of indicators, as in the image I sent below

  • in $string_bar you must place a word to execute said counter, for example, I used IndicatorBar:
    what would be IndicatorBar: + percentage
    the title will be seen

/title @a title IndicatorBar:10

  • in size you should put the percentage of x that you like, but in y you should multiply the size of x * percentage
    For example I put 16
    it would
    16*5=80
    80 is the size of y

it would work correctly

Remember to take the image as a reference, in the image there are 5 hearts, so the maximum percentage is 5, you place the ones that are necessary

the code is the following:

#
"example_bar": {
        "type": "panel",
        "size": [0, 16],
        "controls": [
            {
                "bar": {
                    "$clip_max": 5.0,
                    "texture": "textures/ui/example_bar",
                    "$string_bar": "IndicatorBar:",
                    "size": [16, 80],

                    "type": "image",
                    "layer": 2,
                    "clip_direction": "left",
                    "clip_pixelperfect": true,
                    "keep_ratio": false,
                    "offset": [0, -40],
                    "bindings": [
                        {
                            "binding_name": "#hud_title_text_string"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(#hud_title_text_string - $string_bar)",
                            "target_property_name": "#texto"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(#texto * 1)",
                            "target_property_name": "#ratio"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(($clip_max - #ratio) / $clip_max)",
                            "target_property_name": "#clip_ratio"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(($clip_max - #ratio) / $clip_max)",
                            "target_property_name": "#clip_ratio"
                        }
                    ]
                }
            }
        ]
    }

#
    "hotbar_panel": {
        "type": "panel",
        "size": ["100%c", 22],
        "anchor_from": "bottom_middle",
        "anchor_to": "bottom_middle",
        "controls": [
            {
                "@hud.example_bar": {}
            },
            {
                "stackpanel_hotbar": {
                    "type": "stack_panel",
                    "orientation": "horizontal",
                    "size": [ "100%c", 22 ],
                    "anchor_from": "bottom_middle",
                    "anchor_to": "bottom_middle",
                    "controls": [
                        { "[email protected]_start_cap": {} },
                        { "[email protected]_elipses_panel_left_content": {} },
                        { "[email protected]_grid": {} },
                        { "[email protected]_elipses_panel_right_content": {} },
                        { "[email protected]_end_cap": {} }
                    ]
                }
            }
        ]
    },
#

here is the texture if you want to try it

forest lichen
#

Thank you so much and extar thanks for the explanation

pine kernel
forest lichen
pine kernel
#

just copy and paste

forest lichen
#

Okay

forest lichen
pine kernel
forest lichen
forest lichen
forest lichen
pine kernel
pine kernel
# forest lichen But how do I remove the title text in the middle of the screen?

You will have to put the $string_bar here again

  "hud_title_text/title_frame/title": {
    "$string_bar": "IndicatorBar:",
    "modifications": [
      {
        "array_name": "bindings",
        "operation": "insert_back",
        "value": {
          "binding_type": "view",
          "source_property_name": "(#text - $string_bar)",
          "target_property_name": "#visible"
        }
      }
    ]
  }
forest lichen
forest lichen
pine kernel
forest lichen
#

One bar

pine kernel
forest lichen
pine kernel
forest lichen
#

I'll try later on so if I need help I'll ask you or on json ui

pine kernel
# forest lichen Oh I see

Perfect, if you want, make an example of what it would be like with 2 so you can base yourself on it.

pine kernel
# forest lichen

mojang changed some things and the truth is I don't know what the error is since apparently everything is fine

forest lichen
pine kernel
forest lichen
pine kernel
forest lichen
#

Ok

forest lichen
pine kernel
forest lichen
#

You gave

#

Can I make it like

pine kernel
forest lichen
#

Instead of it going like 👉 it goes like 👇

pine kernel
# forest lichen Can I make it like

you have to modify in the code, where it says clip_direction;
If you want it to start from the top down I think it's up
from bottom to top is down

pine kernel
forest lichen
forest lichen
pine kernel
forest lichen
#

Okay

pine kernel
forest lichen
pine kernel
runic schooner
#

Idk why but if you make to many bar, ui gonna be slow , i mean it cannot load fast

runic schooner
#

._. I have jusst make only 5 bar and my ui now cannot load fasst

forest lichen
#

Could you help me with my two bars?

runic schooner
#

Like my stamina point is at it min point but the bar need 1-2 sec to show the min ui

#

._. My code kinda different with the code you get up thire

forest lichen
#

Ah I see

#

Wow

runic schooner
#

I think my ui problem is that in your system we use something like
title @a title ui_1:1ui_2:1
But in my system it like
title @a title ui_1:1
title @a title ui_2:1

I using preserve title text see we can split the command and the ui will still work , but it get the problem when i make ao many ui and i think that my system got break

forest lichen
#

Oh I see

runic schooner
#

You know stamina and roll addon

#

That the perfect thing we can get

#

But i cant understand how that ui work

#

That addon dev (kamii) he using so many elements that i event doesn't know what it using for :)?

forest lichen
#

Yeah addons become confusing sometime 🥲

runic schooner
#

Not the script im just confused at the ui 😭😭😭

forest lichen
#

I'm struggling with both 😢

#

How did you get rid of the title in the middle of the screen

runic schooner
#

You mean make it disappear

forest lichen
#

@pine kernel

#

Sorry for the ping

#

I think I made a mistake

#

The 3 images sizes are [5, 101]

pine kernel
# forest lichen

It already works, you must be careful with the small details.
the binding of 1 is different from 2
and depending on the text you place the values ​​may vary

pine kernel
waxen birch
#

@pine kernel im really sorry for necroposting, but ive got a few questions
im thinking of making two bars using actionbar, one above the hotbar and the other below crosshair using glyphs (or above the hotbar if the crosshair does not exist)

  1. can those break actionbar?
  2. ill be using scripts to set the actionbar, does it work similar to the title one?
waxen birch
#

nvm got them working

wild sandal
#

@pine kernel sorry for the ping but i trying to do seperate bar like Bar_1 for bar1 and Bar_2 for bar2 but it doesn't work

waxen birch
#

also you mightve noticed the '%.7s' part

#

this gets the first '7' letters from the string

#

idk if you did make sure of that but im saying just in case

#

also beware that i didnt make the UI to stay when another title appears, im still a newbie so i cant get that to work

wild sandal
waxen birch
#

what

#

that shouldnt happen

wild sandal
#

idk why thought

waxen birch
#

it should be like this (except for texture + there would be another ui element)

waxen birch
wild sandal
#

[UI][error]-UI Control: hud_screen | UI Control: variables_button_mappings_and_controls | UI Control: safezone_screen_matrix | UI Control: inner_matrix | UI Control: safezone_screen_panel | UI Control: root_screen_panel | ----------------------------------------------------
Unknown properties found in def[root_panel] from namespace[hud]

  • Unknown property [modifications]

it have this error and make every HUD element dissaper

waxen birch
#

do you have a root panel already

#

or smth?

#

hmmm why isnt hud recognizing root panel

wild sandal
#

let me check it real quick

#

oh yeah

#

i have 2 hud thing

waxen birch
#

that explains

wild sandal
#

i just delete 1 and it displaying the texture now

#

tysm

waxen birch
#

np

#

it still doesnt preserve the bar so be careful

#

im trying to figure out how to do preserved title

wild sandal
waxen birch
#

whats the issue

noble wraith
#

it switch to another bar when fill it

waxen birch
#

you should differenate each hotbar's variables

noble wraith
#

how?

waxen birch
#

i cant really help with json ui

noble wraith
#

oh tysm