Skip to content

Commit

Permalink
now use rojo
Browse files Browse the repository at this point in the history
added more features
  • Loading branch information
Egor00f authored May 11, 2024
1 parent a983a53 commit 24c2234
Show file tree
Hide file tree
Showing 5 changed files with 412 additions and 30 deletions.
61 changes: 31 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
# Drop-down List

just dropdown list

## usage:
```
local dropdownList = require(dropdownList)
function a()
return "Amogus"
end
local List = dropdownList.DropdownList:new(
{ -- List of Elemets
dropdownList.Element("One", a), -- Second arg is function (you can don't add)
dropdownList.Element("Two"),
dropdownList.Element("Three"),
dropdownList.Element("UwU"),
},
Frame, -- Frame that will be
3, -- Rows, default 3
"Dropdown List" -- Name of List
)
List:Handler()
List:Update(function(newVal:number)
print(newVal)
end)
```
# Drop-down List

just dropdown list

## usage:
```
local dropdownList = require(dropdownList)
function a()
return "Amogus"
end
local List = dropdownList.DropdownList:new(
{ -- List of Elemets
dropdownList.Element("One", a), -- Second arg is function (you can don't add)
dropdownList.Element("Two"),
dropdownList.Element("Three"),
dropdownList.Element("UwU"),
},
Frame, -- Frame that will be
3, -- Rows, default 4
"Dropdown List" -- Name of List
)
List:Handler()
List:Update(function(newVal:number)
print(newVal)
end)
```
Example of use in ReplicatedStorage
7 changes: 7 additions & 0 deletions aftman.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file lists tools managed by Aftman, a cross-platform toolchain manager.
# For more information, see https://github.com/LPGhatguy/aftman

# To add a new tool, add an entry to this table.
[tools]
rojo = "rojo-rbx/rojo@7.4.1"
# rojo = "rojo-rbx/rojo@6.2.0"
72 changes: 72 additions & 0 deletions default.project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"name": "Drop-Down-List",
"tree": {
"$className": "DataModel",

"ReplicatedStorage": {
"Shared": {
"$path": "src/shared"
}
},

"ServerScriptService": {
"Server": {
"$path": "src/server"
}
},

"StarterPlayer": {
"StarterPlayerScripts": {
"Client": {
"$path": "src/client"
}
}
},

"Workspace": {
"$properties": {
"FilteringEnabled": true
},
"Baseplate": {
"$className": "Part",
"$properties": {
"Anchored": true,
"Color": [
0.38823,
0.37254,
0.38823
],
"Locked": true,
"Position": [
0,
-10,
0
],
"Size": [
512,
20,
512
]
}
}
},
"Lighting": {
"$properties": {
"Ambient": [
0,
0,
0
],
"Brightness": 2,
"GlobalShadows": true,
"Outlines": false,
"Technology": "Future"
}
},
"SoundService": {
"$properties": {
"RespectFilteringEnabled": true
}
}
}
}
36 changes: 36 additions & 0 deletions src/client/example
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local playerGui = game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui')


local Frame = Instance.new("Frame")
Frame.Parent = playerGui





local DropdownList = requre(ReplicatedStorage.DropdownList)

function a()
--if you want cou can do this something
return "Amogus"
end

local List = DropdownList.DropdownList:new(
{ -- List of Elemets
DropdownList.Element("One", a), -- Second arg is function (you can don't add)
DropdownList.Element("Two"),
DropdownList.Element("Three"),
DropdownList.Element("UwU"),
},
Frame, -- Frame that will be
3, -- Rows, default 3
"Dropdown List", -- Name of List
1 -- Speed of animation
)

List:Handler()

List:Update(function(newVal:number)
print(newVal) -- See to console
end)
Loading

0 comments on commit 24c2234

Please sign in to comment.