Jump to content

Problema con dxCreateFont


Bc#

Recommended Posts

font1 = dxCreateFont("evo.ttf", 12) 
------------------------------------------------------- 
-- Travel screen - Message for client feedback when loading maps 
------------------------------------------------------- 
TravelScreen = {} 
TravelScreen.startTime = 0 
  
function TravelScreen.init() 
    local screenWidth, screenHeight = guiGetScreenSize() 
    g_GUI['travelImage']   = guiCreateStaticImage(screenWidth/2-256, screenHeight/2-20, 512, 256, 'img/travelling.png', false, nil) 
    g_dxGUI['travelText1'] = dxText:create('Cambiando a:', screenWidth/2, screenHeight/2-130, false, font1, 0.60, 'center' ) 
    g_dxGUI['travelText2'] = dxText:create('', screenWidth/2, screenHeight/2-100, false, 'bankgothic', 0.70, 'center' ) 
    g_dxGUI['travelText3'] = dxText:create('', screenWidth/2, screenHeight/2-40, false, 'bankgothic', 0.70, 'center' ) 
    g_dxGUI['travelText4'] = dxText:create('', screenWidth/2, screenHeight/2-70, false, 'bankgothic', 0.70, 'center' ) 
    g_dxGUI['travelText1']:color(33, 33, 33) 
    g_dxGUI['travelText4']:color(33, 33, 33) 
    hideGUIComponents('travelImage', 'travelText1', 'travelText2', 'travelText3', 'travelText4') 
end 
  
function TravelScreen.show( mapName, authorName ) 
    TravelScreen.startTime = getTickCount() 
    g_dxGUI['travelText2']:text(mapName) 
    g_dxGUI['travelText3']:text(authorName and "" .. authorName or "") 
    g_dxGUI['travelText4']:text(authorName and "Author:" or "") 
    showGUIComponents('travelImage', 'travelText1', 'travelText2', 'travelText3', 'travelText4') 
    guiMoveToBack(g_GUI['travelImage']) 
    playSound("audio/loading.wav") 
end 
  
function TravelScreen.hide() 
    hideGUIComponents('travelImage', 'travelText1', 'travelText2', 'travelText3', 'travelText4') 
end 
  
function TravelScreen.getTicksRemaining() 
    return math.max( 0, TravelScreen.startTime + 3000 - getTickCount() ) 
end 

Ese es mi código pero, ¿por que al cambiarle la fuente por una creada por mi no la reconoce?

Link to comment
font1 = dxCreateFont("evo.ttf", 12) 
------------------------------------------------------- 
-- Travel screen - Message for client feedback when loading maps 
------------------------------------------------------- 
TravelScreen = {} 
TravelScreen.startTime = 0 
  
function TravelScreen.init() 
    local screenWidth, screenHeight = guiGetScreenSize() 
    g_GUI['travelImage']   = guiCreateStaticImage(screenWidth/2-256, screenHeight/2-20, 512, 256, 'img/travelling.png', false, nil) 
    g_dxGUI['travelText1'] = dxText:create('Cambiando a:', screenWidth/2, screenHeight/2-130, false, font1, 0.60, 'center' ) 
    g_dxGUI['travelText2'] = dxText:create('', screenWidth/2, screenHeight/2-100, false, font1, 0.70, 'center' ) 
    g_dxGUI['travelText3'] = dxText:create('', screenWidth/2, screenHeight/2-40, false, font1, 0.70, 'center' ) 
    g_dxGUI['travelText4'] = dxText:create('', screenWidth/2, screenHeight/2-70, false, font1, 0.70, 'center' ) 
    g_dxGUI['travelText1']:color(33, 33, 33) 
    g_dxGUI['travelText4']:color(33, 33, 33) 
    hideGUIComponents('travelImage', 'travelText1', 'travelText2', 'travelText3', 'travelText4') 
end 
  
function TravelScreen.show( mapName, authorName ) 
    TravelScreen.startTime = getTickCount() 
    g_dxGUI['travelText2']:text(mapName) 
    g_dxGUI['travelText3']:text(authorName and "" .. authorName or "") 
    g_dxGUI['travelText4']:text(authorName and "Author:" or "") 
    showGUIComponents('travelImage', 'travelText1', 'travelText2', 'travelText3', 'travelText4') 
    guiMoveToBack(g_GUI['travelImage']) 
    playSound("audio/loading.wav") 
end 
  
function TravelScreen.hide() 
    hideGUIComponents('travelImage', 'travelText1', 'travelText2', 'travelText3', 'travelText4') 
end 
  
function TravelScreen.getTicksRemaining() 
    return math.max( 0, TravelScreen.startTime + 3000 - getTickCount() ) 
end 

Link to comment
font1 = dxCreateFont("evo.ttf", 12) 
  
    g_dxGUI['travelText1'] = dxText:create('Cambiando a:', screenWidth/2, screenHeight/2-130, false, font1, 0.60, 'center' ) 
    g_dxGUI['travelText4'] = dxText:create('', screenWidth/2, screenHeight/2-70, false, font1, 0.70, 'center' ) 
  

solo a travelText1 y travelText4 deseo cambiarles la fuente .

Pero lo hago y no las reconoce.

Link to comment
  • Recently Browsing   0 members

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