This DLL will most likely not work anymore. It will not be updated.
For the example, I have a simple TUI interface. Three clickable buttons that execute the specified code. Press Alt + Enter in the console for "fullscreen".
The mouse position in the window, from 0 to 79. Updated when con_process is called and a mouse event is in queue. Hint: The cursor position is not based on pixels, but character cells.
The mouse position in the window, from 0 to 24. Updated when con_process is called and a mouse event is in queue. Hint: The cursor position is not based on pixels, but character cells.
Initialize the DLL for use, must be called before any other functions. If animation is true, automatic scrolling and wrapping will be disabled.
Free the DLL, please call this when done, it's best for you and the users.
Sets the console's caption to title.
Writes str to the console window. Scrolls and wraps automatically.
Reads a string from the console, returns what was entered. Warning: This will freeze the game until it returns.
Clear the console window.
- con_spos(x, y);
Set the cursor position to x,y. Written text is entered at this position. Not to be confused with the mouse position.
Get the current x value of the cursor.
Get the current y value of the cursor.
Sets the foreground and background color for text to col. These colors are not based on RGB, they are 4-bit colors. Some values are defined in the constants of Merge.gmk.
- con_sevents(key, mouse);
Set the callback scripts for keyboard and mouse events, use -1 for none. For events to be used, events must be processed. These scripts are only executed if you process events.
Process events. Calls the set scripts if needed. Warning: Using this will freeze the game, it does redraw if the console window has focus.
- Keyboard Event Arguments:
- Mouse Event Arguments:
Edited by TheMagicNumber, 04 September 2011 - 11:08 PM.