Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-24-2011, 04:17 AM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Saving SpacesEdit

Btw before reading, @ the title disregard the word Edit k.

How do you save spaces in a Multiline Edit. I mean, like the RC script editor, how when you press enter it saves the spaces you made. Like if I type
PHP Code:
function onCreated() {
  
temp."NOW WHEN I PRESS ENTER, 2 SPACES APPEAR UNDER IT AUTO";
  
temp."whatever";

So, if any of you know what I mean please help. Is there a boolean?
PHP Code:
savespaces true
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #2  
Old 08-24-2011, 04:49 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I guess you're talking about the auto-indenting that the RC's script editor already does.

Set: MLTextEditCtrlObject.autoindenting = true;
__________________
Quote:

Last edited by fowlplay4; 08-24-2011 at 05:17 AM..
Reply With Quote
  #3  
Old 08-24-2011, 04:58 AM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Quote:
Originally Posted by fowlplay4 View Post
I guess you're talking about the auto-indenting that the RC's script editor already does.

PHP Code:
//#CLIENTSIDE
function MLTextEditCtrl.onKeyUp(keycode) {
  if (
keycode == VK_RETURN) {
    
// find the amount of spaces used in the last line
    // append the amount of spaces to the texteditctrl
  
}

Yes but, what I'm wondering is how to find the spaces and append them :P.
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote
  #4  
Old 08-24-2011, 05:24 AM
0PiX0 0PiX0 is offline
Coder
0PiX0's Avatar
Join Date: Jan 2011
Posts: 130
0PiX0 is a jewel in the rough0PiX0 is a jewel in the rough
Quote:
Originally Posted by Astram View Post
Yes but, what I'm wondering is how to find the spaces and append them :P.
I'm not sure if there is a better way to do it. This should work just fine.
PHP Code:
//appends all the spaces before any other text begins to the beginning of the next line
nextLine currentLine.substring(0currentLine.pos(currentLine.trim())) @ nextLine.trim(); 
e. Nevermind, as fowlplay suggested, use:
GuiMLTextEditCtrl.autoindenting - boolean - when pressing the return key, then it's automatically inserting the same number of spaces in front of the new line as in the previous line

Last edited by 0PiX0; 08-24-2011 at 06:18 AM..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.