flamendless / Slab

An immediate mode GUI for the Love2D framework.
MIT License
289 stars 25 forks source link

Slab.Separator() have wrong position in layout #73

Closed LaineZ closed 3 years ago

LaineZ commented 3 years ago

Separator position goes wrong if used in layout windows

Wrong pos

Minimal example:

  slab.BeginWindow("MenuSettings", {Title = "Settings", X = 200, Y = 150})
  slab.BeginLayout("LayoutSettings", { Columns = 3})
  slab.SetLayoutColumn(1)
  slab.Text("Sound:")
  slab.Separator()
  slab.Text("SFX:")
  slab.SameLine()
  slab.Input("MyInput", {
    Text = "1.0",
    ReturnOnText = true,
    W = 200
  })
  slab.Text("Mus:")
  slab.SameLine()
  slab.Input("MyInput2", {
    Text = "1.0",
    ReturnOnText = true,
    W = 200
  })
  slab.SetLayoutColumn(2)
  slab.Text("Graphics:")
  slab.Separator()
  slab.CheckBox(false, "Vsync")
  slab.CheckBox(false, "Fullscreen")
  slab.EndLayout()
  slab.Button("Apply")
  slab.SameLine()
  slab.Button("Close")
  slab.EndWindow()
LaineZ commented 3 years ago

By the way, default font have same issue: default font

coding-jackalope commented 3 years ago

Hi @LaineZ, thanks for reporting this issue. A fix for this issue will be included in the next release which is currently being worked on.