The basic Preview mode is done, im hoping it comes in useful for quickly looking at frames, it uses the current project path and ONLY will load .afr files, this is to keep it from accidentally loading a Directory...
How to use preview mode :
- use the mouse wheel OR arrow keys(up / down) to change the frame being previewed;
- to edit the previewed frame click the frames name in the box
- To go back to Edit Menu press 'backspace' [will add a back button eventually should i feel its needed]
==
Note that for ALL options making use of a scroll wheel an optional way to scroll using the keyboard will be used, this is incase your mouse wheel is not good for this type of work or you just prefer keyboards...
Also will add eventually :
- A 'search for frame number' option;
- A 'change projectPath' option;
- A 'InstaCreate-Frame' option to allow for speedy blank frame creation
- Anything else requested...
==
Note that the Terminal preview image is designed to use 2x2 sized images, but it also previews out to the monitors for those bigger images
To DL just look at bottom of OP for :
Angel-TV[v1.2.2] + cpsAPI[v1.1] bundle
--if the Attachment is not there yet its cause im still in the process of zipping and upload, give it 5 minutes about--
Last note :
I have not tested as thorough as i usually do so please report any errors, they will be fixed in 1.2.3 along with search options mentioned above
- Definitely the better error handles, this is LONG overdue
- NPaintPro support, I asked nitrogenfingers about his animation files and we both use the same trick so decompiling a animation to playback on Angel-TV would work the same as a .amov.
- Some more improvements on projects, I want to be able to have a Projects within projects, ie Projects/ProjectName/SubProjectName/[files]....
- Search for option in previewer, the list will auto update and filter using very expansive filters ( prefix , subfix , exact/half-match )
- A Jump-To option in preview mode that will jump to the file you specify and then allow scroll from there, this will be accessible also from the filter list for quick navigation.
-edit-
Also to be added will be the pastebin support using provided pastebin program. Both download and upload will be supported.
A big update to work on imo so it will take time, especially since me and friends are playing on my server and sqaushing things in SupremeCommander-FA...
I will take time on thursday Dec 06 to look at decompiling and basic searching and a any match filter.
-end-
Please make suggestions for 1.2.4 and 1.2.3 as im running out of ideas after 1.2.3 XD
I am hoping to eventually implement some nice buttons and popups to cpsAPI, but i am lacking in the knowledge to do so.. I can use a CreateButton,DrawButton,WaitFor click etc but some small details partaining to button expanding etc are causing problems....
Instead ill look around ofra existing API to use for now, but if it becomes too much hassle ill make the buttons and menus that use them hardcoded in AngelTV as i done with the previewmodes one button, but an API to make adding and maintaining a button would be of godly help... Also i can always turn to using my original envisioned idea, where the search list is a dupe of filter scroll but you can only scroll through a filtered list... The problem is then you cant exactly see whats at hand and quick jump unless it was "type in frame number to jump to" and im trying my best to avoid typing commands too much...
long explanation while half tired....
hmmm, actually i was actually going to turn to your API
BUT can you add a wait for click and then check if mouse_click XY is within a buttons XY box ?
and here is how id pull it off :
first we save all the buttons data such as name(optional) and X1 Y1 and X2 Y2. Since we can easily draw any box using those four coords. Its also possible to use the same draw function to check if a given coord is within that box, :
first the original DrawButton function i allways use (except this one is very customisable.)
Spoiler
function DrawButton(x1,y1,x2,y2,sym,color1,color2,text,named)
if x1 == nil or 0 then x1 = 1 end
if x2 == nil or 0 then x2 = 6 end
if y1 == nil or 0 then y1 = 1 end
if y2 == nil or 0 then y2 = 6 end
if sym == nil or 0 then sym = "#" end
if color1 == nil then color1 = 0 end
if color2 == nil then color2 = 0 end
if text == nil then text = "NONE" end
if named == nil then print("Error : string expected, got " .. type(named)) print("Press any key to continue") os.pullEvent("key") end
for i = x1,y2 do
term.setTextColor(colorGet(color1))
term.setCursorPos(i,y1)
print(sym)
term.setCursorPos(i,y2)
print(sym)
end
term.setTextColor(colors.white)
for i = y1,y2 do
term.setTextColor(colorGet(color1))
term.setCursorPos(x1,i)
print(sym)
term.setCursorPos(x2,i)
print(sym)
end
term.setTextColor(colorGet(color2))
term.setCursorPos(x1+1,y1+1)
print(text)
term.setTextColor(colors.white)
inputin = named .. "*" .. x1 .. "*" .. y1 .. "*" .. x2 .. "*" .. y2 .. "*" .. text
return table.insert(Buttons,inputin)
end
So we saved all the needed data as a index in the table Buttons.
then listen for a mouse_click, grab its X and Y then :
Spoiler
function BreakBData(ButtonName)
local Temp = ButtonName
local startf = 1
local endf = 1
for i = 1,table.maxn[Buttons] do
if Buttons[i] == Temp then
---the function that breaks down the string and grabs the seperate data
--afterwards : Do note that BX1 BY1 BX2 BY2 and BButtonName etc are all the infomation we got from above function
for i = BY1,BY2 do
if MouseY == i then
for i = BX1,BX2 do
if MouseX == i then
clickedButton == BButtonName
end
end
end
end
end
end
end
then we just fetch what clicked button was and respond accordingly.. this can be run in a While Loop along with a ButtonRender function to infinitely call functions on a button click.
(DO note that i typed out the second spoiler as i was typing this...)'
-end-
-edit-
Oh i forgot, to allow "popups" and the like we can just add a g variable to all the X2 and Y2 variables in the first draw function, the g is the number to add-on should it expand, thus to make it grow from 6;6 to 9;9 we just set g to 1,render,2,render,3,render and that will end up growing it (it was infact my first function i attempted to use in Advanced computers so its one of my favourite )
-end-
NON-related to above issue update :
Ill add a check box of sorts to allow you to toggle the output preview to monitor, just thought it was needed
Ok after looking at my above example I think I saw a big derp, rejoice(i think) that im going to TRY and write out the entire system i explained above for cpsAPI, just because i cant stand not knowing if it will work so current project = "Get buttons working"
Yes. Many problems above, but overall one should see the concept Ive work on, im too tired after not sleeping... so ill read up here later today...
So if I understand good you want a function that take every running buttons and return the one wich has been clicked ?
I can easily do that but it will take some time because I cannot test it everyday so it will be done this week end normally But for the moment you can use a parallel with all the function for buttons running in. And thanks for the expand idea
yeay, i was worried my (very tired) babbling wouldn't make sense, that's the summary of what i wanted and I'm also happy to see you can do it, id very much like that update
I have already implemented a kind of buffer so it will be not so hard It's even done but as I can't test it, it may be bugged. If you want to test for me, it's the beta
Waiting for some info on the API that bjornir90 made, once I have the knowledge needed ill properly start working on the search option and some MUCH nicer error handles and popups to replace the 'old' "Press enter to continue" with "Click OK to confirm"
-The plan is to reduce typing instances and only where one will set a ProjectPath, and similar instances, will user-typed-input be used.
-I may also rework the whole menu AGAIN using the API, and maybe drop cpsAPI completely since it cannot do as much as the Mouse and Graphic API (MG-API?)
-Lastly i have been having to much fun in SupremeCommanderFA and Terraria so 0% work done...
In the meantime im going to look into pastebin options, expect it to be done by tuesday. The update will be [Pre1.2.3 #1]
-[Pre1.2.3 #2] will include the better error handles and such, this is to get it out of the way but will require MG-API.
-[Pre1.2.3 #3] is the attempt at NPaintPro support.
-Full 1.2.3 will contain :
--Custom Splash support, play any splash screen you download on startup or disable completely.
--Disk Support, be able to move files from disks or work off a disk completely just as [v1] worked.
--NPaintPro support, play back npa files, since NPP does not have a way to play back its own animations
--Improved error handles
--Better GUI styled user control, dropping as many typing instances as possible.
--Search option, with jump-to, filters and listings.
--Improved copy/delete/move screens, using the search option you can better interact with your files instead of a bunch of typing. (none of us want to type frame1-to-frame 15 by hand do we?)
--Splash screens, play a movie on startup to give a good hello! Choose from any you downloaded or just go random!
-end-
In other news, I'm going to ask for anyone and everyone to make a splash movie to play upon start-up, it must include the Abbreviation ATV, I have my own that is already converted to .amov format that will be defaulted in [1.2.3+]
Also report any bugs or give sugggestions, Im more than happy to try and add XYZ if it makes sense or I feel it is missing.
--I am also looking into netrok based streams and such for much future versions, picture TV stations with channels to scroll through! Minecraft with cable!--
So I actually done the function you have requested, the gui.getSelection() wich take every button drawed on the screen and return the one who has returned like this :
gui.setButton(x,y,endx,endy,text,colorline,colorbackground)--button 1
gui.setButton(x,y,endx,endy,text,colorline,colorbackground)--button 2
gui.sRender()
gui.getSelection() --will return 1 if the button is clicked, 2 if the button 2 is clicked and so...
So the order you declare the button are very important. If you want more informations look into the thread of the API I describe functions and how to use it
Ok, at that above error the only solution is not having the cpsAPI properly installed, please install it again using the one that comes with 1.2.2, some minor updates may have happened.
Pls don't rename any files you obtain, as those names are hardcoded in.
On other news im putting this project at low priority instead of high since i have some servers i need to manage out and my tendancy to procrastinate alot.
When the next update comes it should contain a good deal of changes though since i have lots of plans for the GUI thanks to bjornir90's API
Expect some more interesting menus!
Ive been away this weakend so no work done, i have gotten some work in the pastebin support, once PB downloading is added ill turn back to the search tool...
An extra change is the editor no-longer has you type in file names instead it hooks into the search tool, this is the first real step to removing user-typed inputs.
Updates are slow as usual, but please feel free to suggest ideas or report bugs, feedback is important as I have no real idea what one would want for this project...
Also i am announcing the real intentions on this project once i have a working (but perhaps still buggy) search tool.. One pointer is that it is best for servers.
lastly I had a spark of imagination when i heard of a image to binary converter. If one can convert a image file(say JPG or GIMP) into hex then you can easily port real life videos into the screen! One issue is size, im pretty sure monitors can be configured to allow larger sizes... but all this will wait for after the next update which as said before is low priority.
I wont be around for 2 weeks from this friday, without internet for abit, and ill be stuck with hardly anything else so ill be forced to mostly work on this...
spot update soon to come, as im going away friday for two weeks I will put out the pastebin supported version, with the new API's support, that is being able to set the api's that the program loads based on the user set paths, by default the load apis using default names in a API's folder within the AngelTV folder, it will perhaps be possible to set the apis paths to wherever you wish. NPaintPro will also be supported this way.
The default names are
NPP - for NpaintPro
cps - for cpsAPI
gui - for bjornir90's API