Arsilex Posted January 31, 2013 Share Posted January 31, 2013 in this: https://community.multitheftauto.com/ind ... ls&id=2136 not work good scrollbar or is my error i test it and in one grild not work PD: Sorry for me bad english Link to comment
TusCan Posted February 1, 2013 Share Posted February 1, 2013 Create Your Own Gui by using GUIeditor:https://community.multitheftauto.com/index.php?p=resources&s=details&id=141 Its Easy. Link to comment
Arsilex Posted February 1, 2013 Author Share Posted February 1, 2013 guieditor only create gui and dxtext and rectangle... but this resource create new dx (dxWindown,dxButton....) Link to comment
Castillo Posted February 1, 2013 Share Posted February 1, 2013 There was another one uploaded, you could try it. Link to comment
Arsilex Posted February 1, 2013 Author Share Posted February 1, 2013 you say dxGUI_v1? Link to comment
Castillo Posted February 1, 2013 Share Posted February 1, 2013 I'm not sure, there was another one, could be that one. Link to comment
Blaawee Posted February 2, 2013 Share Posted February 2, 2013 https://community.multitheftauto.com/ind ... ls&id=4871 this one is perfect i tried it before Link to comment
Arsilex Posted February 2, 2013 Author Share Posted February 2, 2013 https://community.multitheftauto.com/index.php?p=resources&s=details&id=4871this one is perfect i tried it before this is very hard to use Link to comment
Blaawee Posted February 3, 2013 Share Posted February 3, 2013 no it's not , it has an export functions : --[[ Exports ]]-- --[[ Shared ]]-- local dx = exports.dxGUI function dxCreateRootPane(...) return dx:dxCreateRootPane(...) end function dxGetRootPane(...) return dx:dxGetRootPane(...) end function dxRefreshThemes(...) return dx:dxRefreshThemes(...) end function dxGetTheme(...) return dx:dxGetTheme(...) end function dxGetDefaultTheme(...) return dx:dxGetDefaultTheme(...) end function dxGetPosition(...) return dx:dxGetPosition(...) end function dxGetSize(...) return dx:dxGetSize(...) end function dxGetVisible(...) return dx:dxGetVisible(...) end function dxGetElementTheme(...) return dx:dxGetElementTheme(...) end function dxGetFont(...) return dx:dxGetFont(...) end function dxGetColor(...) return dx:dxGetColor(...) end function dxGetColorCoded(...) return dx:dxGetColorCoded(...) end function dxGetText(...) return dx:dxGetText(...) end function dxGetAlpha(...) return dx:dxGetAlpha(...) end function dxSetPosition(...) return dx:dxSetPosition(...) end function dxSetSize(...) return dx:dxSetSize(...) end function dxSetVisible(...) return dx:dxSetVisible(...) end function dxSetElementTheme(...) return dx:dxSetElementTheme(...) end function dxSetFont(...) return dx:dxSetFont(...) end function dxSetColor(...) return dx:dxSetColor(...) end function dxSetColorCoded(...) return dx:dxSetColorCoded(...) end function dxSetText(...) return dx:dxSetText(...) end function dxSetAlpha(...) return dx:dxSetAlpha(...) end function dxMove(...) return dx:dxMove(...) end function dxRefreshStates(...) return dx:dxRefreshStates(...) end function dxRefreshClickStates(...) return dx:dxRefreshClickStates(...) end function guiAttachToDirectX(...) return dx:guiAttachToDirectX(...) end function dxGetAlwaysOnTop(...) return dx:dxGetAlwaysOnTop(...) end function dxSetAlwaysOnTop(...) return dx:dxSetAlwaysOnTop(...) end function dxGetZOrder(...) return dx:dxGetZOrder(...) end function dxSetZOrder(...) return dx:dxSetZOrder(...) end function dxBringToFront(...) return dx:dxBringToFront(...) end function dxMoveToBack(...) return dx:dxMoveToBack(...) end function dxDestroyElement(...) return dx:dxDestroyElement(...) end function dxDestroyElements(...) return dx:dxDestroyElements(...) end --[[ Button ]]-- function dxCreateButton(...) return dx:dxCreateButton(getThisResource(),...) end function dxButtonRender(...) return dx:dxButtonRender(...) end --[[ Checkbox ]]-- function dxCreateCheckBox(...) return dx:dxCreateCheckBox(getThisResource(),...) end function dxCheckBoxGetSelected(...) return dx:dxCheckBoxGetSelected(...) end function dxCheckBoxSetSelected(...) return dx:dxCheckBoxSetSelected(...) end function dxCheckBoxRender(...) return dx:dxCheckBoxRender(...) end --[[ Label ]]-- function dxCreateLabel(...) return dx:dxCreateLabel(getThisResource(),...) end function dxLabelGetScale(...) return dx:dxLabelGetScale(...) end function dxLabelGetHorizontalAlign(...) return dx:dxLabelGetHorizontalAlign(...) end function dxLabelGetVerticalAlign(...) return dx:dxLabelGetVerticalAlign(...) end function dxLabelSetScale(...) return dx:dxLabelSetScale(...) end function dxLabelSetHorizontalAlign(...) return dx:dxLabelSetHorizontalAlign(...) end function dxLabelSetVerticalAlign(...) return dx:dxLabelSetVerticalAlign(...) end function dxLabelRender(...) return dx:dxLabelRender(...) end --[[ Progressbar ]]-- function dxCreateProgressBar(...) return dx:dxCreateProgressBar(getThisResource(),...) end function dxProgressBarGetProgress(...) return dx:dxProgressBarGetProgress(...) end function dxProgressBarGetProgressPercent(...) return dx:dxProgressBarGetProgressPercent(...) end function dxProgressBarGetMaxProgress(...) return dx:dxProgressBarGetMaxProgress(...) end function dxProgressBarSetProgress(...) return dx:dxProgressBarSetProgress(...) end function dxProgressBarSetProgressPercent(...) return dx:dxProgressBarSetProgressPercent(...) end function dxProgressBarSetMaxProgress(...) return dx:dxProgressBarSetMaxProgress(...) end function dxProgressBarRender(...) return dx:dxProgressBarRender(...) end --[[ Radio button ]]-- function dxCreateRadioButton(...) return dx:dxCreateRadioButton(getThisResource(),...) end function dxRadioButtonGetSelected(...) return dx:dxRadioButtonGetSelected(...) end function dxRadioButtonGetGroup(...) return dx:dxRadioButtonGetGroup(...) end function dxRadioButtonSetSelected(...) return dx:dxRadioButtonSetSelected(...) end function dxRadioButtonSetGroup(...) return dx:dxRadioButtonSetGroup(...) end function dxRadioButtonRender(...) return dx:dxRadioButtonRender(...) end --[[ Scrollbar ]]-- function dxCreateScrollBar(...) return dx:dxCreateScrollBar(getThisResource(),...) end function dxScrollBarGetProgress(...) return dx:dxScrollBarGetProgress(...) end function dxScrollBarGetProgressPercent(...) return dx:dxScrollBarGetProgressPercent(...) end function dxScrollBarGetMaxProgress(...) return dx:dxScrollBarGetMaxProgress(...) end function dxScrollBarSetProgress(...) return dx:dxScrollBarSetProgress(...) end function dxScrollBarSetProgressPercent(...) return dx:dxScrollBarSetProgressPercent(...) end function dxScrollBarSetMaxProgress(...) return dx:dxScrollBarSetMaxProgress(...) end function dxScrollBarRender(...) return dx:dxScrollBarRender(...) end --[[ Spinner ]]-- function dxCreateSpinner(...) return dx:dxCreateSpinner(getThisResource(),...) end function dxSpinnerGetPosition(...) return dx:dxSpinnerGetPosition(...) end function dxSpinnerGetMin(...) return dx:dxSpinnerGetMin(...) end function dxSpinnerGetMin(...) return dx:dxSpinnerGetMin(...) end function dxSpinnerSetPosition(...) return dx:dxSpinnerSetPosition(...) end function dxSpinnerSetMin(...) return dx:dxSpinnerSetMin(...) end function dxSpinnerSetMin(...) return dx:dxSpinnerSetMin(...) end function dxSpinnerRender(...) return dx:dxSpinnerRender(...) end --[[ Static Image ]]-- function dxCreateStaticImage(...) return dx:dxCreateStaticImage(getThisResource(),...) end function dxCreateStaticImageSection(...) return dx:dxCreateStaticImageSection(...) end function dxStaticImageGetLoadedImage(...) return dx:dxStaticImageGetLoadedImage(...) end function dxStaticImageGetSection(...) return dx:dxStaticImageGetSection(...) end function dxStaticImageGetRotation(...) return dx:dxStaticImageGetRotation(...) end function dxStaticImageLoadImage(...) return dx:dxStaticImageLoadImage(...) end function dxStaticImageSetSection(...) return dx:dxStaticImageSetSection(...) end function dxStaticImageSetRotation(...) return dx:dxStaticImageSetRotation(...) end function dxStaticImageRender(...) return dx:dxStaticImageRender(...) end --[[ Window ]]-- function dxCreateWindow(...) return dx:dxCreateWindow(getThisResource(),...) end function dxWindowGetTitlePosition(...) return dx:dxWindowGetTitlePosition(...) end function dxWindowGetMovable(...) return dx:dxWindowGetMovable(...) end function dxWindowIsMoving(...) return dx:dxWindowIsMoving(...) end function dxWindowGetTitleVisible(...) return dx:dxWindowGetTitleVisible(...) end function dxWindowSetTitlePosition(...) return dx:dxWindowSetTitlePosition(...) end function dxWindowSetMovable(...) return dx:dxWindowSetMovable(...) end function dxWindowGetTitleVisible(...) return dx:dxWindowGetTitleVisible(...) end function dxWindowGetPostGUI(...) return dx:dxWindowGetPostGUI(...) end function dxWindowSetPostGUI(...) return dx:dxWindowSetPostGUI(...) end function dxWindowRender(...) return dx:dxWindowRender(...) end function dxWindowMoveControl(...) return dx:dxWindowMoveControl(...) end function dxWindowComponentRender(...) return dx:dxWindowComponentRender(...) end --[[ Listbox ]]-- function dxCreateList(...) return dx:dxCreateList(getThisResource(),...) end function dxListClear(...) return dx:dxListClear(...) end function dxListGetSelectedItem(...) return dx:dxListGetSelectedItem(...) end function dxListSetSelectedItem(...) return dx:dxListSetSelectedItem(...) end function dxListGetItemCount(...) return dx:dxListGetItemCount(...) end function dxListRemoveRow(...) return dx:dxListRemoveRow(...) end function dxListAddRow(...) return dx:dxListAddRow(...) end function dxListSetTitleShow(...) return dx:dxListSetTitleShow(...) end function dxListGetTitleShow(...) return dx:dxListGetTitleShow(...) end function dxListRender(...) return dx:dxListRender(...) end --[[ #Exports Parts ]]-- so here an example make it fast if you wana try it just download the resource that from the link i give it to you and change the resource name to : [ dxGUI ] and run it and create another client code with this codes alone --[[ Exports ]]-- --[[ Shared ]]-- local dx = exports.dxGUI function dxCreateRootPane(...) return dx:dxCreateRootPane(...) end function dxGetRootPane(...) return dx:dxGetRootPane(...) end function dxRefreshThemes(...) return dx:dxRefreshThemes(...) end function dxGetTheme(...) return dx:dxGetTheme(...) end function dxGetDefaultTheme(...) return dx:dxGetDefaultTheme(...) end function dxGetPosition(...) return dx:dxGetPosition(...) end function dxGetSize(...) return dx:dxGetSize(...) end function dxGetVisible(...) return dx:dxGetVisible(...) end function dxGetElementTheme(...) return dx:dxGetElementTheme(...) end function dxGetFont(...) return dx:dxGetFont(...) end function dxGetColor(...) return dx:dxGetColor(...) end function dxGetColorCoded(...) return dx:dxGetColorCoded(...) end function dxGetText(...) return dx:dxGetText(...) end function dxGetAlpha(...) return dx:dxGetAlpha(...) end function dxSetPosition(...) return dx:dxSetPosition(...) end function dxSetSize(...) return dx:dxSetSize(...) end function dxSetVisible(...) return dx:dxSetVisible(...) end function dxSetElementTheme(...) return dx:dxSetElementTheme(...) end function dxSetFont(...) return dx:dxSetFont(...) end function dxSetColor(...) return dx:dxSetColor(...) end function dxSetColorCoded(...) return dx:dxSetColorCoded(...) end function dxSetText(...) return dx:dxSetText(...) end function dxSetAlpha(...) return dx:dxSetAlpha(...) end function dxMove(...) return dx:dxMove(...) end function dxRefreshStates(...) return dx:dxRefreshStates(...) end function dxRefreshClickStates(...) return dx:dxRefreshClickStates(...) end function guiAttachToDirectX(...) return dx:guiAttachToDirectX(...) end function dxGetAlwaysOnTop(...) return dx:dxGetAlwaysOnTop(...) end function dxSetAlwaysOnTop(...) return dx:dxSetAlwaysOnTop(...) end function dxGetZOrder(...) return dx:dxGetZOrder(...) end function dxSetZOrder(...) return dx:dxSetZOrder(...) end function dxBringToFront(...) return dx:dxBringToFront(...) end function dxMoveToBack(...) return dx:dxMoveToBack(...) end function dxDestroyElement(...) return dx:dxDestroyElement(...) end function dxDestroyElements(...) return dx:dxDestroyElements(...) end --[[ Button ]]-- function dxCreateButton(...) return dx:dxCreateButton(getThisResource(),...) end function dxButtonRender(...) return dx:dxButtonRender(...) end --[[ Checkbox ]]-- function dxCreateCheckBox(...) return dx:dxCreateCheckBox(getThisResource(),...) end function dxCheckBoxGetSelected(...) return dx:dxCheckBoxGetSelected(...) end function dxCheckBoxSetSelected(...) return dx:dxCheckBoxSetSelected(...) end function dxCheckBoxRender(...) return dx:dxCheckBoxRender(...) end --[[ Label ]]-- function dxCreateLabel(...) return dx:dxCreateLabel(getThisResource(),...) end function dxLabelGetScale(...) return dx:dxLabelGetScale(...) end function dxLabelGetHorizontalAlign(...) return dx:dxLabelGetHorizontalAlign(...) end function dxLabelGetVerticalAlign(...) return dx:dxLabelGetVerticalAlign(...) end function dxLabelSetScale(...) return dx:dxLabelSetScale(...) end function dxLabelSetHorizontalAlign(...) return dx:dxLabelSetHorizontalAlign(...) end function dxLabelSetVerticalAlign(...) return dx:dxLabelSetVerticalAlign(...) end function dxLabelRender(...) return dx:dxLabelRender(...) end --[[ Progressbar ]]-- function dxCreateProgressBar(...) return dx:dxCreateProgressBar(getThisResource(),...) end function dxProgressBarGetProgress(...) return dx:dxProgressBarGetProgress(...) end function dxProgressBarGetProgressPercent(...) return dx:dxProgressBarGetProgressPercent(...) end function dxProgressBarGetMaxProgress(...) return dx:dxProgressBarGetMaxProgress(...) end function dxProgressBarSetProgress(...) return dx:dxProgressBarSetProgress(...) end function dxProgressBarSetProgressPercent(...) return dx:dxProgressBarSetProgressPercent(...) end function dxProgressBarSetMaxProgress(...) return dx:dxProgressBarSetMaxProgress(...) end function dxProgressBarRender(...) return dx:dxProgressBarRender(...) end --[[ Radio button ]]-- function dxCreateRadioButton(...) return dx:dxCreateRadioButton(getThisResource(),...) end function dxRadioButtonGetSelected(...) return dx:dxRadioButtonGetSelected(...) end function dxRadioButtonGetGroup(...) return dx:dxRadioButtonGetGroup(...) end function dxRadioButtonSetSelected(...) return dx:dxRadioButtonSetSelected(...) end function dxRadioButtonSetGroup(...) return dx:dxRadioButtonSetGroup(...) end function dxRadioButtonRender(...) return dx:dxRadioButtonRender(...) end --[[ Scrollbar ]]-- function dxCreateScrollBar(...) return dx:dxCreateScrollBar(getThisResource(),...) end function dxScrollBarGetProgress(...) return dx:dxScrollBarGetProgress(...) end function dxScrollBarGetProgressPercent(...) return dx:dxScrollBarGetProgressPercent(...) end function dxScrollBarGetMaxProgress(...) return dx:dxScrollBarGetMaxProgress(...) end function dxScrollBarSetProgress(...) return dx:dxScrollBarSetProgress(...) end function dxScrollBarSetProgressPercent(...) return dx:dxScrollBarSetProgressPercent(...) end function dxScrollBarSetMaxProgress(...) return dx:dxScrollBarSetMaxProgress(...) end function dxScrollBarRender(...) return dx:dxScrollBarRender(...) end --[[ Spinner ]]-- function dxCreateSpinner(...) return dx:dxCreateSpinner(getThisResource(),...) end function dxSpinnerGetPosition(...) return dx:dxSpinnerGetPosition(...) end function dxSpinnerGetMin(...) return dx:dxSpinnerGetMin(...) end function dxSpinnerGetMin(...) return dx:dxSpinnerGetMin(...) end function dxSpinnerSetPosition(...) return dx:dxSpinnerSetPosition(...) end function dxSpinnerSetMin(...) return dx:dxSpinnerSetMin(...) end function dxSpinnerSetMin(...) return dx:dxSpinnerSetMin(...) end function dxSpinnerRender(...) return dx:dxSpinnerRender(...) end --[[ Static Image ]]-- function dxCreateStaticImage(...) return dx:dxCreateStaticImage(getThisResource(),...) end function dxCreateStaticImageSection(...) return dx:dxCreateStaticImageSection(...) end function dxStaticImageGetLoadedImage(...) return dx:dxStaticImageGetLoadedImage(...) end function dxStaticImageGetSection(...) return dx:dxStaticImageGetSection(...) end function dxStaticImageGetRotation(...) return dx:dxStaticImageGetRotation(...) end function dxStaticImageLoadImage(...) return dx:dxStaticImageLoadImage(...) end function dxStaticImageSetSection(...) return dx:dxStaticImageSetSection(...) end function dxStaticImageSetRotation(...) return dx:dxStaticImageSetRotation(...) end function dxStaticImageRender(...) return dx:dxStaticImageRender(...) end --[[ Window ]]-- function dxCreateWindow(...) return dx:dxCreateWindow(getThisResource(),...) end function dxWindowGetTitlePosition(...) return dx:dxWindowGetTitlePosition(...) end function dxWindowGetMovable(...) return dx:dxWindowGetMovable(...) end function dxWindowIsMoving(...) return dx:dxWindowIsMoving(...) end function dxWindowGetTitleVisible(...) return dx:dxWindowGetTitleVisible(...) end function dxWindowSetTitlePosition(...) return dx:dxWindowSetTitlePosition(...) end function dxWindowSetMovable(...) return dx:dxWindowSetMovable(...) end function dxWindowGetTitleVisible(...) return dx:dxWindowGetTitleVisible(...) end function dxWindowGetPostGUI(...) return dx:dxWindowGetPostGUI(...) end function dxWindowSetPostGUI(...) return dx:dxWindowSetPostGUI(...) end function dxWindowRender(...) return dx:dxWindowRender(...) end function dxWindowMoveControl(...) return dx:dxWindowMoveControl(...) end function dxWindowComponentRender(...) return dx:dxWindowComponentRender(...) end --[[ Listbox ]]-- function dxCreateList(...) return dx:dxCreateList(getThisResource(),...) end function dxListClear(...) return dx:dxListClear(...) end function dxListGetSelectedItem(...) return dx:dxListGetSelectedItem(...) end function dxListSetSelectedItem(...) return dx:dxListSetSelectedItem(...) end function dxListGetItemCount(...) return dx:dxListGetItemCount(...) end function dxListRemoveRow(...) return dx:dxListRemoveRow(...) end function dxListAddRow(...) return dx:dxListAddRow(...) end function dxListSetTitleShow(...) return dx:dxListSetTitleShow(...) end function dxListGetTitleShow(...) return dx:dxListGetTitleShow(...) end function dxListRender(...) return dx:dxListRender(...) end --[[ #Exports Parts ]]-- local core = { Window = { }; Button = { }; }; local screenSize = { guiGetScreenSize( ) }; function centerDxWindow( dxElement ) local width, height = dxGetSize( dxElement, false ); local x, y = screenSize[ 1 ] / 2 - width / 2, screenSize[ 2 ] / 2 - height / 2; dxSetPosition( dxElement, x, y, false ) end addEventHandler( 'onClientResourceStart', resourceRoot, function( ) core.Window[ 'MainWindow' ] = dxCreateWindow( 0, 0, 500, 500, 'Main Window', tocolor( 255, 255, 255, 255 ), 'default', 'Orange' ); core.Button[ 'LOL' ] = dxCreateButton( 250, 250, 100, 100, 'LOL', core.Window[ 'MainWindow' ], tocolor( 255, 0, 0, 255 ), 'pricedown', 'Orange' ); centerDxWindow( core.Window[ 'MainWindow' ] ); dxSetVisible( core.Window[ 'MainWindow' ], false ) end ) addEventHandler( 'onClientDXClick', root, function( ) if source == core.Button[ 'LOL' ] then for repeating = 1, 10 do playSoundFrontEnd( 30 ); playSoundFrontEnd( 29 ); playSoundFrontEnd( 28 ); end end end ) bindKey( 'F2', 'down', function( ) dxSetVisible( core.Window[ 'MainWindow' ], not dxGetVisible( core.Window[ 'MainWindow' ] ) ) end ); Bind F2 to set the window visible Link to comment
Anderl Posted February 3, 2013 Share Posted February 3, 2013 no it's not , it has an export functions : --[[ Exports ]]-- --[[ Shared ]]-- local dx = exports.dxGUI function dxCreateRootPane(...) return dx:dxCreateRootPane(...) end function dxGetRootPane(...) return dx:dxGetRootPane(...) end function dxRefreshThemes(...) return dx:dxRefreshThemes(...) end function dxGetTheme(...) return dx:dxGetTheme(...) end function dxGetDefaultTheme(...) return dx:dxGetDefaultTheme(...) end function dxGetPosition(...) return dx:dxGetPosition(...) end function dxGetSize(...) return dx:dxGetSize(...) end function dxGetVisible(...) return dx:dxGetVisible(...) end function dxGetElementTheme(...) return dx:dxGetElementTheme(...) end function dxGetFont(...) return dx:dxGetFont(...) end function dxGetColor(...) return dx:dxGetColor(...) end function dxGetColorCoded(...) return dx:dxGetColorCoded(...) end function dxGetText(...) return dx:dxGetText(...) end function dxGetAlpha(...) return dx:dxGetAlpha(...) end function dxSetPosition(...) return dx:dxSetPosition(...) end function dxSetSize(...) return dx:dxSetSize(...) end function dxSetVisible(...) return dx:dxSetVisible(...) end function dxSetElementTheme(...) return dx:dxSetElementTheme(...) end function dxSetFont(...) return dx:dxSetFont(...) end function dxSetColor(...) return dx:dxSetColor(...) end function dxSetColorCoded(...) return dx:dxSetColorCoded(...) end function dxSetText(...) return dx:dxSetText(...) end function dxSetAlpha(...) return dx:dxSetAlpha(...) end function dxMove(...) return dx:dxMove(...) end function dxRefreshStates(...) return dx:dxRefreshStates(...) end function dxRefreshClickStates(...) return dx:dxRefreshClickStates(...) end function guiAttachToDirectX(...) return dx:guiAttachToDirectX(...) end function dxGetAlwaysOnTop(...) return dx:dxGetAlwaysOnTop(...) end function dxSetAlwaysOnTop(...) return dx:dxSetAlwaysOnTop(...) end function dxGetZOrder(...) return dx:dxGetZOrder(...) end function dxSetZOrder(...) return dx:dxSetZOrder(...) end function dxBringToFront(...) return dx:dxBringToFront(...) end function dxMoveToBack(...) return dx:dxMoveToBack(...) end function dxDestroyElement(...) return dx:dxDestroyElement(...) end function dxDestroyElements(...) return dx:dxDestroyElements(...) end --[[ Button ]]-- function dxCreateButton(...) return dx:dxCreateButton(getThisResource(),...) end function dxButtonRender(...) return dx:dxButtonRender(...) end --[[ Checkbox ]]-- function dxCreateCheckBox(...) return dx:dxCreateCheckBox(getThisResource(),...) end function dxCheckBoxGetSelected(...) return dx:dxCheckBoxGetSelected(...) end function dxCheckBoxSetSelected(...) return dx:dxCheckBoxSetSelected(...) end function dxCheckBoxRender(...) return dx:dxCheckBoxRender(...) end --[[ Label ]]-- function dxCreateLabel(...) return dx:dxCreateLabel(getThisResource(),...) end function dxLabelGetScale(...) return dx:dxLabelGetScale(...) end function dxLabelGetHorizontalAlign(...) return dx:dxLabelGetHorizontalAlign(...) end function dxLabelGetVerticalAlign(...) return dx:dxLabelGetVerticalAlign(...) end function dxLabelSetScale(...) return dx:dxLabelSetScale(...) end function dxLabelSetHorizontalAlign(...) return dx:dxLabelSetHorizontalAlign(...) end function dxLabelSetVerticalAlign(...) return dx:dxLabelSetVerticalAlign(...) end function dxLabelRender(...) return dx:dxLabelRender(...) end --[[ Progressbar ]]-- function dxCreateProgressBar(...) return dx:dxCreateProgressBar(getThisResource(),...) end function dxProgressBarGetProgress(...) return dx:dxProgressBarGetProgress(...) end function dxProgressBarGetProgressPercent(...) return dx:dxProgressBarGetProgressPercent(...) end function dxProgressBarGetMaxProgress(...) return dx:dxProgressBarGetMaxProgress(...) end function dxProgressBarSetProgress(...) return dx:dxProgressBarSetProgress(...) end function dxProgressBarSetProgressPercent(...) return dx:dxProgressBarSetProgressPercent(...) end function dxProgressBarSetMaxProgress(...) return dx:dxProgressBarSetMaxProgress(...) end function dxProgressBarRender(...) return dx:dxProgressBarRender(...) end --[[ Radio button ]]-- function dxCreateRadioButton(...) return dx:dxCreateRadioButton(getThisResource(),...) end function dxRadioButtonGetSelected(...) return dx:dxRadioButtonGetSelected(...) end function dxRadioButtonGetGroup(...) return dx:dxRadioButtonGetGroup(...) end function dxRadioButtonSetSelected(...) return dx:dxRadioButtonSetSelected(...) end function dxRadioButtonSetGroup(...) return dx:dxRadioButtonSetGroup(...) end function dxRadioButtonRender(...) return dx:dxRadioButtonRender(...) end --[[ Scrollbar ]]-- function dxCreateScrollBar(...) return dx:dxCreateScrollBar(getThisResource(),...) end function dxScrollBarGetProgress(...) return dx:dxScrollBarGetProgress(...) end function dxScrollBarGetProgressPercent(...) return dx:dxScrollBarGetProgressPercent(...) end function dxScrollBarGetMaxProgress(...) return dx:dxScrollBarGetMaxProgress(...) end function dxScrollBarSetProgress(...) return dx:dxScrollBarSetProgress(...) end function dxScrollBarSetProgressPercent(...) return dx:dxScrollBarSetProgressPercent(...) end function dxScrollBarSetMaxProgress(...) return dx:dxScrollBarSetMaxProgress(...) end function dxScrollBarRender(...) return dx:dxScrollBarRender(...) end --[[ Spinner ]]-- function dxCreateSpinner(...) return dx:dxCreateSpinner(getThisResource(),...) end function dxSpinnerGetPosition(...) return dx:dxSpinnerGetPosition(...) end function dxSpinnerGetMin(...) return dx:dxSpinnerGetMin(...) end function dxSpinnerGetMin(...) return dx:dxSpinnerGetMin(...) end function dxSpinnerSetPosition(...) return dx:dxSpinnerSetPosition(...) end function dxSpinnerSetMin(...) return dx:dxSpinnerSetMin(...) end function dxSpinnerSetMin(...) return dx:dxSpinnerSetMin(...) end function dxSpinnerRender(...) return dx:dxSpinnerRender(...) end --[[ Static Image ]]-- function dxCreateStaticImage(...) return dx:dxCreateStaticImage(getThisResource(),...) end function dxCreateStaticImageSection(...) return dx:dxCreateStaticImageSection(...) end function dxStaticImageGetLoadedImage(...) return dx:dxStaticImageGetLoadedImage(...) end function dxStaticImageGetSection(...) return dx:dxStaticImageGetSection(...) end function dxStaticImageGetRotation(...) return dx:dxStaticImageGetRotation(...) end function dxStaticImageLoadImage(...) return dx:dxStaticImageLoadImage(...) end function dxStaticImageSetSection(...) return dx:dxStaticImageSetSection(...) end function dxStaticImageSetRotation(...) return dx:dxStaticImageSetRotation(...) end function dxStaticImageRender(...) return dx:dxStaticImageRender(...) end --[[ Window ]]-- function dxCreateWindow(...) return dx:dxCreateWindow(getThisResource(),...) end function dxWindowGetTitlePosition(...) return dx:dxWindowGetTitlePosition(...) end function dxWindowGetMovable(...) return dx:dxWindowGetMovable(...) end function dxWindowIsMoving(...) return dx:dxWindowIsMoving(...) end function dxWindowGetTitleVisible(...) return dx:dxWindowGetTitleVisible(...) end function dxWindowSetTitlePosition(...) return dx:dxWindowSetTitlePosition(...) end function dxWindowSetMovable(...) return dx:dxWindowSetMovable(...) end function dxWindowGetTitleVisible(...) return dx:dxWindowGetTitleVisible(...) end function dxWindowGetPostGUI(...) return dx:dxWindowGetPostGUI(...) end function dxWindowSetPostGUI(...) return dx:dxWindowSetPostGUI(...) end function dxWindowRender(...) return dx:dxWindowRender(...) end function dxWindowMoveControl(...) return dx:dxWindowMoveControl(...) end function dxWindowComponentRender(...) return dx:dxWindowComponentRender(...) end --[[ Listbox ]]-- function dxCreateList(...) return dx:dxCreateList(getThisResource(),...) end function dxListClear(...) return dx:dxListClear(...) end function dxListGetSelectedItem(...) return dx:dxListGetSelectedItem(...) end function dxListSetSelectedItem(...) return dx:dxListSetSelectedItem(...) end function dxListGetItemCount(...) return dx:dxListGetItemCount(...) end function dxListRemoveRow(...) return dx:dxListRemoveRow(...) end function dxListAddRow(...) return dx:dxListAddRow(...) end function dxListSetTitleShow(...) return dx:dxListSetTitleShow(...) end function dxListGetTitleShow(...) return dx:dxListGetTitleShow(...) end function dxListRender(...) return dx:dxListRender(...) end --[[ #Exports Parts ]]-- so here an example make it fast if you wana try it just download the resource that from the link i give it to you and change the resource name to : [ dxGUI ] and run it and create another client code with this codes alone --[[ Exports ]]-- --[[ Shared ]]-- local dx = exports.dxGUI function dxCreateRootPane(...) return dx:dxCreateRootPane(...) end function dxGetRootPane(...) return dx:dxGetRootPane(...) end function dxRefreshThemes(...) return dx:dxRefreshThemes(...) end function dxGetTheme(...) return dx:dxGetTheme(...) end function dxGetDefaultTheme(...) return dx:dxGetDefaultTheme(...) end function dxGetPosition(...) return dx:dxGetPosition(...) end function dxGetSize(...) return dx:dxGetSize(...) end function dxGetVisible(...) return dx:dxGetVisible(...) end function dxGetElementTheme(...) return dx:dxGetElementTheme(...) end function dxGetFont(...) return dx:dxGetFont(...) end function dxGetColor(...) return dx:dxGetColor(...) end function dxGetColorCoded(...) return dx:dxGetColorCoded(...) end function dxGetText(...) return dx:dxGetText(...) end function dxGetAlpha(...) return dx:dxGetAlpha(...) end function dxSetPosition(...) return dx:dxSetPosition(...) end function dxSetSize(...) return dx:dxSetSize(...) end function dxSetVisible(...) return dx:dxSetVisible(...) end function dxSetElementTheme(...) return dx:dxSetElementTheme(...) end function dxSetFont(...) return dx:dxSetFont(...) end function dxSetColor(...) return dx:dxSetColor(...) end function dxSetColorCoded(...) return dx:dxSetColorCoded(...) end function dxSetText(...) return dx:dxSetText(...) end function dxSetAlpha(...) return dx:dxSetAlpha(...) end function dxMove(...) return dx:dxMove(...) end function dxRefreshStates(...) return dx:dxRefreshStates(...) end function dxRefreshClickStates(...) return dx:dxRefreshClickStates(...) end function guiAttachToDirectX(...) return dx:guiAttachToDirectX(...) end function dxGetAlwaysOnTop(...) return dx:dxGetAlwaysOnTop(...) end function dxSetAlwaysOnTop(...) return dx:dxSetAlwaysOnTop(...) end function dxGetZOrder(...) return dx:dxGetZOrder(...) end function dxSetZOrder(...) return dx:dxSetZOrder(...) end function dxBringToFront(...) return dx:dxBringToFront(...) end function dxMoveToBack(...) return dx:dxMoveToBack(...) end function dxDestroyElement(...) return dx:dxDestroyElement(...) end function dxDestroyElements(...) return dx:dxDestroyElements(...) end --[[ Button ]]-- function dxCreateButton(...) return dx:dxCreateButton(getThisResource(),...) end function dxButtonRender(...) return dx:dxButtonRender(...) end --[[ Checkbox ]]-- function dxCreateCheckBox(...) return dx:dxCreateCheckBox(getThisResource(),...) end function dxCheckBoxGetSelected(...) return dx:dxCheckBoxGetSelected(...) end function dxCheckBoxSetSelected(...) return dx:dxCheckBoxSetSelected(...) end function dxCheckBoxRender(...) return dx:dxCheckBoxRender(...) end --[[ Label ]]-- function dxCreateLabel(...) return dx:dxCreateLabel(getThisResource(),...) end function dxLabelGetScale(...) return dx:dxLabelGetScale(...) end function dxLabelGetHorizontalAlign(...) return dx:dxLabelGetHorizontalAlign(...) end function dxLabelGetVerticalAlign(...) return dx:dxLabelGetVerticalAlign(...) end function dxLabelSetScale(...) return dx:dxLabelSetScale(...) end function dxLabelSetHorizontalAlign(...) return dx:dxLabelSetHorizontalAlign(...) end function dxLabelSetVerticalAlign(...) return dx:dxLabelSetVerticalAlign(...) end function dxLabelRender(...) return dx:dxLabelRender(...) end --[[ Progressbar ]]-- function dxCreateProgressBar(...) return dx:dxCreateProgressBar(getThisResource(),...) end function dxProgressBarGetProgress(...) return dx:dxProgressBarGetProgress(...) end function dxProgressBarGetProgressPercent(...) return dx:dxProgressBarGetProgressPercent(...) end function dxProgressBarGetMaxProgress(...) return dx:dxProgressBarGetMaxProgress(...) end function dxProgressBarSetProgress(...) return dx:dxProgressBarSetProgress(...) end function dxProgressBarSetProgressPercent(...) return dx:dxProgressBarSetProgressPercent(...) end function dxProgressBarSetMaxProgress(...) return dx:dxProgressBarSetMaxProgress(...) end function dxProgressBarRender(...) return dx:dxProgressBarRender(...) end --[[ Radio button ]]-- function dxCreateRadioButton(...) return dx:dxCreateRadioButton(getThisResource(),...) end function dxRadioButtonGetSelected(...) return dx:dxRadioButtonGetSelected(...) end function dxRadioButtonGetGroup(...) return dx:dxRadioButtonGetGroup(...) end function dxRadioButtonSetSelected(...) return dx:dxRadioButtonSetSelected(...) end function dxRadioButtonSetGroup(...) return dx:dxRadioButtonSetGroup(...) end function dxRadioButtonRender(...) return dx:dxRadioButtonRender(...) end --[[ Scrollbar ]]-- function dxCreateScrollBar(...) return dx:dxCreateScrollBar(getThisResource(),...) end function dxScrollBarGetProgress(...) return dx:dxScrollBarGetProgress(...) end function dxScrollBarGetProgressPercent(...) return dx:dxScrollBarGetProgressPercent(...) end function dxScrollBarGetMaxProgress(...) return dx:dxScrollBarGetMaxProgress(...) end function dxScrollBarSetProgress(...) return dx:dxScrollBarSetProgress(...) end function dxScrollBarSetProgressPercent(...) return dx:dxScrollBarSetProgressPercent(...) end function dxScrollBarSetMaxProgress(...) return dx:dxScrollBarSetMaxProgress(...) end function dxScrollBarRender(...) return dx:dxScrollBarRender(...) end --[[ Spinner ]]-- function dxCreateSpinner(...) return dx:dxCreateSpinner(getThisResource(),...) end function dxSpinnerGetPosition(...) return dx:dxSpinnerGetPosition(...) end function dxSpinnerGetMin(...) return dx:dxSpinnerGetMin(...) end function dxSpinnerGetMin(...) return dx:dxSpinnerGetMin(...) end function dxSpinnerSetPosition(...) return dx:dxSpinnerSetPosition(...) end function dxSpinnerSetMin(...) return dx:dxSpinnerSetMin(...) end function dxSpinnerSetMin(...) return dx:dxSpinnerSetMin(...) end function dxSpinnerRender(...) return dx:dxSpinnerRender(...) end --[[ Static Image ]]-- function dxCreateStaticImage(...) return dx:dxCreateStaticImage(getThisResource(),...) end function dxCreateStaticImageSection(...) return dx:dxCreateStaticImageSection(...) end function dxStaticImageGetLoadedImage(...) return dx:dxStaticImageGetLoadedImage(...) end function dxStaticImageGetSection(...) return dx:dxStaticImageGetSection(...) end function dxStaticImageGetRotation(...) return dx:dxStaticImageGetRotation(...) end function dxStaticImageLoadImage(...) return dx:dxStaticImageLoadImage(...) end function dxStaticImageSetSection(...) return dx:dxStaticImageSetSection(...) end function dxStaticImageSetRotation(...) return dx:dxStaticImageSetRotation(...) end function dxStaticImageRender(...) return dx:dxStaticImageRender(...) end --[[ Window ]]-- function dxCreateWindow(...) return dx:dxCreateWindow(getThisResource(),...) end function dxWindowGetTitlePosition(...) return dx:dxWindowGetTitlePosition(...) end function dxWindowGetMovable(...) return dx:dxWindowGetMovable(...) end function dxWindowIsMoving(...) return dx:dxWindowIsMoving(...) end function dxWindowGetTitleVisible(...) return dx:dxWindowGetTitleVisible(...) end function dxWindowSetTitlePosition(...) return dx:dxWindowSetTitlePosition(...) end function dxWindowSetMovable(...) return dx:dxWindowSetMovable(...) end function dxWindowGetTitleVisible(...) return dx:dxWindowGetTitleVisible(...) end function dxWindowGetPostGUI(...) return dx:dxWindowGetPostGUI(...) end function dxWindowSetPostGUI(...) return dx:dxWindowSetPostGUI(...) end function dxWindowRender(...) return dx:dxWindowRender(...) end function dxWindowMoveControl(...) return dx:dxWindowMoveControl(...) end function dxWindowComponentRender(...) return dx:dxWindowComponentRender(...) end --[[ Listbox ]]-- function dxCreateList(...) return dx:dxCreateList(getThisResource(),...) end function dxListClear(...) return dx:dxListClear(...) end function dxListGetSelectedItem(...) return dx:dxListGetSelectedItem(...) end function dxListSetSelectedItem(...) return dx:dxListSetSelectedItem(...) end function dxListGetItemCount(...) return dx:dxListGetItemCount(...) end function dxListRemoveRow(...) return dx:dxListRemoveRow(...) end function dxListAddRow(...) return dx:dxListAddRow(...) end function dxListSetTitleShow(...) return dx:dxListSetTitleShow(...) end function dxListGetTitleShow(...) return dx:dxListGetTitleShow(...) end function dxListRender(...) return dx:dxListRender(...) end --[[ #Exports Parts ]]-- local core = { Window = { }; Button = { }; }; local screenSize = { guiGetScreenSize( ) }; function centerDxWindow( dxElement ) local width, height = dxGetSize( dxElement, false ); local x, y = screenSize[ 1 ] / 2 - width / 2, screenSize[ 2 ] / 2 - height / 2; dxSetPosition( dxElement, x, y, false ) end addEventHandler( 'onClientResourceStart', resourceRoot, function( ) core.Window[ 'MainWindow' ] = dxCreateWindow( 0, 0, 500, 500, 'Main Window', tocolor( 255, 255, 255, 255 ), 'default', 'Orange' ); core.Button[ 'LOL' ] = dxCreateButton( 250, 250, 100, 100, 'LOL', core.Window[ 'MainWindow' ], tocolor( 255, 0, 0, 255 ), 'pricedown', 'Orange' ); centerDxWindow( core.Window[ 'MainWindow' ] ); dxSetVisible( core.Window[ 'MainWindow' ], false ) end ) addEventHandler( 'onClientDXClick', root, function( ) if source == core.Button[ 'LOL' ] then for repeating = 1, 10 do playSoundFrontEnd( 30 ); playSoundFrontEnd( 29 ); playSoundFrontEnd( 28 ); end end end ) bindKey( 'F2', 'down', function( ) dxSetVisible( core.Window[ 'MainWindow' ], not dxGetVisible( core.Window[ 'MainWindow' ] ) ) end ); Bind F2 to set the window visible omginclude this code instead of your current definitions code for i,v in pairs(exports.dxGUI) do _G = function(...) return v(...) end end that should work. (that automatically makes all exports of dxGUI native) Don't you think it's much easier than writing million function copies? Link to comment
Blaawee Posted February 3, 2013 Share Posted February 3, 2013 but some functions has an required argument like the first argument ( resource ), how you gona handle that. Link to comment
Anderl Posted February 3, 2013 Share Posted February 3, 2013 That has totally nothing to do, it looks like you didn't understand that code so I'm gonna explain what it does: "exports" is a global array which contains all resource exported functions, so we're looping through all the exported functions of 'dxGUI' resource. We then create a function that calls the exported function with the arguments passed by the user and returns what the function returned, which we save with the same name as the exported function. How the code actually looks like when being executed: function_name = exports.dxGUI:function_name ( args ); Basically, you just make a variable with the name of the function which calls the exported function. Link to comment
Blaawee Posted February 3, 2013 Share Posted February 3, 2013 looks like you didn't get me . omginclude this code instead of your current definitions code for i,v in pairs(exports.dxGUI) do _G[i] = function(...) return v(...) end end that should work. (that automatically makes all exports of dxGUI native) It won't work.Because some functions gets extra parameters.Like getThisResource().I could make if control, but it will be longer.Because I do definitions with Regex.Only 2 line Link to comment
Anderl Posted February 3, 2013 Share Posted February 3, 2013 Just like qaisjp, I didn't get it. What the hell does parameters have to do with that? It simply creates a function that calls the exported function with the params you pass to it, it's the exact same thing. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now