All pastes #907836 Raw Edit

Untitled

public lua v1 · immutable
·published 2008-02-17 22:36 UTC
rendered paste body
local resourceRoot = getResourceRootElement(getThisResource())local testWindow = nillocal x,y = guiGetScreenSize()function resourceStart()	testWindow = guiCreateWindow( (x/2)-(x/2.7), (y/2)-(y/2.6), 600, 450, "test panel", false )		guiSetText( testWindow, "test panel" )		guiWindowSetSizable( testWindow, false )		guiSetVisible( testWindow, true )		testPanel = guiCreateTabPanel( 0, 0.06, 1, 1, true, testWindow )	testTab = guiCreateTab( "Main", testPanel )endaddEventHandler ( "onClientResourceStart", resourceRoot, resourceStart )function resourceStop()endaddEventHandler ( "onClientResourceStop", resourceRoot, resourceStop )function deleteTabOnClick ()	if ( getKeyState ( "lctrl" ) == true ) then		guiDeleteTab ( testTab )		outputChatBox ( "clicked" ) -- this won't show in chatbox. If i comment out "guiDeleteTab", it does	endendaddEventHandler ( "onClientGUIClick", resourceRoot, deleteTabOnClick  )