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 02-14-2007, 05:40 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
GuiWindowCtrl & ShowText

Hi,

i tried the following:

I made a GuiWindowCtrl and made ShowText to display some text on it
well, now the problem is:
the window is actually over the text, so the text is "grayed out"(window is transparent )

any way to fix this?
Reply With Quote
  #2  
Old 02-14-2007, 07:07 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
I found this problem too, you need to use the new GuiTextCtrl/GuiMLTextCtrl.
Use the visible toggle if you need to display it after an action.
Reply With Quote
  #3  
Old 02-14-2007, 09:48 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Showtext displays an image object on the graal level. if you want it in a gui, you need a gui object, as chandler stated.
__________________
Reply With Quote
  #4  
Old 02-14-2007, 10:19 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
yeye, i just think there should be a option to make imgobject > gui
or stefan should add a drawText to GuiDrawingPanel
Reply With Quote
  #5  
Old 02-14-2007, 11:08 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by projectigi View Post
yeye, i just think there should be a option to make imgobject > gui
or stefan should add a drawText to GuiDrawingPanel
umm.. GuiShowImgCtrl, has the properties of an img, its exactly that
__________________
Reply With Quote
  #6  
Old 02-15-2007, 06:16 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Quote:
Originally Posted by Kristi View Post
umm.. GuiShowImgCtrl, has the properties of an img, its exactly that
yeah but thats a gui ctrl not a showtext/image obj
Reply With Quote
  #7  
Old 02-15-2007, 06:24 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by projectigi View Post
yeah but thats a gui ctrl not a showtext/image obj
It's used as the same... you can do anything you wanted to do with showtext//image// with GuiShowImgCtrl/GuiTextCtrl or GuiMLTextCtrl.
Reply With Quote
  #8  
Old 02-15-2007, 06:38 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
nope

you cant overwrite it by drawing another image of the same index
you cant just say hideimg and its gone
Reply With Quote
  #9  
Old 02-15-2007, 06:43 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by projectigi View Post
nope

you cant overwrite it by drawing another image of the same index
you cant just say hideimg and its gone
You don't know how to edit a gui? [Or name one...?]
You don't know how to destroy a gui profile?
Reply With Quote
  #10  
Old 02-15-2007, 07:56 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by projectigi View Post
nope

you cant overwrite it by drawing another image of the same index
you cant just say hideimg and its gone


You really need to learn about GS2 GUI Controls.
Reply With Quote
  #11  
Old 02-15-2007, 08:16 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by projectigi View Post
nope

you cant overwrite it by drawing another image of the same index
you cant just say hideimg and its gone
But if you edit the text/options/position of the object, it will be the same as overwriting.
To get rid of it you can either set visible to false or destroy it. (I recommend the former, especially if you want to use it again).
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #12  
Old 02-15-2007, 09:25 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
GuiShowImgCtrl works like a showimg/findimg, only showing/hidding, position and size are defined differently. But you can display everything that can be displayed with a showimg/findimg.
Reply With Quote
  #13  
Old 02-16-2007, 12:17 AM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
whoa....

how you get called "stupid" when you just ask for a way to make something without using own functions...

see, i'm just lazy, thats why i like using premade functions instead of making own functions
Reply With Quote
  #14  
Old 02-16-2007, 12:31 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by projectigi View Post
whoa....

how you get called "stupid" when you just ask for a way to make something without using own functions...

see, i'm just lazy, thats why i like using premade functions instead of making own functions
Wrong thread?
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #15  
Old 02-16-2007, 12:42 AM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by projectigi View Post
whoa....

how you get called "stupid" when you just ask for a way to make something without using own functions...

see, i'm just lazy, thats why i like using premade functions instead of making own functions
theyre pretty "premade", just use the "premade" function to destroy the gui object
__________________
Reply With Quote
  #16  
Old 02-16-2007, 01:58 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
GUIOBJECT.destroy()

How hard can it be?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #17  
Old 02-17-2007, 01:22 AM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
....
i know how to create/destroy gui controls, thanks.

for example:

a Server wants to show a Text on the Screen that tells you the current Area
like "Online Start Local" "Kokiri Town" etc
now it sucks if you have to make a own guicontrol for every text you ever want to display on the screen, because showtext has no function to make it appear over gui controls
Reply With Quote
  #18  
Old 02-17-2007, 02:15 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by projectigi View Post
....
a Server wants to show a Text on the Screen that tells you the current Area
like "Online Start Local" "Kokiri Town" etc
now it sucks if you have to make a own guicontrol for every text you ever want to display on the screen, because showtext has no function to make it appear over gui controls
You can do this with only one GuiShowImgCtrl easily (which can also reside within any other GuiControl):

Here's something simple...
PHP Code:
//#CLIENTSIDE
function onCreated() {
  if (
LevelText != null) {
    
LevelText.destroy();
  }
  new 
GuiShowImgCtrl(LevelText) {
    
100;
    
text player.level.name;
  }
}

function 
onPlayerEnters() {
  
LevelText.text player.level.name;

__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #19  
Old 02-17-2007, 02:31 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 projectigi View Post
....
i know how to create/destroy gui controls, thanks.

for example:

a Server wants to show a Text on the Screen that tells you the current Area
like "Online Start Local" "Kokiri Town" etc
now it sucks if you have to make a own guicontrol for every text you ever want to display on the screen, because showtext has no function to make it appear over gui controls
GuiMLTextCtrl.

showimg() basically just does this:

NPC Code:
function showimg(ti, tf, tx, ty) {
new TShowimg("showimg" @ ti) {
x = tx;
y = ty;
image = tf;
}
}

__________________
Do it with a DON!
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 08:43 PM.


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