Skip to content

Widget components overlap #4

@skynetcat

Description

@skynetcat

Code

#!/bin/tgui-bash

set -u

# Widget ID
wid="8c987114-a8a6-44d3-9383-eda9af20c1f5"

# Widget layout
# Create a remote layout and TextView
rlayout="$(tg_remote_create_layout)"
rframe="$(tg_remote_create_frame "$rlayout")"

oneBtn="$(tg_remote_create_button "$rlayout" "$rframe")"
tg_remote_text "$rlayout" "$oneBtn" "one"
tg_remote_padding "$rlayout" "$oneBtn" "600"

twoBtn="$(tg_remote_create_button "$rlayout" "$rframe")"
tg_remote_text "$rlayout" "$twoBtn" "one"
tg_remote_padding "$rlayout" "$twoBtn" "600"

tg_remote_bg_color "$rlayout" "$rframe" "aa000000"

tg_widget_layout "$rlayout" "$wid"

Result

The 2 buttons overlap

Expected behaviour

The 2 buttons should be aligned instead of overlapping

Steps

I tried:

  1. Mixing text and buttons.
  2. Using buttons only.
  3. Using text only.
  4. Putting the elements into a frame.
  5. I even tried setting a padding.

but it didn't work as expected nor even the padding appeared.

Image preview

TEMP-12_01_25_02_41_28_1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions