Furious^ONE! Posted August 13, 2014 Share Posted August 13, 2014 Hi, I search how to add a background image to panel Freeroam Please help me. Example: Link to comment
xXMADEXx Posted August 13, 2014 Share Posted August 13, 2014 Use the function guiCreateStaticImage Link to comment
Twisted Posted August 13, 2014 Share Posted August 13, 2014 It's a little harder with the freeroam panel as it uses tables. You'll need to add this {'img', src='test.png'} to the table around line 1500 in fr_client.lua. Also add the img to the meta file and change the name if need be. Link to comment
Furious^ONE! Posted August 13, 2014 Author Share Posted August 13, 2014 i'm add {'img', src='test.png'} in this code ? wndMain = { 'wnd', text = 'FR GUI', x = 10, y = 150, width = 280, controls = { {'img', src='test.png'} {'lbl', text='Local player'}, {'br'}, {'btn', id='kill', onclick=killLocalPlayer}, {'btn', id='skin', window=wndSkin}, {'btn', id='anim', window=wndAnim}, {'btn', id='weapon', window=wndWeapon}, {'btn', id='clothes', window=wndClothes}, {'btn', id='playergrav', text='grav', window=wndGravity}, {'btn', id='warp', window=wndWarp}, {'btn', id='stats', window=wndStats}, {'btn', id='bookmarks', window=wndBookmarks}, {'br'}, {'chk', id='jetpack', onclick=toggleJetPack}, {'chk', id='falloff', text='fall off bike', onclick=toggleFallOffBike}, {'br'}, {'lbl', text='Pos:'}, {'lbl', id='xpos', text='x', width=45}, {'lbl', id='ypos', text='y', width=45}, {'lbl', id='zpos', text='z', width=45}, {'btn', id='setpos', text='map', window=wndSetPos}, {'btn', id='setinterior', text='int', window=wndSetInterior}, {'br'}, {'br'}, {'lbl', text='Vehicles'}, {'br'}, {'lbl', text='Current:'}, {'lbl', id='curvehicle'}, {'br'}, {'btn', id='createvehicle', window=wndCreateVehicle, text='create'}, {'btn', id='repair', onclick=repairVehicle}, {'btn', id='flip', onclick=flipVehicle}, {'btn', id='upgrades', window=wndUpgrades}, {'btn', id='color', onclick=openColorPicker}, {'btn', id='paintjob', window=wndPaintjob}, {'br'}, {'chk', id='lightson', text='Lights on', onclick=forceLightsOn}, {'chk', id='lightsoff', text='Lights off', onclick=forceLightsOff}, {'br'}, {'br'}, {'lbl', text='Environment'}, {'br'}, {'btn', id='time', window=wndTime}, {'chk', id='freezetime', text='freeze', onclick=toggleFreezeTime}, {'btn', id='weather', window=wndWeather}, {'btn', id='speed', window=wndGameSpeed} }, oncreate = mainWndShow, onclose = mainWndClose } When I change its does not open the panel Freeroam.. help me Error console: Download error: Invalid file (freeroam) test.png Link to comment
Twisted Posted August 14, 2014 Share Posted August 14, 2014 You'll need to add a comma after the }. Also, make sure you have an img named "test.png" which you can rename if you like and also added to the meta. Link to comment
Furious^ONE! Posted August 14, 2014 Author Share Posted August 14, 2014 The image is not displayed on the gui Do you have a solution? Link to comment
Et-win Posted August 14, 2014 Share Posted August 14, 2014 Any debugscript errors? And does it even support images? (Just asking, for the rest Idk about this ) Link to comment
Saml1er Posted August 14, 2014 Share Posted August 14, 2014 wndMain = { 'wnd', text = 'FR GUI', x = 10, y = 150, width = 280, controls = { {'img', src='test.png'}, {'lbl', text='Local player'}, {'br'}, {'btn', id='kill', onclick=killLocalPlayer}, {'btn', id='skin', window=wndSkin}, {'btn', id='anim', window=wndAnim}, {'btn', id='weapon', window=wndWeapon}, {'btn', id='clothes', window=wndClothes}, {'btn', id='playergrav', text='grav', window=wndGravity}, {'btn', id='warp', window=wndWarp}, {'btn', id='stats', window=wndStats}, {'btn', id='bookmarks', window=wndBookmarks}, {'br'}, {'chk', id='jetpack', onclick=toggleJetPack}, {'chk', id='falloff', text='fall off bike', onclick=toggleFallOffBike}, {'br'}, {'lbl', text='Pos:'}, {'lbl', id='xpos', text='x', width=45}, {'lbl', id='ypos', text='y', width=45}, {'lbl', id='zpos', text='z', width=45}, {'btn', id='setpos', text='map', window=wndSetPos}, {'btn', id='setinterior', text='int', window=wndSetInterior}, {'br'}, {'br'}, {'lbl', text='Vehicles'}, {'br'}, {'lbl', text='Current:'}, {'lbl', id='curvehicle'}, {'br'}, {'btn', id='createvehicle', window=wndCreateVehicle, text='create'}, {'btn', id='repair', onclick=repairVehicle}, {'btn', id='flip', onclick=flipVehicle}, {'btn', id='upgrades', window=wndUpgrades}, {'btn', id='color', onclick=openColorPicker}, {'btn', id='paintjob', window=wndPaintjob}, {'br'}, {'chk', id='lightson', text='Lights on', onclick=forceLightsOn}, {'chk', id='lightsoff', text='Lights off', onclick=forceLightsOff}, {'br'}, {'br'}, {'lbl', text='Environment'}, {'br'}, {'btn', id='time', window=wndTime}, {'chk', id='freezetime', text='freeze', onclick=toggleFreezeTime}, {'btn', id='weather', window=wndWeather}, {'btn', id='speed', window=wndGameSpeed} }, oncreate = mainWndShow, onclose = mainWndClose } Link to comment
Furious^ONE! Posted August 14, 2014 Author Share Posted August 14, 2014 Debug script: Download error: Invalid file (freeroam1) test.png Link to comment
Furious^ONE! Posted August 14, 2014 Author Share Posted August 14, 2014 Yes , all is ok.. 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