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 ... 85 86 [87] 88 89 ... 115
1291
TI-Nspire / Re: [Lua] Image Editor
« on: January 01, 2012, 04:49:02 am »
Really nice, thanks ;)

I'll let Jim Bauwens decide how these ideas are shared etc.

Maybe we should all (all the community) share our code and put it somewhere on GitHub in a seperate project ("nGUI ?"), in order to have a common GUI project library.
With everyone's code and ideas, we sure would have the best-looking library :)


Edit : I tested it and it works great : Indeed, it's purely graphical so no interactinos or whatever, but still, the graphical part and the awesome-native-look is a good point.
Jim's way in EEPro is actually more complex since everything in the dialog box is "modular" and can act with the keyboard/mouse since the list, the text inputs etc. are all widgets added to a main widget (the dialog box)

1292
TI-Nspire / Re: LabyRoll'
« on: December 31, 2011, 12:38:18 pm »
It really looks great :)

1293
TI-Nspire / Re: [Lua] Image Editor
« on: December 31, 2011, 12:29:20 pm »
That's some impressive native-looking window.

Did you do it by yourself or took some routines from EEPro ? :) (No proble, if you did :) )
If you didn't, we could use some of your code for EEPro, then ?

(You'd be a contributor if you want, actually)


Edit :  Also, code ? :D

1294
Lua / Re: Getting started with Lua on Nspire
« on: December 31, 2011, 04:06:11 am »
The whole OpenSSL library is included in the OS so porting Luna would probably be easier. And the OS validation of the PK-ZIP format is actually quite weak so minizip isn't really needed.
Great :)
That's a good ndless project then, for anyone who has some time to spend on that :P

1295
Lua / Re: Getting started with Lua on Nspire
« on: December 30, 2011, 04:42:01 pm »
What about just finding the right syscalls to the functions the OS uses?

What ???
:o

1296
Lua / Re: Updating WZGUILib
« on: December 30, 2011, 04:11:06 pm »
If we update to the next release of Lua, will we have to update the OS? I'm still running 3.0.1.  :P
Yes

Will Ndless still be compatible if we have to update the OS? Even though I love programming Lua, I'm not willing to give up the chance for a GBC emulator, inter alia.  :)
No idea. Ndless 3.1 works with 3.1. If the exploit(s?) is still there in the future OS update, there's a good chance that ndless will work too :)
It has not been tested with the alpha build we have (and we won't do it - and we can't, even if we would want to-)

1297
Lua / Re: Getting started with Lua on Nspire
« on: December 30, 2011, 03:49:59 pm »
You can't really get .tns oncalc, at least I don't think so...

Maybe if a ndless program could parse the xml (of the Lua code) that would be inside the .tns and extract it to create a script widget like Luna does ... but this could be quite difficult.

1298
Lua / Re: Updating WZGUILib
« on: December 30, 2011, 12:24:16 pm »
Your problem might come from the fact that you're using platform.gc():getStringWidth()  instead of the normal  gc  you use when you draw stuff.
platform.gc() initialize a new  gc   and then doesn't know about the font properties (size etc.) of the one you want, so this is probably the source of problem...

Try either to :
  -  pass gc (the one you use to draw with) to the function where   getStringWidth()   is needed, then do that with this gc.
  -  calculate the width beforehand (then pass it to the function)... but that might be too heavy. It's better to use the 1st solution.

1299
News / Re: Ticalc publishes 2011 POTY results
« on: December 30, 2011, 09:38:37 am »
Congratulations to everyone :)

Next year, I really hope that EEPro will be in the list (not the winner, that's a bit of an achievement :P, but nominated), since what we're trying to do will really be appreciated by all the students :)

1300
Lua / Re: Getting started with Lua on Nspire
« on: December 30, 2011, 04:38:53 am »
and it will be even faster soon ;)

1301
TI-Nspire / Re: CyberBox
« on: December 28, 2011, 05:27:50 am »
Yes, looks fun :D

1302
TI-Nspire / Re: Lua Galaga Progress
« on: December 27, 2011, 02:06:01 pm »
Then when the bullet has hit, you can erase the data while keeping the object, so then you can reuse it later.
Just delete the object since you have its ID and create another :)

1303
TI-Nspire / Re: Lua Galaga Progress
« on: December 27, 2011, 06:56:24 am »
You can find my BreakOut game here :
https://github.com/adriweb/Nspire-BreakOut
(I should put some of my stuff in my signature :P)

Go read lines ≈ 207+ :

Anyway, the way I do it is indeed dynamic :

Code: [Select]
      if lives < 1 then
          gameover = true
      else
        paddle.x = 0.5*platform.window:width()-29+newPaddleY
        aBall = Ball(paddle.x,platform.window:height()-26,-1-speedDiff,-1-speedDiff,#BallsTable+1)
        table.insert(BallsTable,aBall)
        pause = true
        waitContinue = true
      end

the Ball class init is : Ball:init(x, y, speedX, speedY, id)

1304
Lua / Re: Updating WZGUILib
« on: December 27, 2011, 06:48:36 am »
Good job, but in EEPro, we've been doing some intensive GUI Lib work, and here's an example of dialog boxes we make :



with this kind of code :

Code: [Select]

add_unit = Dialog("Add unit","10","7.5","80","85")

unit_value = sInput()
unit_value.ww = "77"
unit_value.number = true

units_list = sList()
units_list.hh = "41"
units_list.ww = "77"
units_list.shrink = true

lbl1 = sLabel("Value:", unit_value)
lbl2 = sLabel("Unit:", units_list)

button_ok = sButton("OK", compute)
button_esc = sButton("Cancel", remove_screen)

add_unit:appendWidget(lbl1, "2", "18")
add_unit:appendWidget(lbl2, "2", "38")
add_unit:appendWidget(unit_value, "20", "18")
add_unit:appendWidget(units_list, "20", "38")
add_unit:appendWidget(button_ok, "60", "82")
add_unit:appendWidget(button_esc, "75", "82")

( https://github.com/adriweb/EEPro-for-Nspire/blob/master/2%20-%20%20FormulaPro/FPGui.lua )

They are all interactive (tab keys to switch focus, unicode input text, react to mouse and keyboard) etc.

Maybe you should try to make some native-looklike GUI stuff and then we'd combien what you have with what we've done in EEPro ? :)

1305
TI-Nspire / Re: [Lua] Image Editor
« on: December 27, 2011, 06:42:19 am »
I see, but how do we retrieve it? Is there a function in Lua that does that or do you access memory directly?
There are clipboard setter and getters, yes.
Same for math variables :)

Pages: 1 ... 85 86 [87] 88 89 ... 115