Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-12-2007, 07:50 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Gui Profiles

Well, here's what I did. From this script you'll see how to draw gui profiles in many different ways. Have fun!

HTML Code:
//#CLIENTSIDE
function onCreated()
{
  seteffect(0, 0, 0, 1);
  
  scheduleevent(0.5, "drawMENU", "");
}

function ondrawMENU()
{ 
  new GuiWindowCtrl("loginMain") 
  {
    useownprofile = true;
    profile.bitmap = "c_guibackground_bank.png";
    
    width = 200;
    height = 150;
    
    //Used a public function here, just returns the center position from the window width and height
    temp.windowData = core.getCenter(loginMain.width, loginMain.height);    
    
    x = temp.windowData[0];
    y = temp.windowData[1];
    
    new GuiMLTextCtrl("loginText") 
    {
      useownprofile = true;
      with (profile)
      {
        fontcolor = {255, 255, 255, 255};
        fontSize = 30;
        fontStyle = "b";
        fontType = "Impact";
        shadowColor = {25, 25, 25, 255};
        shadowOffset = {2, 2};
        textShadow = true;
      }
      x = 33;
      y = 25;
      width = 180;
      height = 60;
      text = "Vendict Login";
    }

    temp.textEdits = {
      {"accountName", "Account Name", {
        {"fillColor", "{80, 180, 102, 50}"},
        {"fontColor", "{255, 255, 255, 255}"},
        {"fontType", "Arial"},
        {"fontStyle", "b"},
        {"fontSize", 15},
        {"shadowOffset", "{2, 2}"},
        {"textShadow", true},
        {"opaque", true}
      }, 15, 55, 170, 20},
      
      {"accountPassword", "Account Password", {
        {"fillColor", "{80, 180, 102, 50}"},
        {"fontColor", "{255, 255, 255, 255}"},
        {"fontType", "Arial"},
        {"fontStyle", "b"},
        {"fontSize", 15},
        {"shadowOffset", "{2, 2}"},
        {"textShadow", true},
        {"opaque", true}
      }, 15, 80, 170, 20}
    };
    for (temp.currentBox: temp.textEdits)
    {
      new GuiTextEditCtrl(temp.currentBox[0]) 
      {
        useownprofile = true;
        text = temp.currentBox[1];
        with(profile)
        {
          for (temp.currentControl: temp.currentBox[2])
          {
            (@ temp.currentControl[0]) = (@ temp.currentControl[1]);
          }
        }
        x = temp.currentBox[3];
        y = temp.currentBox[4];
        width = temp.currentBox[5];
        height = temp.currentBox[6];
      }
    }
    new GuiMLTextCtrl("playText") 
    {
      useownprofile = true;
      profile.fontcolorlink = {0, 255, 0, 55};
      profile.fontSize = 30;
      profile.fontStyle = "b";
      profile.fontType = "Impact";
      profile.shadowColor = {25, 25, 25, 255};
      profile.shadowOffset = {2, 2};
      profile.textShadow = true;

      x = 53;
      y = 100;
      width = 180;
      height = 60;

      //Remember this part!
      text = "<a href=doAction>Play Now</a>";
    }      
  }
}

//Remember the  "<a href=doAction>" part? Here's that function process!
function playText.onURL(urlName)
{
  if (temp.urlName == "doAction")
  {
    echo("Doing the login process!");
  }
}
Here's a snapshot and the gui profile I used!
Attached Thumbnails
Click image for larger version

Name:	vendictLogin.png
Views:	396
Size:	8.7 KB
ID:	41583  
Attached Images
 
__________________
Reply With Quote
  #2  
Old 06-13-2007, 04:01 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
cool, but i don't like the slanted corners everyone uses >
but nice job
__________________
**FLIP OUT**
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:52 AM.


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