DSLua Community
Welcome, Guest. Please login or register.
May 18, 2012, 10:10:19 PM
1371 Posts in 262 Topics by 33109 Members
Latest Member: Limewire Download
DSLua Community  |  DSLua - Best scripting language for Nintendo DS  |  Home-brew/Hacks/Games/Projects  |  Scrollable Console « previous next »
Pages: [1]
Author Topic: Scrollable Console  (Read 2372 times)
Jeremysr
First Quarter
***
Posts: 215



WWW
« on: January 25, 2007, 09:49:07 PM »

I've made a set of functions in DSLua for text console programs. Of course it's not very good for games but some apps and text adventures could use this, or maybe just when you need to write a quick program for something.

All the instructions for using the functions for your program are in demo.lua but I will describe them shortly here:

Console.Output( text ) -- outputs text to the screen, use \n for a newline.
Console.ScrollBottom() -- scrolls to the bottom, Console.Output() does this automatically whenever it prints something
Console.Clear() -- clears screen, moves cursor to top-left corner
Console.Scroll( direction ) -- scrolls the length of a character a certain direction (the variable "direction" should be a string with the value of "UP", "DOWN", "LEFT", or "RIGHT".
Console.ScrollCheck() -- checks the d-pad and scrolls one direction depending on what arrows are pressed
Console.Input() -- waits for the user to type a string into the keyboard and press enter, then returns the string, unlike my previous versions of keyboard this one uses the L and R buttons as shift keys and the A/B/X/Y keys for some special characters
Console.Key() -- Returns the ASCII code of the key on the keyboard that is being pressed (or A/B/X/Y characters).

Please read/run demo.lua to see more how it works. Smiley

* console.zip (6.14 KB - downloaded 163 times.)
Logged
bug
Waxing Crescent
**
Posts: 14


« Reply #1 on: January 26, 2007, 03:22:02 AM »

looks quite usefull.
But as you said, it wont have tht much use in a game Smiley
Nice code though Cheesy
Logged
jester
Waxing Crescent
**
Posts: 86


Jester Corp DS Logo


WWW
« Reply #2 on: January 29, 2007, 03:12:15 PM »

excellent wat good apps can be created using dslua?
Logged

CURRENT PROJECT:

JesterCorp DS- 2D FIGHTING GAME!!! Due out August 19th 2007!!!Having Sprite Issues but Toast is helping me ALOT
brennan
Waxing Crescent
**
Posts: 41


WWW
« Reply #3 on: March 06, 2007, 10:04:44 PM »

OH shit, I haven't dropped by here in a while. I might have to continue work on my text adventure game. Having to clear lines when you screen filled up was a major pain in the ass, so I stopped dev. Thanks Jeremy.
Logged
Pages: [1]
« previous next »
    Jump to: