From Unreal Wiki, The Unreal Engine Documentation Site
|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
− | | + | #REDIRECT [[Project:Scratchpad]] |
− | | + | |
− | <uscript>
| + | |
− | class MyGUITabPanel extends GUITabPanel;
| + | |
− | | + | |
− | | + | |
− | | + | |
− | var string Button1;
| + | |
− | | + | |
− | var float ButtonTop,
| + | |
− | ButtonLeft;
| + | |
− | var float ButtonWidth;
| + | |
− | var float ButtonHeight;
| + | |
− | | + | |
− | function InitComponent(GUIController MyController, GUIComponent MyOwner)
| + | |
− | {
| + | |
− | Super.Initcomponent(MyController, MyOwner);
| + | |
− | // Button 1
| + | |
− | Controls[0].WinTop = ButtonTop;
| + | |
− | Controls[0].WinLeft = ButtonLeft;
| + | |
− | Controls[0].WinWidth = ButtonWidth;
| + | |
− | Controls[0].WinHeight = ButtonHeight;
| + | |
− | Controls[0].OnClick = internalOnClick;
| + | |
− | }
| + | |
− | }
| + | |
− | | + | |
− | function bool InternalOnClick(GUIComponent Sender)
| + | |
− | {
| + | |
− | local MyPlayerController MPC;
| + | |
− | if(Sender==Controls[0])
| + | |
− | {
| + | |
− | //Here shoult MyFunction in MyPlayerController (extending xPlayer) be executed!
| + | |
− | MPC=MyPlayerController(PlayerOwner());
| + | |
− | MPC.MyFunction(1);
| + | |
− | }
| + | |
− | return true;
| + | |
− | }
| + | |
− | | + | |
− | defaultproperties
| + | |
− | {
| + | |
− |
| + | |
− | Begin Object Class=GUIButton name=Button1
| + | |
− | Caption="Button1"
| + | |
− | StyleName="MidGameButton"
| + | |
− | End Object
| + | |
− | Controls(0)=GUIButton'Button1'
| + | |
− | | + | |
− | ButtonWidth=0.375
| + | |
− | BuyButtonWidth=0.055
| + | |
− | ButtonHeight=0.055
| + | |
− | ButtonTop=0.05
| + | |
− | ButtonLeft=0.025
| + | |
− | bAcceptsInput=false
| + | |
− | }
| + | |
− | | + | |
− | put it here
| + | |
− | </uscript>
| + | |
− | | + | |
− | '''Will:''' MISSED! ;) I beleive you are looking for [[Legacy:ScratchPad|ScratchPad]] (note the capitalisation)
| + | |
Latest revision as of 02:06, 29 April 2008