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 - Munchor

Pages: 1 ... 73 74 [75] 76 77 ... 424
1112
Lua / Re: on.up() Event
« on: June 15, 2011, 10:16:43 am »
Perhaps that last one returns a value corresponding to an actual key?

I ran this on my calculator and I (think) I tried all keys and possible movements.

1113
Other / Re: Windows 8
« on: June 15, 2011, 10:10:59 am »
This seems good, but can it beat Android? I don't know :/

1114
Lua / Re: on.up() Event
« on: June 15, 2011, 10:05:36 am »
Ok, here are the results of my research.

Code: [Select]
draw_text = false

function on.paint(gc)
    if draw_text then
        gc:drawString("Hello", 5, 5, "top")
    end
end

function on.mouseUp()
    draw_text = true
    platform.window:invalidate()
end
Doesn't work

Code: [Select]
draw_text = false

function on.paint(gc)
    if draw_text then
        gc:drawString("Hello", 5, 5, "top")
    end
end

function on.grabUp()
    draw_text = true
    platform.window:invalidate()
end
If I grab and move up the touchpad, it works

Code: [Select]
draw_text = false

function on.paint(gc)
    if draw_text then
        gc:drawString("Hello", 5, 5, "top")
    end
end

function on.up()
    draw_text = true
    platform.window:invalidate()
end
on.up() doesn't work

Code: [Select]
draw_text = false

function on.paint(gc)
    if draw_text then
        gc:drawString("Hello", 5, 5, "top")
    end
end

function on.mouseMove()
    draw_text = true
    platform.window:invalidate()
end
Works whenever I move the mouse, any direction

1115
Lua / Re: on.up() Event
« on: June 15, 2011, 09:51:45 am »
Thanks Jim, I forgot to refresh the window:

Code: [Select]
draw_text = false

function on.paint()
    if draw_text then
        gc:drawString("Hello", 5, 5, "top")
    end
end

function on.up()
    draw_text = true
    platform.window:invalidate()
end

It still didn't work, it seems like it has a different use, but I have no idea what.

1116
Lua / on.up() Event
« on: June 15, 2011, 09:43:30 am »
Inspired-Lua.org Wiki predicted that the function on.up() worked for when the moving the touchpad up.

I read it here: [lua]Category:Events[/lua]

So I decided to try it on real hardware with the following code:

Code: [Select]
draw_text = false

function on.paint()
    if draw_text then
        gc:drawString("Hello", 5, 5, "top")
    end
end

function on.up()
    draw_text = true
end

It didn't work, when I move the touchpad up (either by moving it or by pressing the key), the text "Hello" never appears.

Also, this didn't work either:

Code: [Select]
draw_text = false

function on.paint()
    if draw_text then
        gc:drawString("Hello", 5, 5, "top")
    end
end

function on.mouseUp()
    draw_text = true
    platform.window:invalidate()
end

1117
Lua / Lua Routines
« on: June 15, 2011, 09:33:10 am »
It seems like there is no topic for us to group our TI-Nspire Lua routines. Feel free to post here your Lua routines, whether they are directly connected to Nspire or not. Don't forget to try and optimize other people's functions if you can.

To start, how about a function that checks if a number is prime or not? I tried to find one online but I couldn't, so I ended up making my own.

Check if a number is prime
Input:   One argument, an integer
Output: true or false, whether the argument is a prime or not

Code: [Select]
function isPrime(n)
    --[[Check if an integer n is a prime or not--]]
    if n==1 then return false end --1 is not a prime
    for i = 2, math.sqrt(n) do
    if n % i == 0 then
    return false
    end
    end
    return true
end

1118
News / Re: Omnimaga opens tutorials section on website
« on: June 14, 2011, 06:08:37 pm »
I didn't get how it gets tutorials, one of my tutorials wasn't added (Axe Physics Introduction one).

Either way, this is great and I really like it! Thanks

1119
hoffa, could you release the source please? I'd be delighted.

1120
Lua / Re: Smooth Key Input
« on: June 14, 2011, 05:39:01 pm »
Unfortunately no. The TI-Nspire Lua API is limited, and not game-oriented :(

That's too bad, thanks for the information. Go Ndless and C and ARM!

1121
Art / Re: [Request]16*16 or 32*32 Helicopter Sprite
« on: June 14, 2011, 04:50:45 pm »
Color depth?  Animated?  Position as an angle of tilt?

Sorry I lacked information, edited the first post.

1122
Lua / Smooth Key Input
« on: June 14, 2011, 04:50:08 pm »
I was wondering if it's possible to achieve this in Lua, as it's a high level language I'm not sure if we can.

In a Mario game for Nintendo Consoles, we press <RIGHT> and the sprite immediately goes right. However, in the Nspire if we press right the image will move once, pause for a bit and then start moving (and it won't pause again until we release key).

So, can it be done?

1123
Art / [Request]16*16 or 32*32 Helicopter Sprite
« on: June 14, 2011, 04:24:53 pm »
I need a 16*16 or a 32*32 helicopter sprite for my new game.

You choose whether 16*16 or 32*32, both would be appreciated though ;)

You'll be credited in the release if I use your sprite :D

Position: Regular, turned right, as if flying to the right. Black and White, not animated, thanks.

1124
News / Re: Gossamer release and update to DCS7
« on: June 14, 2011, 02:49:13 pm »
Great, it was released, and along with a new Beta, great news!

Keep it up Kerm

1125
TI Z80 / Re: POP - A game to POP
« on: June 14, 2011, 02:35:09 pm »
Oh sorry I forgot to upload it, here's the latest version (source not included, I will if you guys want it though).

Run it using Asm(prgmPOP or a shell (DoorsCS7 or above recommended).

Pages: 1 ... 73 74 [75] 76 77 ... 424