This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ChiknNuggets's profile picture

icon program browser(kinda like an android menu)

Started by ChiknNuggets, 03 January 2013 - 01:41 PM
ChiknNuggets #1
Posted 03 January 2013 - 02:41 PM
This is just an a basic enough menu that i will be using for a future project and basiclly what it does is searches the folder that is declared in the code for files and files that end in .ico if a file is named lets say bob and there is a bob.ico when listed in the menu it will have the bob.ico as the icon for bob and when clicked it launches bob. if the .ico file is missing a default icon will replace it.to use at the moment you have to use scroll wheel but im adding a draging slider to the side, but ill wait till next update as i think there will be something to help with that.And anyway this is just really to see what you guys think, so getting some feedback on it and things i could change would be great. i was thinking also that instead of just searching a single directory you could right click and add it from there but more like a shortcut rather then the program needing to be moved but tell me what ya think

Here is the link to the code
http://pastebin.com/MBEyvrPx


Here is the basic look to it, it can display a total of 6 at a time with the title going up to 12 char long

billysback #2
Posted 05 January 2013 - 12:15 AM
This is actually pretty cool!
Giving it capabilities such as creating new files/folders and exploring folders (if it doesn't already?) as well as deleting files would be amazing.
InputUsername #3
Posted 05 January 2013 - 12:32 AM
This is quite a nice start! I agree with billysback. To be a full icon browser, it'll need some browsing functions :)/>

Suggestion: the icon browser shouldn't only scan the files for a .ico extension. I think that if a program wants to have an icon, it should have a special section in which the icon is drawn, so the program can read that section and load the icon from the program itself.

Hope you understand what I mean :)/>

Anyway, good job.
ChiknNuggets #4
Posted 05 January 2013 - 04:44 AM
well ive actually been working on this quite a bit atm, it can rename,run, from a right click menu when i say that its like android menu its more of a shortcut so the programs in the folder will only have something like shell.run("programs/blahblahprogram","arguments or whatever") and then when program finishes it brings them back to the menu, im adding an add item to the right click button. and that would be awesome to have a section in the program that allows to read the iniside of the files but i think the end problem would be that not all programs that go in there would be stand alone they might run another script so this allows it not to show both but to just run the one you need, and as im writing this im thinking i could just add a menu option that says like "Edit Icon" and then it brings up paint for like shell.run("paint","installed/"..programname..".ico") so they never have to actually use commands really to get an icon

and @billysback i guess it could be in the end a folder browser with only a few modifications but this program atm doesnt try and see if the item in fs.list() is a dirrectory or a file
pielover88888 #5
Posted 05 January 2013 - 04:48 PM
that looks really cool :o/> but i also have to agree with billysback
trying it out now :D/>
pielover88888 #6
Posted 05 January 2013 - 04:50 PM
that looks really cool :o/> but i also have to agree with billysback
trying it out now :D/>

EDIT: I get the error "apps:71: Not a directory" and then it just exits to the shell :(/> (also, total oops at the double post lol)
ChiknNuggets #7
Posted 05 January 2013 - 06:14 PM
Thats because you have to edit the Install directory, to something that exists otherwise its searching somewhere that isnt there…

and just realised i didnt put the missingicon.ico in with this, woops lol, im nearly finished most of the code anyway il update soon
pielover88888 #8
Posted 06 January 2013 - 06:45 AM
that doesn't make sense to me o_O but um, heh, oops :P/>
edit: OH now i get it! i named this program, "apps", most likely your folder to search lol!
Edited on 07 January 2013 - 09:58 AM
Left4Cake #9
Posted 19 March 2013 - 06:26 AM
I improved it.



pastebin get CucV74av craftoidInstaller

r = rename app
d = delete app
l = lock screen

If password ~= nil then you will need to type in the password to unlock.
It also wont delete or rename the appstore, shell, firebox, or pastebin.
Also tell me if you want your program on the app store.
Shnupbups #10
Posted 19 March 2013 - 11:01 AM
This is kind of like what my OS' desktop will look like, but with an added start bar, custom background, and the ability to make programs etc.

This is really good! You managed to make it work before I did.
ChiknNuggets #11
Posted 20 March 2013 - 02:57 PM
I actually finished this a while ago, it works pretty well too, just havent been on the home comp in a while