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 03-26-2011, 09:00 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Playerworld Script Uploading Problem

Hello,

I am trying to upload a GUI to my playerworld (Dev mrnothersan). I am trying to add GuiWindowCtrl. I have tried adding a new class and naming it "gui" and then putting the script from here: http://wiki.graal.net/index.php/Crea.../GuiWindowCtrl in there but when I log into my playerworld, it doesn't work.

The script I have added in Classes is:

NPC Code:

new GuiWindowCtrl("Test_Window") {
profile = GuiBlueWindowProfile;
x = 10;
y = 10;
width = 160;
height = 80;
text = "Window";
}



I have not touched anything else. Do I have to upload the PNG image of it or something?

Please explain to me how to add a gui from here: http://wiki.graal.net/index.php/Crea...F_Object_Types

Thanks
mrnothersan
Reply With Quote
  #2  
Old 03-26-2011, 09:03 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
You need to actually make that code run. Putting code in a class doesn't do anything by itself.

Put this in a weapon:

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  
player.chat "Whoa, 'tis workin'!";

And add that weapon to your player. When you fire the weapon your chat should change.

Now, just replace that line in the middle with your GUI-creating code, and it should create.
Reply With Quote
  #3  
Old 03-26-2011, 09:06 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Quote:
Originally Posted by WhiteDragon View Post
You need to actually make that code run. Putting code in a class doesn't do anything by itself.

Put this in a weapon:

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  
player.chat "Whoa, 'tis workin'!";

And add that weapon to your player. When you fire the weapon your chat should change.

Now, just replace that line in the middle with your GUI-creating code, and it should create.
Hi

Thanks for your reply.
It is not a weapon we want to add. We would like to add the GuiWindowCtrl GUI to our playerworld so when you log into the playerworld it opens automatically with some "Welcome" text in.

Thanks
mrnothersan
Reply With Quote
  #4  
Old 03-26-2011, 09:11 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by mrnothersan View Post
It is not a weapon we want to add. We would like to add the GuiWindowCtrl GUI to our playerworld so when you log into the playerworld it opens automatically with some "Welcome" text in.
Then simply change onWeaponFired to onCreated, and make sure everyone gets that weapon when they login.

Putting code in a class doesn't do anything at all. To use a class, you need to join the class to a weapon or NPC. You can think of your classes as a library of useful snippets of code.

Basically, you need to start everything in a weapon or NPC, and you can pull stuff from classes inside the weapon or NPC.
Reply With Quote
  #5  
Old 03-26-2011, 09:13 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by mrnothersan View Post
Hi

Thanks for your reply.
It is not a weapon we want to add. We would like to add the GuiWindowCtrl GUI to our playerworld so when you log into the playerworld it opens automatically with some "Welcome" text in.

Thanks
mrnothersan
You will still need an event to run it...

For the class, put that code in a function like
PHP Code:
public function drawGUI() {
//that code goes here

then, have a weapon every player has. You can use it's clientside onCreated to draw the gui,

PHP Code:
function onCreated()
  
this.join("yourclassgoeshere");
//#CLIENTSIDE
function onCreated() {
  
drawGUI(); //calls function in class

You need events to execute your scripts
Reply With Quote
  #6  
Old 03-26-2011, 09:14 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Quote:
Originally Posted by WhiteDragon View Post
Then simply change onWeaponFired to onCreated, and make sure everyone gets that weapon when they login.

Putting code in a class doesn't do anything at all. To use a class, you need to join the class to a weapon or NPC. You can think of your classes as a library of useful snippets of code.

Basically, you need to start everything in a weapon or NPC, and you can pull stuff from classes inside the weapon or NPC.
Hey

This is the code I have in Classes:

PHP Code:
public function drawGUI() {
new 
GuiWindowCtrl("Test_Window") {
  
profile GuiBlueWindowProfile;
  
10;
  
10;
  
width 160;
  
height 80;
  
text "Window";

Where do I put this code:

PHP Code:
function onCreated()
  
this.join("yourclassgoeshere");
//#CLIENTSIDE
function onCreated() {
  
drawGUI(); //calls function in class

Thanks
Reply With Quote
  #7  
Old 03-26-2011, 09:36 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by mrnothersan View Post
Where do I put this code:
PHP Code:
function onCreated()
  
this.join("yourclassgoeshere");
//#CLIENTSIDE
function onCreated() {
  
drawGUI(); //calls function in class

In a weapon.
Reply With Quote
  #8  
Old 03-26-2011, 09:47 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
It is not a weapon I need though. I have seen playerworlds that when you enter it just appears with the message in the GuiWindowCtrl.

Thanks
Reply With Quote
  #9  
Old 03-26-2011, 09:59 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Weapon scripts run without firing the weapon. It just depends on what function the code is in. If the code is in onCreated it will run whether you fire the weapon manually or not.
Reply With Quote
  #10  
Old 03-26-2011, 10:05 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Hi

Thanks for your reply.
I don't really understand what you mean. Can you tell me in simple terms how to add this Gui: http://wiki.graal.net/index.php/File...rol_window.png to my playerworld so it appears when everyone logs into it.

I have gone onto the wiki and found this script for that gui:

NPC Code:
new GuiWindowCtrl("Test_Window") {
profile = GuiBlueWindowProfile;
x = 10;
y = 10;
width = 160;
height = 80;
text = "Window";
}



MN
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #11  
Old 03-26-2011, 10:14 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
See my first reply to the thread. If you can figure out how to make it pop up when you fire the weapon, it's very easy to change it so it always pops up when you login.
Reply With Quote
  #12  
Old 03-26-2011, 10:15 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Ok will try that..How do I put the script in the weapon? Do I put the weapon in graal editor and add it into the npc?
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #13  
Old 03-26-2011, 10:15 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
OK so, in order for that code to be executed, you need a function/event. Functions and events need to be called.

Say you want to have this executed,'
PHP Code:
echo("I'm a snippet!"); 
You can place this in an event. Events are called when certain criteria are met. For instance, function onCreated() is called when the script is first created. For clients, this is every time you login. There are others like function onWeaponFired() which is called whenever you press D while the weapon is selected.

Classes, unlike weapons, cannot operate by themselves. They need to be joined to an object in order to function. This can things like weapons, temporary NPCs or even the player object. This is why we say you need a weapon. A weapon is truly the easiest way for your GUI to work. It's possible to have the class join the player object (thus negating the need for the weapon) but it seems this is quite beyond your technical level at the moment.

You should take a moment to really understand the language before diving into complex operations. Try reading the tutorials section at http://wiki.graal.net/index.php/Creation/Dev/GScript

To utilise the weapon method, create a weapon in RC and add the GUI script to the onCreated event. Next, add an entry in the onActionPlayerOnline to check whether the player has the weapon. If not, add it to them.
Reply With Quote
  #14  
Old 03-26-2011, 10:16 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Thanks Twinny, will research a bit more.
Please look at my ip ranges thread also.

MN
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #15  
Old 03-26-2011, 11:01 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
A weapon is not necessarily a weapon. In most cases you will have system "weapons" in addition to normal weapons.

Weapons whose names start with a dash aren't shown in the player's inventory (if you have a custom inventory, you can name them differently, of course).

Assuming you don't have a custom inventory, you'll want to create a weapon named something like -LoginWindow and place this code in it:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  new 
GuiWindowCtrl("MyWindow") {
    
profile GuiBlueWindowProfile;
  
    
width 200;
    
height 200;
    
    
text "Window";
  }

Now if you open your player's attributes and add -LoginWindow to yourself, you'll see that every time you login the window opens automatically.

Classes are a freak of GScript. I don't know a way to compare them to any other language. Since GS2 doesn't have actual class support (inheritance, custom objects, etc), classes allow you to reuse code. When you join a class to a weapon, it's essentially copying and pasting the code inside the class into the weapon so you can use any of the code in the class in that weapon.

The only way to actually run code on clientside (excepting level NPCs and DB NPCs) is with a weapon. Since DB NPCs and level NPCs are stuck to a single level, if you want to do anything clientside you will want to use a weapon.

An explanation of clientside/serverside:

Quote:
Originally Posted by cbk1994 View Post
There are essentially two different ways you script: on serverside, or on clientside. If a script is serverside, it means that the NPC-server interprets and performs the code. The advantage to this is that you know the code can't be tamperered with. If the code is clientside, it means that it is ran on the computer of the player. This has the advantage of being faster and not requiring communication with the server, but has the disadvantage of being less secure.

Since serverside is not performed for a specific player it cannot display interface graphics (HUDs, etc). It also can't handle player chat events, among others.
If you haven't seen it already, this video can be helpful in explaining NC a bit:



There are a lot of things I would change in the video now but it might be useful. Maybe I should do a follow-up of it.

Let me know if there's anything you don't understand.
__________________
Reply With Quote
  #16  
Old 03-27-2011, 09:53 AM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
How do I create a weapon?
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #17  
Old 03-27-2011, 03:05 PM
BioWare BioWare is offline
Registered User
Join Date: Mar 2011
Location: Netherlands
Posts: 36
BioWare is on a distinguished road
Quote:
Originally Posted by mrnothersan View Post
How do I create a weapon?
Study this

Reply With Quote
  #18  
Old 04-02-2011, 04:06 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Hello,

Thanks for all your advice.

This is the code I have in the weapon:

PHP Code:
function onCreated()
  
this.join("testgui");
//#CLIENTSIDE
function onCreated() {
  
drawGUI();

This is the code I have in the class:

PHP Code:
public function drawGUI() {
new 
GuiWindowCtrl("Test_Window") {
  
profile GuiBlueWindowProfile;
  
10;
  
10;
  
width 160;
  
height 80;
  
text "Window";
}

What I want it to do is the Gui Control Window to appear when I log into my playerworld.
I have uploaded the image of the gui to levels/images and set the weapon icon to the gui filename.

Hope you can give me some advice

Thanks
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #19  
Old 04-02-2011, 05:20 PM
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
You need //#CLIENTSIDE in your class script too.
__________________
Quote:
Reply With Quote
  #20  
Old 04-02-2011, 07:00 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Quote:
Originally Posted by fowlplay4 View Post
You need //#CLIENTSIDE in your class script too.
Added that.
My classes script now looks like this:

PHP Code:
//#CLIENTSIDE
public function drawGUI() {
new 
GuiWindowCtrl("Test_Window") {
  
profile GuiBlueWindowProfile;
  
10;
  
10;
  
width 160;
  
height 80;
  
text "Window";
}

It is giving errors also in Remote Control.
Here are the errors

NPC Code:

Script testgui updated by mrnothersan
Script: Function addtiledef not found at line 3 in script of npcs[2] (in level building_edittest.nw at pos (33, 40))
Script: Function putnpc not found at line 3 in script of npcs[1] (in level building_edittest.nw at pos (3, 29))



Please advise on what I am doing wrong.
Thanks
Dominic
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #21  
Old 04-02-2011, 07:30 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by mrnothersan View Post
HTML Code:
Script testgui updated by mrnothersan
Script: Function addtiledef not found at line 3 in script of npcs[2] (in level building_edittest.nw at pos (33, 40))
Script: Function putnpc not found at line 3 in script of npcs[1] (in level building_edittest.nw at pos (3, 29))
you doinng nothing wrong, those are errors from level-npcs.
if you read what it is saying, it's pretty clear and common'sense to assume it's a levelnpc error

somehow, i'm doubting that you are learning anything from this, if your posting every little thing that you think is wrong, stop relying on others to fix your issues if you want to learn anything.
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you

Last edited by Deas_Voice; 04-02-2011 at 07:32 PM.. Reason: code tags are such horrible tag
Reply With Quote
  #22  
Old 04-02-2011, 07:37 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Okay,
So why doesn't my gui appear when I log into my world?

Regards
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #23  
Old 04-02-2011, 08:01 PM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
are you adding the weapon to the player(s)?
__________________
Reply With Quote
  #24  
Old 04-02-2011, 08:10 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Quote:
Originally Posted by salesman View Post
are you adding the weapon to the player(s)?
How would I do that?
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #25  
Old 04-02-2011, 08:18 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 mrnothersan View Post
How would I do that?
Add to Control-NPC script:

PHP Code:
function onActionPlayerOnline() { // this is called every time a player logs on
  
player.addWeapon("MyWeaponName");

__________________
Reply With Quote
  #26  
Old 04-02-2011, 08:25 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Quote:
Originally Posted by cbk1994 View Post
Add to Control-NPC script:

PHP Code:
function onActionPlayerOnline() { // this is called every time a player logs on
  
player.addWeapon("MyWeaponName");

Great!!
Thanks so much it worked!!
How do I add text inside the GUI?

Regards
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #27  
Old 04-02-2011, 08:33 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 mrnothersan View Post
Great!!
Thanks so much it worked!!
How do I add text inside the GUI?

Regards
Add a GuiTextCtrl (or GuiMLTextCtrl) inside it.
__________________
Reply With Quote
  #28  
Old 04-02-2011, 08:43 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Quote:
Originally Posted by cbk1994 View Post
Add a GuiTextCtrl (or GuiMLTextCtrl) inside it.
Thank you.
Last thing, how do I add multiple lines of text?

Thanks
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #29  
Old 04-02-2011, 08:50 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 mrnothersan View Post
Thank you.
Last thing, how do I add multiple lines of text?

Thanks
Use <br> to separate multiple lines inside a GuiMLTextCtrl.

PHP Code:
text "line one<br>line two<br>line three"
\n might also work, I don't recall.
__________________
Reply With Quote
  #30  
Old 04-02-2011, 08:50 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
Ahh, yes found that out...thanks for all your help!!!
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #31  
Old 04-02-2011, 09:04 PM
mrnothersan mrnothersan is offline
Owner of MrNothersan
Join Date: Mar 2011
Location: On the Computer
Posts: 97
mrnothersan is an unknown quantity at this point
Send a message via AIM to mrnothersan Send a message via MSN to mrnothersan
I have also added a GuiTabCtrl. How do I add text inside the different tabs so each tab is different?

Last question on this, I promise!
__________________

Regards
MrNothersan - Playerworld owner


Staff Hirings Thread for MrNothersan: http://forums.graalonline.com/forums....php?p=1639180

Reply With Quote
  #32  
Old 04-02-2011, 09:19 PM
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
Quote:
Originally Posted by mrnothersan View Post
I have also added a GuiTabCtrl. How do I add text inside the different tabs so each tab is different?

Last question on this, I promise!
http://wiki.graal.net/index.php/Crea...d_Window_Panes
__________________
Quote:
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 10:40 PM.


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