Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: Nick on November 27, 2011, 01:24:39 pm
-
in a hurry i started writing a kind of To Do manager for the nspire.
I felt like, wow, i haven't seen many apps for this calc :w00t: , let's write one ;D as i didn't felt the power to work on tetris...
now i'm just giving it some extra lay-out and a function to delete item per item, for now you can only delete them all together
you can store as many to do's as you want, and scrolling makes you see them all (not with multiple pages, all on 1) you can see this in the screenshot, release for tonight i think
i notice i did write heven't xp i never saw it during the "filming", so don't laugh at me for that xp
-
Very nice :)
-
This is really nice indeed, the overall is graphically great :D
Also, why such short description ... ?
-
thx, well, i don't really know how to make it possible to have multiple lines (for drawing reasons). When is display it, it would have to know when it has to start a new row, and then the total lay-out will be f***ed up... so if you know how, tell me, it would certainly improve it (by now the description must be 30 chars long, instead of 20 in the movie)
-
hmm... I can see some usefulness on this, good job nick!
-
thx, well, i don't really know how to make it possible to have multiple lines (for drawing reasons). When is display it, it would have to know when it has to start a new row, and then the total lay-out will be f***ed up... so if you know how, tell me, it would certainly improve it (by now the description must be 30 chars long, instead of 20 in the movie)
I think [lua]gc:getStringWidth[/lua] will be a big help :)
What you should do is split the sentence in chunks of words (by splitting by space). Then make a variable to store the text in.
Make a loop were you check the size of the variable plus the next word (using the above function). If its bigger than the screen width ([lua]platform.window:width[/lua]), print the variable and start a new sentence with the next word.
That way you will be able to nicely print stuff :)
(of course it is a bit more hard than what I write, but I think you will get it)
-
brr xp well,i certainly give it a try, then it could be used as a notepad too, what would be very usefull...
-
Nice program ! (even if I don't use my calc to remember things)
BTW, I've already used Jim's method, it's not really hard to do.
-
i've tried over 10.000 possibilities, but it still does not work for some mysterious reasons :'( this is my code:
text = "Hello there, something has to be written here"
temptext = text
tempsentence = ""
textsave = ""
drawtext = ""
sentnr = 1
function on.paint(gc)
for i=1,string.len(text) do
if string.sub(text,i,i+1)==" " then
gc:drawString("space",0,180,"top")
tempsentence = tempsentence..string.sub(temptext,0,i)
end
if string.len(tempsentence)==20 then
gc:drawString("20",160,180,"top")
gc:drawString(tempsentence,0,10*sentnr,"top")
temptext = string.sub(temptext,20,string.len(temptext)-20)
sentnr = sentnr+1
tempsentence = ""
end
end
end
it uses string.len() for now, just to make it work, i will change this if it works...
i've placed those "space" and "20" drawstrings to see if it passes them, and they just won't appear, but it loops the for, so something has to be wrong with that string.sub(text,i,i+1)
But now the nice stuff:
Editting the note works, you can now fully adapt the note when stored, even the priority can be changed!
scrolling improved (maybe i'll ad a sidebar)
-
a revolution has changed this manager a lot!
now it has live wordwrapping, see screenie, and a fully unlimited description.
so now every entry has: a title (max 30 chars), a priority (1-5) and a description (unlimited, only limited by screensize as it doesn't scroll...)
maybe i should change the name of the program, as it's starting to look more like a text editor :)
--edit--
i just saw some pixels on the left side of the screen seem to be cut off, but you can read the letters completely irl
-
i've tried over 10.000 possibilities, but it still does not work for some mysterious reasons
Over 10?
-
ten thousand i mean... but it's fixed, as you can see in the screenie
-
Looks good, glad you managed to solve it :)
If you want scrolling, you should also split by newlines (before you split by spaces). You also need to count the lines made by word wrapping.
-
Here it is, nearly downloadable (as soon as it gets approved)
a totally new app for the ti-Nspire
now you can save task, each with a title, description and priority!
simple, but good GUI
download here (http://www.omnimaga.org/index.php?action=downloads;sa=downfile&id=753)
(http://img.removedfromgame.com/imgs/ToDoManager.gif)
-
Congratulations !
I added it on TI-Planet.org here (http://tiplanet.org/forum/archives_voir.php?id=3816&play=).
By the way, attached is the version with both English and French, and with reduced lua (thus .tns) source size (by optimizing the TI.Images).
(this is the version uploaded on tiplanet)
-
wow, thanks for that, it's like 2 kB less, how did you do that? it might be usefull for my other projects too...
-
Just replace the \000 by \0 in the TI.Image big strings :)
-
I should rewrite my sprite editor to do those optimizations :)