From 18b3940cf15f5381d007abd9f0869cae50c6f288 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Sat, 2 Apr 2022 18:04:18 +0200 Subject: [PATCH] Updated Home (markdown) --- Home.md | 69 +-------------------------------------------------------- 1 file changed, 1 insertion(+), 68 deletions(-) diff --git a/Home.md b/Home.md index daf5f3b..65e0c3a 100644 --- a/Home.md +++ b/Home.md @@ -22,71 +22,4 @@ now you are able to access everything from NyoUI.lua. * [Textfield](https://github.com/NoryiE/NyoUI/wiki/Textfield) -- bigger inputs (it works like the shell editor) * [Scrollbar](https://github.com/NoryiE/NyoUI/wiki/Scrollbar) -- special thing. it can be used for creating scrollbars (was intended) but also if you want the user to change a number value(1 - 100 as example) * [Program](https://github.com/NoryiE/NyoUI/wiki/Program) -- more special thing, with that you are able to execute programs (shell is also a program so yea you can execute a shell) -* [Animation](https://github.com/NoryiE/NyoUI/wiki/Animation) -- with animations you are able to create cute !simple! animations (example: changing button color while clicking on them) - -# Installer -Here is a premade installer you can add into your script if you want: - -This is a visual version, it asks the user if he wants to install NyoUI.lua (if not found)
-![](https://i.imgur.com/b4Ys7FB.png) -````lua ---NyoUI configurated installer -local filePath = "NyoUI.lua" --here you can change the file path default: NyoUI.lua -if not(fs.exists(filePath))then - local w,h = term.getSize() - term.clear() - local _installerWindow = window.create(term.current(),w/2-7,h/2-3,16,6) - _installerWindow.setBackgroundColor(colors.blue) - _installerWindow.write("NyoUI Installer ") - _installerWindow.setBackgroundColor(colors.lightGray) - for line=2,6,1 do - _installerWindow.setCursorPos(1,line) - if(line==3)then - _installerWindow.write("No NyoUI found! ") - elseif(line==4)then - _installerWindow.write("Install it? ") - elseif(line==6)then - _installerWindow.setBackgroundColor(colors.green) - _installerWindow.write("yes") - _installerWindow.setBackgroundColor(colors.lightGray) - _installerWindow.write(string.rep(" ",11)) - _installerWindow.setBackgroundColor(colors.red) - _installerWindow.write("no") - else - _installerWindow.write(string.rep(" ",16)) - end - end - _installerWindow.setVisible(true) - _installerWindow.redraw() - while(not(fs.exists(filePath))) do - local event, p1,p2,p3,p4 = os.pullEvent() - if(event=="mouse_click")then - if(p3==math.floor(h/2+2))and(p2>=w/2-7)and(p2<=w/2-5)then - shell.run("wget https://raw.githubusercontent.com/NoryiE/NyoUI/master/NyoUI.lua "..filePath) - _installerWindow.setVisible(false) - term.clear() - end - if(p3==h/2+2)and(p2<=w/2+7)and(p2>=w/2+5)then - _installerWindow.setVisible(false) - return - end - end - end - term.setCursorPos(1,1) - term.clear() -end - -local NyoUI = dofile(filePath) -- here you can change the variablename in any variablename you want default: NyoUI ------------------------------- -```` - -Here is a very basic one which just installs NyoUI.lua if don't exist: -````lua ---NyoUI configurated installer -local filePath = "NyoUI.lua" --here you can change the file path default: NyoUI.lua -if not(fs.exists(filePath))then -shell.run("wget https://raw.githubusercontent.com/NoryiE/NyoUI/master/NyoUI.lua "..filePath) -end -local NyoUI = dofile(filePath) -- here you can change the variablename in any variablename you want default: NyoUI - -```` \ No newline at end of file +* [Animation](https://github.com/NoryiE/NyoUI/wiki/Animation) -- with animations you are able to create cute !simple! animations (example: changing button color while clicking on them) \ No newline at end of file