Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PVBuilderCmdWnd extends UICommonAPI; // only ride
- var string m_WindowName;
- var WindowHandle Me;
- var EditBoxHandle RideId_EditBox;
- var ButtonHandle Ride_button;
- function OnLoad()
- {
- local string pawnViewerMode;
- SetClosingOnESC();
- Me = GetWindowHandle( "PVBuilderCmdWnd" );
- if(GetINIString("URL", "L2PawnViewerMode", pawnViewerMode, "l2.ini"))
- {
- Me.SetWindowTitle("BuilderCommand" @ "(" $ pawnViewerMode $ ")");
- }
- Ride_button = GetButtonHandle( m_WindowName$".Ride_button" );
- RideId_EditBox = GetEditBoxHandle( m_WindowName$".RideId_EditBox" );
- RideId_EditBox.SetString("13330");
- }
- function OnClickRefreshButton()
- {
- local string ride_id;
- ride_id = RideId_EditBox.GetString();
- ExecuteCommand("///ride id="$ride_id );
- }
- function OnClickButton( String a_ButtonID )
- {
- switch( a_ButtonID )
- {
- case "Ride_button":
- if( Ride_button.GetButtonName() == "Ride" )
- {
- ExecuteCommand("///ride_id=" @ RideId_EditBox.GetString());
- Ride_button.SetNameText( "Unride" );
- break;
- }
- else
- {
- ExecuteCommand( "///unride" );
- Ride_button.SetNameText( "Ride" );
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement