Jump to content

GridList


MisterZ

Recommended Posts

Posted

Usa el evento: onClientGUIClick y las funciones:

guiGridListGetSelectedItem 
guiGridListGetItemText 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Ambas funciones tienen ejemplos, dale click y te enviara a la pagina de la wiki.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Bueno Ya Logre hacerlo ahora tengo otro problema yo quiero que la imagen este visible si esta seleccionado el ítem en la lista si tocas otra parte de la lista la imagen desaparesca

Gracias :D

addEventHandler("onClientRender",getRootElement(), 
function() 
    for i, IMG in ipairs(infoImagen) do 
    local item = guiGridListGetItemText(gridlistItems["inventory"], guiGridListGetSelectedItem(gridlistItems["inventory"]), 1) 
    if IMG[1] == item then 
    guiStaticImageLoadImage(headline["imagen"], IMG[3]) 
end 
end 
end) 

Posted

Esa es una terrible manera de hacer el script, es muy ineficiente.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

No hay porque hacer eso, podes usar el evento onClientGUIClick para detectar cuando seleccionas un item en la gridlist, porque tenes que verificar en cada render?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
No hay porque hacer eso, podes usar el evento onClientGUIClick para detectar cuando seleccionas un item en la gridlist, porque tenes que verificar en cada render?

Tu dices que cambie el onClientRender por el onClientGUIClick ?

Posted

Si, pero debes verificar que el elemento GUI que el jugador dio click en, sea la gridlist tuya.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Si, pero debes verificar que el elemento GUI que el jugador dio click en, sea la gridlist tuya.

no entiendo :S

EDIT: Y como hago para verificar si es mi gui la que le doy Click ?

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...