forked from cyborgize/LoveFrames
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbuttongroup.lua
41 lines (33 loc) · 1.06 KB
/
buttongroup.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
local example = {}
example.title = "Button Group"
example.category = "Object Demonstrations"
function example.func(loveframes, centerarea)
local frame = loveframes.Create("frame")
frame:SetName("Button Group with image")
frame:CenterWithinArea(unpack(centerarea))
local button1 = loveframes.Create("button", frame)
button1:SetWidth(200)
button1:SetText("Folder 1")
button1:SetImage("resources/folder.png")
button1:SetPos(50, 30)
button1.groupIndex = 1
local button2 = loveframes.Create("button", frame)
button2:SetWidth(200)
button2:SetText("Folder 2")
button2:SetImage("resources/folder.png")
button2:SetPos(50, 60)
button2.groupIndex = 1
local button3 = loveframes.Create("button", frame)
button3:SetWidth(200)
button3:SetText("File 1")
button3:SetImage("resources/file.png")
button3:SetPos(50, 90)
button3.groupIndex = 2
local button4 = loveframes.Create("button", frame)
button4:SetWidth(200)
button4:SetText("File 2")
button4:SetImage("resources/file.png")
button4:SetPos(50, 120)
button4.groupIndex = 2
end
return example