Update C sources, add new functions and rename package to
This commit is contained in:
parent
391c25482d
commit
08aa518a46
156 changed files with 34542 additions and 19573 deletions
|
@ -10,32 +10,32 @@ func main() {
|
|||
screenWidth := int32(800)
|
||||
screenHeight := int32(450)
|
||||
|
||||
raylib.InitWindow(screenWidth, screenHeight, "raylib [text] example - bmfont unordered loading and drawing")
|
||||
rl.InitWindow(screenWidth, screenHeight, "raylib [text] example - bmfont unordered loading and drawing")
|
||||
|
||||
// NOTE: Using chars outside the [32..127] limits!
|
||||
// NOTE: If a character is not found in the font, it just renders a space
|
||||
msg := "ASCII extended characters:\n¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆ\nÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæ\nçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
|
||||
|
||||
// NOTE: Loaded font has an unordered list of characters (chars in the range 32..255)
|
||||
font := raylib.LoadFont("fonts/pixantiqua.fnt") // BMFont (AngelCode)
|
||||
font := rl.LoadFont("fonts/pixantiqua.fnt") // BMFont (AngelCode)
|
||||
|
||||
raylib.SetTargetFPS(60)
|
||||
rl.SetTargetFPS(60)
|
||||
|
||||
for !raylib.WindowShouldClose() {
|
||||
raylib.BeginDrawing()
|
||||
for !rl.WindowShouldClose() {
|
||||
rl.BeginDrawing()
|
||||
|
||||
raylib.ClearBackground(raylib.RayWhite)
|
||||
rl.ClearBackground(rl.RayWhite)
|
||||
|
||||
raylib.DrawText("Font name: PixAntiqua", 40, 50, 20, raylib.Gray)
|
||||
raylib.DrawText(fmt.Sprintf("Font base size: %d", font.BaseSize), 40, 80, 20, raylib.Gray)
|
||||
raylib.DrawText(fmt.Sprintf("Font chars number: %d", font.CharsCount), 40, 110, 20, raylib.Gray)
|
||||
rl.DrawText("Font name: PixAntiqua", 40, 50, 20, rl.Gray)
|
||||
rl.DrawText(fmt.Sprintf("Font base size: %d", font.BaseSize), 40, 80, 20, rl.Gray)
|
||||
rl.DrawText(fmt.Sprintf("Font chars number: %d", font.CharsCount), 40, 110, 20, rl.Gray)
|
||||
|
||||
raylib.DrawTextEx(font, msg, raylib.NewVector2(40, 180), float32(font.BaseSize), 0, raylib.Maroon)
|
||||
rl.DrawTextEx(font, msg, rl.NewVector2(40, 180), float32(font.BaseSize), 0, rl.Maroon)
|
||||
|
||||
raylib.EndDrawing()
|
||||
rl.EndDrawing()
|
||||
}
|
||||
|
||||
raylib.UnloadFont(font) // AngelCode Font unloading
|
||||
rl.UnloadFont(font) // AngelCode Font unloading
|
||||
|
||||
raylib.CloseWindow()
|
||||
rl.CloseWindow()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue