Jump to content

Abilitare Colore HTML


Recommended Posts

Posted

Salve, vorrei sapere come modificare questa GUI per ineserirci un colore HTML.

g_dxGUI.mapdisplay:text("Map: "..g_MapInfo.name) 

Vorrei fare: Map: MapName

Posted

Prima di tutto e un dx element e non gui element.

Per secondo cosa Intendi dire con HTML?

L HTML usa i codici colore Hex tipo #FFFFFF

Posted

Si, voglio inserire il codice Hex e fare in modo che il server lo legga come colore e non come un normale testo. :)

(PS: Grazie per l'aiuto, sei l'unico attivo sulla sezione italiana. Se puoi aggiungimi su skype: fuziorz)

Posted

Hai provato ad inserire semplicemente il codice Hex prima di map:?

Tipo #FFFFFFMap :

Se non funge non mi basta solo questa stringa,posta l intera funzione.

Posted
Hai provato ad inserire semplicemente il codice Hex prima di map:?

Tipo #FFFFFFMap :

Se non funge non mi basta solo questa stringa,posta l intera funzione.

Con questa DX Element non ho provato, ho provato con le GUI e mi hanno detto di sostituire dxText:create con dxDrawColorText:create.

Funzione:

function initRace(vehicle, checkpoints, objects, pickups, mapoptions, ranked, duration, gameoptions, mapinfo, playerInfo) 
    outputDebug( 'MISC', 'initRace start' ) 
    unloadAll() 
     
    g_Players = getElementsByType('player') 
    g_MapOptions = mapoptions 
    g_GameOptions = gameoptions 
    g_MapInfo = mapinfo 
    g_PlayerInfo = playerInfo 
    triggerEvent('onClientMapStarting', g_Me, mapinfo ) 
     
    g_dxGUI.mapdisplay:text("Map: "..g_MapInfo.name) 
     
    fadeCamera(true) 
    showHUD(false) 
     
    g_Vehicle = vehicle 
    setVehicleDamageProof(g_Vehicle, true) 
    OverrideClient.updateVars(g_Vehicle) 
     
    --local x, y, z = getElementPosition(g_Vehicle) 
    setCameraBehindVehicle(vehicle) 
    --alignVehicleToGround(vehicle) 
    updateVehicleWeapons() 
    setCloudsEnabled(g_GameOptions.cloudsenable) 
    setBlurLevel(g_GameOptions.blurlevel) 
    g_dxGUI.mapdisplay:visible(g_GameOptions.showmapname) 
    if engineSetAsynchronousLoading then 
        engineSetAsynchronousLoading( g_GameOptions.asyncloading ) 
    end 

Dopo questo ci sono altre funzioni però sono relative all'healthbar speedbar e time, se ti servono anche quelle dimmelo :D

Posted

Aggiungi questa stringa sotto :text

Puoi settare il colore rgb ( e uguale ) scegli il colore con Photoshop o paint.

  
  
g_dxGUI.mapdisplay:color(255,255,255,255) -- rgb e l ultimo è alpha 
  

Posted

Avvio la race ma Map, health bar etc. non appagliono e vedo solo la chat con il numero della posizione 0/0 (i checkpoint, anche se nella mappa non ci sono)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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