Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Help me with GUI (https://forums.graalonline.com/forums/showthread.php?t=87430)

Mattehy 08-16-2009 09:15 PM

Help me with GUI
 
Hello im having problems the gui i cant get it to work can anyone post a GUI script or a link to one it will be great help. Thank you. (Note: I cant get it to stay in the corner >_<)

Programmer 08-16-2009 09:19 PM

Perhaps it would be best if you provided the script that you're having trouble with? I can provide the code for a simple window if that's what you need:

PHP Code:

//#CLIENTSIDE
function onCreated()
{
  new 
GuiWindowCtrl("your_window")
  {
    
profile GuiBlueWindowProfile;
    
position = {100100};
    
extent = {200200};
    
    
title "My window!";
  }


It may benefit you to look at the GuiControl section of the wiki:
http://wiki.graal.net/index.php/Crea...iControls_List
It may also benefit you to use proper English, with correct grammar and punctuation.

Mattehy 08-16-2009 09:49 PM

Yes thats all very nice but, i would like a image like showimg(1,"gui.png",x,y); in the corner no window. Do know how to do that and keep it in the corner when you move?

Chompy 08-16-2009 09:54 PM

well

showimg(200, "gui.png", 0, 0).layer = 4;

would do that :- )

Mattehy 08-16-2009 09:59 PM

with a setTimer(0.05); and Function onTimeOut()?

Mattehy 08-16-2009 09:59 PM

yes it works :D ty ty ty <3

Mattehy 08-16-2009 10:02 PM

also how do i hide everything but my player and other players and textbar

Mattehy 08-16-2009 10:04 PM

PHP Code:

//#CLIENTSIDE
function GraalControl.onResize(nxny)
{
showimg(200"gui.png"00).layer 4;


is this correct?

cbk1994 08-16-2009 10:16 PM

Quote:

Originally Posted by Mattehy (Post 1515325)
also how do i hide everything but my player and other players and textbar

showstats(1024);

Mark Sir Link 08-16-2009 10:18 PM

Quote:

Originally Posted by Mattehy (Post 1515325)
also how do i hide everything but my player and other players and textbar

showstats(0x400);

DustyPorViva 08-16-2009 10:20 PM

Quote:

Originally Posted by Mattehy (Post 1515327)
PHP Code:

//#CLIENTSIDE
function GraalControl.onResize(nxny)
{
showimg(200"gui.png"00).layer 4;


is this correct?

May as well just put the whole GUI in a timeout as you're going to be doing more updates such as health and all anyways.

Mattehy 08-16-2009 10:37 PM

thanks guys xD now all i need is the hp bar script so it goes down when i lose health if u can help their 2 xD

Mark Sir Link 08-16-2009 10:44 PM

Try creating a progress bar and attaching health to that.

PHP Code:

new GuiProgressCtrl("GUI_HealthBar") {
  
profile GuiBlueProgressProfile;
  
10;
  
10;
  
height 10;
  
width 100;
  
progress playerr.health;


resize and place as necessary.

Crow 08-16-2009 10:53 PM

You can find a class which creates easily managable status bars here :D Implementation and usage might be a bit wonky, but I didn't bother working things out yet :p

Mattehy 08-16-2009 10:55 PM

also what is the command to show a image when another player is in observer?
and the image of the player's selected NPC and crow thanks but i want something much simpler.

Programmer 08-16-2009 11:28 PM

Quote:

Originally Posted by Mattehy (Post 1515349)
also what is the command to show a image when another player is in observer?
and the image of the player's selected NPC and crow thanks but i want something much simpler.

Just set the first parameter (200 in most of these cases) with a number below 200.

Mark Sir Link 08-17-2009 12:04 AM

http://wiki.graal.net/index.php/Crea.../Script/Client

ctrl + f, showstats.

Mattehy 08-17-2009 02:13 AM

Quote:

Originally Posted by Programmer (Post 1515352)
Just set the first parameter (200 in most of these cases) with a number below 200.

what does this mean? how do i hide the nickname of a player? and also when you die it says dead and a black screen comes how do i remove that aswell.


All times are GMT +2. The time now is 07:20 PM.

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