mirror of
https://github.com/raysan5/raylib.git
synced 2026-08-20 14:20:49 +00:00
[examples] Several fixes and improvements (#6042)
* models_loading_iqm - actually use animIndex * models_decals - fix button placement * core_highdpi_testbed - unrelated TODO * audio_sound_positioning - fix SetSoundPosition and panning * SetSoundPan is clamped already * remove version check * fix 'updated with' in the header
This commit is contained in:
@@ -249,7 +249,7 @@ int main(void)
|
||||
DrawText("(c) Character model and texture from kenney.nl", screenWidth - 260, screenHeight - 20, 10, GRAY);
|
||||
|
||||
// UI elements
|
||||
if (GuiButton((Rectangle){ 10, screenHeight - 1000.f, 100, 60 }, showModel ? "Hide Model" : "Show Model")) showModel = !showModel;
|
||||
if (GuiButton((Rectangle){ 10, screenHeight - 100.0f, 100, 60 }, showModel ? "Hide Model" : "Show Model")) showModel = !showModel;
|
||||
|
||||
if (GuiButton((Rectangle){ 10 + 110, screenHeight - 100.0f, 100, 60 }, "Clear Decals"))
|
||||
{
|
||||
|
||||
@@ -66,8 +66,8 @@ int main(void)
|
||||
|
||||
// Play animation when spacebar is held down
|
||||
animCurrentFrame += 1.0f;
|
||||
UpdateModelAnimation(model, anims[0], animCurrentFrame);
|
||||
if (animCurrentFrame >= anims[0].keyframeCount) animCurrentFrame = 0;
|
||||
UpdateModelAnimation(model, anims[animIndex], animCurrentFrame);
|
||||
if (animCurrentFrame >= anims[animIndex].keyframeCount) animCurrentFrame = 0;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
||||
Reference in New Issue
Block a user