mirror of
https://fem.mint.lgbt/m/Rhythmblock.git
synced 2024-08-14 20:27:11 +00:00
Compare commits
No commits in common. "a09caf2b34194e730cd81de729ca74520aab191a" and "c94b8fe44136c1f7a41d74fd6089060476fdd5d0" have entirely different histories.
a09caf2b34
...
c94b8fe441
2 changed files with 6 additions and 26 deletions
|
@ -1,7 +1,7 @@
|
||||||
![Rhythmblock](logo.png)
|
![Rhythmblock](logo.png)
|
||||||
# Rhythmblock
|
# Rhythmblock
|
||||||
|
|
||||||
a graphical, customizable music player for CC: Tweaked
|
a graphical, customizable music player for ComputerCraft
|
||||||
|
|
||||||
![Rhythmblock playing Cat by C418](screenshot.png)
|
![Rhythmblock playing Cat by C418](screenshot.png)
|
||||||
|
|
||||||
|
@ -23,6 +23,6 @@ q - quit
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
run the following command on the desired CC computer
|
run the following on the desired CC computer
|
||||||
|
|
||||||
`wget https://fem.mint.lgbt/m/Rhythmblock/raw/branch/master/rhythmblock.lua Rhythmblock`
|
`wget https://fem.mint.lgbt/m/Rhythmblock/raw/branch/master/rhythmblock.lua Rhythmblock`
|
||||||
|
|
|
@ -1,23 +1,3 @@
|
||||||
--[[
|
|
||||||
|
|
||||||
Rhythmblock - a graphical music player for CC: Tweaked
|
|
||||||
(c) 2021 mint <they@mint.lgbt>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
--]]
|
|
||||||
|
|
||||||
-- Change these lines to change the GUI colors.
|
-- Change these lines to change the GUI colors.
|
||||||
accentColor = colors.gray
|
accentColor = colors.gray
|
||||||
buttonColor = colors.lightGray
|
buttonColor = colors.lightGray
|
||||||
|
@ -34,7 +14,7 @@ centerWidth = round(width / 2) -- Defines the horizontal center
|
||||||
centerHeight = round(height / 2) -- Defines the vertical center
|
centerHeight = round(height / 2) -- Defines the vertical center
|
||||||
|
|
||||||
if arg[1] == nil then
|
if arg[1] == nil then
|
||||||
peripherals = peripheral.getNames() -- Gets peripherals to check if any disk drives are available
|
peripherals = peripheral.getNames() -- Gets peripherals to check if any disk drives are avavailable
|
||||||
if #peripherals == 0 then
|
if #peripherals == 0 then
|
||||||
term.setTextColor(colors.red)
|
term.setTextColor(colors.red)
|
||||||
print("No drive")
|
print("No drive")
|
||||||
|
@ -50,7 +30,7 @@ if arg[1] == nil then
|
||||||
end
|
end
|
||||||
if driveCount > 1 then
|
if driveCount > 1 then
|
||||||
term.setTextColor(colors.red)
|
term.setTextColor(colors.red)
|
||||||
print("Too many disk drives. Specify where the desired disk drive is located by running 'rhythmblock [drive position]'") -- For safety reasons
|
print("Too many disk drives. Specify where the desired disk drive is by running 'rhythmblock [drive position]'") -- For safety reasons
|
||||||
return false
|
return false
|
||||||
elseif driveCount == 0 then
|
elseif driveCount == 0 then
|
||||||
term.setTextColor(colors.red)
|
term.setTextColor(colors.red)
|
||||||
|
@ -62,7 +42,7 @@ else
|
||||||
drive = arg[1]
|
drive = arg[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ Instead of calling every status by string, we call the variables storing the strings. This may ease translation if we plan to do so in the future.
|
--[[ Instead of calling every status by string, we call the variables storing the strings. This may ease translation if we plan to do it in the future.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
defaultStatus = "Rhythmblock"
|
defaultStatus = "Rhythmblock"
|
||||||
|
@ -162,7 +142,7 @@ status = defaultStatus -- Setting the value to the default
|
||||||
|
|
||||||
while true do
|
while true do
|
||||||
statusRender(status) -- Renders the status
|
statusRender(status) -- Renders the status
|
||||||
if term.isColour() then -- Renders the close button (if the song title is too long, the close button kind of disappears)
|
if term.isColour() then -- Renders the close button (if the song title is too long, the close button kind of disappears
|
||||||
renderCloseButton()
|
renderCloseButton()
|
||||||
end
|
end
|
||||||
local eventData = {os.pullEvent()}
|
local eventData = {os.pullEvent()}
|
||||||
|
|
Loading…
Reference in a new issue