Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-14-2009, 05:56 PM
Schetti Schetti is offline
SC2 Player
Schetti's Avatar
Join Date: Nov 2008
Location: Austria
Posts: 269
Schetti is on a distinguished road
News-Window

I hope you like this news window.
You can list News/Updates, Hiring infos and currently staffs.
Thats my first post, so dont bee too hard.

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
ExampleWindow = new GuiWindowCtrl("ExampleWindow");
  
  
with (ExampleWindow)
  {
    
profile     "GuiBlueWindowProfile";
    
position    "562 225";
    
extent      "545 555";
    
canMove     true;
    
canResize   false;
    
canMaximize false;
    
canClose    true;
    
tile        true;
    
text        "News";
    
    new 
GuiControl(NewsTab)
    {
      
visible    false;
      
profile    "GuiBlueControlProfile";
      
position   "7.5 52";
      
extent     "531 495";
      
    new 
GuiScrollCtrl("MyGUI_MultiLine1_Scroll") {
      
profile GuiBlueScrollProfile;
      
height 800;
      
hscrollbar "dynamic";
      
vscrollbar "dynamic";
      
width 800;
      
1;

      new 
GuiMLTextCtrl("MyGUI_MultiLine1") {
        
profile GuiBlueMLTextProfile;
        
height 16;
        
horizsizing "width";
        
text " News here";                                        

        
width 518;
       }
      };
    };
    
    new 
GuiControl(HiringsTab)
    {
      
visible    false;
      
profile    "GuiBlueControlProfile";
      
position   "7.5 52";
      
extent     "531 495";
      
    new 
GuiScrollCtrl("MyGUI_MultiLine2_Scroll") {
      
profile GuiBlueScrollProfile;
      
height 800;
      
hscrollbar "dynamic";
      
vscrollbar "dynamic";
      
width 800;
      
1;

      new 
GuiMLTextCtrl("MyGUI_MultiLine2") {
        
profile GuiBlueMLTextProfile;
        
height 16;
        
horizsizing "width";
        
text "Hiring datas here";                                        

        
width 518;
      }
    };
   };
    
    new 
GuiControl(StaffsTab)
    {
      
visible    false;
      
profile    "GuiBlueControlProfile";
      
position   "7.5 52";
      
extent     "531 495";
      
    new 
GuiScrollCtrl("MyGUI_MultiLine3_Scroll") {
      
profile GuiBlueScrollProfile;
      
height 800;
      
hscrollbar "dynamic";
      
vscrollbar "dynamic";
      
width 800;
      
1;

      new 
GuiMLTextCtrl("MyGUI_MultiLine3") {
        
profile GuiBlueMLTextProfile;
        
height 16;
        
horizsizing "width";
        
text "Staff list here";                                        

        
width 518;
       }
      };
    };
    
    new 
GuiTabCtrl(ExampleTabs)
    {
      
profile   "GuiBlueTabProfile";
      
position  "10 28";
      
extent    "300 24";
      
      
clearRows();
      
with (addRow(0"News"))
      {
        
this.pane NewsTab;
      }
      
with (addRow(1"Hirings"))
      {
        
this.pane HiringsTab;
      }
      
with (addRow(2"Staffs"))
      {
        
this.pane StaffsTab;
      }
      
      
thiso.catchevent(name"onSelect""onTabSelect");
    };
  };
  
ExampleTabs.setSelectedById(0);
  
GraalControl.addControl(ExampleWindow);
}

function 
onTabSelect(tabs)
{
  for (
temp.tabtemp.tabs.rows)
  {
    if (
temp.tab.pane == null)
    {
      continue;
    }
    
    if (
temp.tab == temp.tabs.selected)
    {
      
temp.tab.pane.show();
    }
    else
    {
      
temp.tab.pane.hide();
    }
  }

__________________
“Peace cannot be kept by force. It can only be achieved by understanding.” – Albert Einstein
Reply With Quote
 


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:02 AM.


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