Enhance VisualElement with border properties #12

Merged
Shlomo1412 merged 1 commits from patch-6 into main 2025-09-30 02:09:48 +08:00
Shlomo1412 commented 2025-09-30 02:03:10 +08:00 (Migrated from github.com)

Added properties for border customization and updated rendering logic.

Usage Example:

local btn = main:addButton({
    x = 2,
    y = 3,
    text = "Click Me",
    width = 12,
})
btn:addBorder({
  color = colors.green,
  top = true,
  bottom = false,
  left = true,
  right = false -- Specific sides
})

local btn = main:addButton({
    x = 2,
    y = 7,
    text = "Click Me",
    width = 12,
})
btn:addBorder(colors.red) -- All sides
Added properties for border customization and updated rendering logic. **Usage Example:** ```lua local btn = main:addButton({ x = 2, y = 3, text = "Click Me", width = 12, }) btn:addBorder({ color = colors.green, top = true, bottom = false, left = true, right = false -- Specific sides }) local btn = main:addButton({ x = 2, y = 7, text = "Click Me", width = 12, }) btn:addBorder(colors.red) -- All sides ```
Sign in to join this conversation.
No description provided.