Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Adriweb

Pages: 1 ... 87 88 [89] 90 91 ... 115
1321
TI-Nspire / Re: [Lua] Gravity guy
« on: December 22, 2011, 09:12:11 am »
awesome, I just finished the whole thing, it's really a good game :D

1322
Other Calculators / Re: Periodic table
« on: December 22, 2011, 08:12:36 am »
Besides the automatic language detection, did you include a menu for selecting another language (a preference which should be saved and restored upon reopening the document), as I suggested ? :)

Not yet, this release is just focusing on optimizations and translations.
I'll add better native support for computer view and Manual language setting on the next release.
:-)

1323
Other Calculators / Re: Periodic table
« on: December 22, 2011, 07:57:14 am »
No, pretty much every char/symbol without conversion works within the SDK, so you won't have to do anything by hand.

Right now, you have to do that because Luna doesn't support it ;)


Anyway, I think I have finished the new version (v2).
Main changes :
-Optimizations
-Dynamic Translations in 10 languages
-Works in the computer view in the software/doc player


(Oui, les erreurs de traductions ont été corrigés, pas sur le screenshot, c'est tout :P)



Uploading to TI-Planet soon :)

1324
Other Calculators / Re: Periodic table
« on: December 21, 2011, 05:38:10 pm »
well everything else is 99% done, but the only thing that makes it work on computer view is to be at a minimum of 130% readibility. (the little slider thing)

1325
Other Calculators / Re: Periodic table
« on: December 21, 2011, 05:32:11 pm »
Here is for the accents :
http://wiki.inspired-lua.org/string.uchar

All right, here is the translation table, ready for you guys :
http://pastebin.com/JRV7fBrs

(please correct any mistakes ;)  )

1326
TI-Nspire / Re: Bomberman
« on: December 21, 2011, 05:02:37 am »
Ahh, ok :D

1327
TI-Nspire / Re: Bomberman
« on: December 21, 2011, 04:49:54 am »
Can you post Bomberman's code to GitHub  ?

1328
Other Calculators / Re: Periodic table
« on: December 20, 2011, 11:54:12 am »
"wirekey" at TI-Planet is starting to translate it in French, I believe.

Anyway, we've hosted it on TI-Planet also, citing ticalc.org as source since it was before you published it here.

congratz anyway :)


Nick :
I showed it to TI, and they really liked it (but when tested on the next version, it doesn't run without deleting the gc:setAlpha ... )
Can you update it to not use it anymore ? :)

1329
News / Re: Lua's compatibility with future versions of the Nspire
« on: December 20, 2011, 06:36:02 am »
Just wanted to add something :

For people using Inspired-Lua (the wiki, at least),
we're now marking the unofficial/undocumented functions, so you can see it clearly.

Example : http://wiki.inspired-lua.org/gc:setAlpha

1330
Lua / Re: Tool-palette Questions
« on: December 20, 2011, 06:34:18 am »
You're all right about these questions.

Somethin I want to add, with Jimbauwens' remark is that Levak already implemented his own menu system withcomplete recursive-ness and image/icon support.

You can find some info here :
http://levak.free.fr/ftp/nspire/Make3D/Menu.lua

Here's the code directly :

Code: [Select]
-----------------------------
-- Levak ©2011 --------------
-- http://levak.free.fr/ ----
-- [email protected] --------
-----------------------------

------ Menu

Menu = class(Screen())

function Menu:init(items, convert)
if convert then -- the given format is a non-recursive toopalette, convert it
self.items = {}
local Btype2 = 1
for j, button in ipairs(items) do
local subitems, pic = {}, nil
if #button > 1 then
local Btype = 1
for i=2, #button do
if type(button[i]) == "table" then
table.insert(subitems, Button(0, 0, 0, 1.5, normal, button[i][2], button[i][1], button[i][3] or nullButton, nil, Btype))
if not pic and #button[i] > 2 then
pic = button[i][3]
end
if Btype < 3 then
Btype = 3
end
else
Btype = 1
end
end
subitems[#subitems].Btype = subitems[#subitems].Btype and subitems[#subitems].Btype == 1 and 0 or 2
end
self.items[j] = Button(0, 0, 0, 1.5, normal, function() end, button[1], pic or nullButton, Menu(subitems), Btype2)
Btype2 = 3
end
self.items[#self.items].Btype = 2
else
self.items = items
end
self.depth = 1
self.selectedIndex = 0
self.active = true
end

function Menu:format()
local i, xmax, ymax = 1, 0, 0
local gc = platform.gc()
gc:begin()
gc:setFont("sansserif", "r", fxxsmall)

-- Get the maximum width
for _, button in ipairs(self.items) do
if type(button.text) ~= "string" or button.text == "" then
button.active = false
else
button.active = true
ymax = ymax + button.h + button.s
button.text = (i < 10 and tostring(i) or string.uchar(55 + i))..":"..button.text
if gc:getStringWidth(button.text) + button.h + 5 + 10 > xmax then
xmax = gc:getStringWidth(button.text) + button.h + 10 + (button.h+normal)/3
end
i = i + 1
end
end

if #self.items > 0 then
local firstX = self.items[1].x
local firstY = self.items[1].y + self.items[1].s

if firstY + ymax > platform.window:height() then
firstY = platform.window:height() - ymax
end
for i, button in ipairs(self.items) do
button.x = firstX
button.y = firstY
button.w = xmax
if button.child then
if #button.child.items < 1 then
button.active = false
else
button.child.items[1].x = button.x + button.w + button.s + 1
button.child.items[1].y = button.y - button.h - button.s/2
button.child.depth = self.depth + 1
button.child:format()
end
end
firstY = firstY + button.h + button.s
end
end
self.selectedIndex = self:escapeNullElement(1)
gc:finish()
end

function Menu:paint(gc)
for i,button in ipairs(self.items) do
button:paint(gc, i == self.selectedIndex)
end
end

function Menu:charIn(ch)
if ch >= "1" and ch <= "9" then
if self.items[tonumber(ch)] and self.items[tonumber(ch)].active then
self.selectedIndex = tonumber(ch)
self:enterKey()
end
elseif ch >= "a" and ch <= "z" then
local i = string.byte(ch) - 87
if self.items[i] and self.items[i].active then
self.selectedIndex = i
self:enterKey()
end
end
platform.window:invalidate()
end

function Menu:enterKey()
if self.items[self.selectedIndex].child then
local submenu = self.items[self.selectedIndex].child
PushScreen(submenu)
else
for i = 1, self.depth do
PullScreen()
end
self.items[self.selectedIndex].fun()
end
end

function Menu:escapeKey()
PullScreen()
end

function Menu:containsValidItem()
for i, button in ipairs(self.items) do
if button.active then
return true
end
end
return false
end

function Menu:escapeNullElement(n)
local i = (self.selectedIndex + n - 1) % #self.items + 1
-- Is the next item invalid and can we iter anyways ?
if self.items[i].active then
return i
elseif self:containsValidItem() then
self.selectedIndex = i
return self:escapeNullElement(n)
else
return self.selectedIndex
end
end

function Menu:arrowKey(key)
if key == "up" then
self.selectedIndex = self:escapeNullElement(-1)
elseif key == "down" then
self.selectedIndex = self:escapeNullElement(1)
elseif key == "left" then
self:escapeKey()
elseif key == "right" then
if self.items[self.selectedIndex].child then
local submenu = self.items[self.selectedIndex].child
PushScreen(submenu)
end
end
platform.window:invalidate()
end

function Menu:mouseDown(x, y)
local push = false
for i, button in ipairs(self.items) do
if button:isActive(x, y) and button.text ~= "" then
self.selectedIndex = i
self:enterKey()
push = true
end
end
if not push then
PullScreen()
on.mouseDown(x, y)
end
platform.window:invalidate()
end

function Menu:mouseMove(x, y)
for i, button in ipairs(self.items) do
if button:isActive(x, y) and button.text ~= "" then
self.selectedIndex = i
end
end
platform.window:invalidate()
end

-- non used events
function Menu:tabKey() end
function Menu:backtabKey() end
function Menu:contextMenu() end
function Menu:help() end
function Menu:mouseUp() end

Some screenshots :




1331
Other Calculators / Re: Next Nspire OS and Lua compatibility
« on: December 19, 2011, 04:43:52 am »
Well there's an official Lua scripting page with public tools and documentation, so yes we are aware of it :)

Oh, that's only because we asked them something like "WHY U NO TELL US", so they quickly made a page up on their site ;)

1332
Lua / Re: Lua 'XML' reader
« on: December 18, 2011, 05:06:09 pm »
pdf [readers] are extremely hard to make...

1333
Lua / Re: Lua 'XML' reader
« on: December 18, 2011, 04:46:24 pm »
Well, thanks for your comments, but I don't have time right now... :(

Maybe later :)

Also, would you like to participate in EEPro ?
We need skilled coders like you ;)

1334
Other Calculators / Re: Next Nspire OS and Lua compatibility
« on: December 18, 2011, 04:19:00 pm »
They really do try what they can to provide a good compatibility.

(That's pretty much a quote from a TI employee)

And don't forget we should not even be aware of Lua right now (until the release of the SDK) :P


And yeah, if you stay with what their doc says, it's going to be OK :)

1335
Other Calculators / Re: Next Nspire OS and Lua compatibility
« on: December 18, 2011, 04:10:33 pm »
It's been requested, we don't know right now.

Pages: 1 ... 87 88 [89] 90 91 ... 115