HunT Posted September 5, 2011 Share Posted September 5, 2011 I guys. I have the little problem with my new job in GUI code: imageLogo = guiCreateStaticImage(12,14,328,236,"img/panel.png",false,bigWindow) guiMoveToBack (imageLogo , true) image : My problem is the image The image have guiMoveToBack but i press the image with the mouse and the image move to up. I search the solution in wiki but nothing. . .its possible freeze the image to back? Tnx all . Sorry for my patetic english but don't use the traductor Link to comment
HunT Posted September 5, 2011 Author Share Posted September 5, 2011 Tnx I test yesterday guiSetEnabled with value true false ok . . . .Tnx again Link to comment
IIIIlllllIII Posted September 5, 2011 Share Posted September 5, 2011 oh small problem just delete the img Link to comment
Castillo Posted September 5, 2011 Share Posted September 5, 2011 Maybe try setting the property AwalysOnTop to the buttons. guiSetProperty(myButton, "AlwaysOnTop", "True") Link to comment
HunT Posted September 5, 2011 Author Share Posted September 5, 2011 Now with guiSetEnabled "false" is ok Tnx anyway castillo. Link to comment
HunT Posted September 6, 2011 Author Share Posted September 6, 2011 Other Problem/Suggestion Problem Nr.1 guiGridListSetScrollBars The Wiki Say's : bool guiGridListSetScrollBars ( element guiGridlist, bool horizontalBar, bool verticalBar ) Ok i want only the verticalBar and set this : driversList = guiCreateGridList(28,85,146,149,false,bigWindow) guiGridListSetScrollBars ( driversList, false , true ) Test and show horizontalBar and verticalBar why? This is image : ------------------------------------------------------------- Suggestion Nr.1 guiSetProperty i have this for color Botton test: botton1 = guiCreateButton(186,28,57,12,"Push",false,bigWindow) guiSetProperty( botton1, "NormalTextColour", "FFFA8200" ) guiSetProperty( botton1, "PushedTextColour", "FFFF0000" ) guiSetProperty( botton1, "HoverTextColour", "FFA0A0A0" ) guiSetFont(botton1,"default-small") Ok i need the info for give the botton sound . . . .no onClientGUIClick (this is easy ) But similar "HoverTextColour" --------------------------------------------------------------------------- Suggestion Nr.2 hasObjectPermissionTo In This panel i set the "command.kick" (access for Admin SuperModerator and Moderator) and this is ok My questios is : is possible now add the permission for bottons ? Example Moderator only access push blow boom. Call the function with triggerServerEvent ? Tnx all for reply. Link to comment
Castillo Posted September 6, 2011 Share Posted September 6, 2011 There's no "over sound", you need to make it on your own, you can use onClientMouseEnter, onClientMouseLeave for that. To set who can use what in the buttons you could use element data or, a server side table with the button name, example: local permissionTable = { ["Push"] = {"Moderator"}, ["Kick"] = {"SuperModerator"}, } addEvent("panel:Push",true) addEventHandler("panel:Push",root, function (client, target, buttonName) if not permissionTable[buttonName] then return end for index, permission in pairs(permissionTable[buttonName]) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(client)),aclGetGroup(tostring(permission))) then -- Your function here end end end That should work, not tested though. Link to comment
HunT Posted September 6, 2011 Author Share Posted September 6, 2011 LoL Hard for me But test ok. Tnx Why triggerServerEvent is bad idea ? (idk ) example botton4 access danied for Moderator client part : elseif (source == botton4) then triggerServerEvent ("accessSmash", getLocalPlayer()) server part : addEvent("accessSmash",true) addEventHandler("accessSmash",getRootElement(), function (thePlayer) if ( hasObjectPermissionTo ( thePlayer, "command.ban", true ) ) then else outputChatBox ("PRO Admin Panel : Access denied", thePlayer, 255, 200, 0) end end ) Idk Test and reply Tnx Link to comment
Castillo Posted September 6, 2011 Share Posted September 6, 2011 I never said that? also, you'll need to trigger to server side to make this work, I just made a easier way to set permissions. Link to comment
Cadu12 Posted September 6, 2011 Share Posted September 6, 2011 "command.ban" -> "command.kick" Link to comment
Castillo Posted September 6, 2011 Share Posted September 6, 2011 VIPDragon, use only English in this forum, you can post in your own language in "Other Languages" section. viewforum.php?f=117 Link to comment
HunT Posted September 7, 2011 Author Share Posted September 7, 2011 ok for permission i use you example castillo . . . better solution. For sound i have new idea. I use onClientGUIClick for playSound and show image info about command and permission. And onClientGUIDoubleClick for functions. Now my problem is only the horizontalBar 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