Bc# Posted November 20, 2012 Share Posted November 20, 2012 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
Arsilex Posted November 20, 2012 Share Posted November 20, 2012 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
Bc# Posted November 20, 2012 Author Share Posted November 20, 2012 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
Arsilex Posted November 20, 2012 Share Posted November 20, 2012 estas seguro que pusiste la fuente evo.tff en el meta? Link to comment
Bc# Posted November 20, 2012 Author Share Posted November 20, 2012 Si esta en el meta, de hecho ocupe la fuente en una función previa a esa y funcionó perfectamente, pero no se por que no funciona ahi. Link to comment
Renkon Posted November 20, 2012 Share Posted November 20, 2012 dxCreateFont falla a veces... Trata haciendolos como guiLabels y guiCreateFont Link to comment
Recommended Posts