Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-09-2008, 07:01 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Functions to mimic chat input and to set cursor position in GuiMLTextEditCtrl

I've noticed in my creation of a custom chat system that things like showscriptstats don't work when setting player.chat and also the function of the text staying on what you said until you make a move doesn't work either.

I would like a function like chatinput(string) that would work the same way as if you were to type the text into the chat bar and hit enter. Basically if you did chatinput("showscriptstats") then that would display properly and if you did any other text it would stay that way until you move from your position. With this it would make the custom chat system easier to work with.

Also I'm using a GuiMLTextEditCtrl for the input in the chat system and would like a function to set the position of the cursor with in the text or simply a function to force it to the end of the line. This is because I implemented a chat input history by script and when switching the text with a previously entered text the cursor is set back at the beginning of the text. I did notice that pressing END moved the cursor to the end simply enough but it would be much simpler to have the function(s).
__________________
Reply With Quote
  #2  
Old 02-09-2008, 04:41 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
showscriptstats calls something by use of the ChatBar.onAction() I'm pretty sure.
__________________
Do it with a DON!
Reply With Quote
  #3  
Old 02-09-2008, 05:04 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Couldn't you just modify ChatBar? That's what we did on Vesporia.
__________________
Reply With Quote
  #4  
Old 02-09-2008, 06:56 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by cbkbud View Post
Couldn't you just modify ChatBar? That's what we did on Vesporia.
Quote:
Originally Posted by Inverness
I'm using a GuiMLTextEditCtrl for the input in the chat system
Sometimes posts on Val are requiring lots of text so the MLTextEdit input is needed.
__________________
Reply With Quote
  #5  
Old 02-09-2008, 07:34 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Inverness View Post
Sometimes posts on Val are requiring lots of text so the MLTextEdit input is needed.
Hmm... I don't know if it will work but you could try doing something like:
PHP Code:
new GuiMLTextEditCtrl("ChatBar") {
  
stuff();

Which should simply change the object type without removing the functions. I'm only guessing though, haven't tried it my self.
__________________
Do it with a DON!
Reply With Quote
  #6  
Old 02-09-2008, 10:41 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I want solutions not workarounds.
__________________
Reply With Quote
  #7  
Old 02-09-2008, 10:53 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Inverness View Post
I want solutions not workarounds.
Good luck.
__________________
Reply With Quote
  #8  
Old 02-10-2008, 03:40 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The function for the "chatinput" thing is protected and only works for privileged scripts, so that you cannot easily send a toall in the name of the player or similar stuff.
Will add the cursor-positioning in the next version
Reply With Quote
  #9  
Old 02-10-2008, 03:42 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
The function for the "chatinput" thing is protected and only works for privileged scripts, so that you cannot easily send a toall in the name of the player or similar stuff.
Will add the cursor-positioning in the next version
Just take things like this out I guess? I would really like to see such a function.
Reply With Quote
  #10  
Old 02-10-2008, 04:21 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Stefan View Post
The function for the "chatinput" thing is protected and only works for privileged scripts, so that you cannot easily send a toall in the name of the player or similar stuff.
Will add the cursor-positioning in the next version
Just make a global IRC script added on login that you can use on any server on their IRC, or you could make guild IRC, etc.
__________________
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 06:02 AM.


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