Kaynağa Gözat

Updated raygui for examples

pull/5574/head
Ray 1 hafta önce
ebeveyn
işleme
1955516f54
6 değiştirilmiş dosya ile 6732 ekleme ve 503 silme
  1. +18
    -2
      examples/core/core_directory_files.c
  2. +223
    -167
      examples/core/raygui.h
  3. +2
    -0
      examples/models/models_directional_billboard.c
  4. +6043
    -0
      examples/models/raygui.h
  5. +223
    -167
      examples/shaders/raygui.h
  6. +223
    -167
      examples/shapes/raygui.h

+ 18
- 2
examples/core/core_directory_files.c Dosyayı Görüntüle

@ -37,10 +37,17 @@ int main(void)
char directory[MAX_FILEPATH_SIZE] = { 0 };
strcpy(directory, GetWorkingDirectory());
// Load file-paths on current working directory
// NOTE: LoadDirectoryFiles() loads files and directories by default,
// use LoadDirectoryFilesEx() for custom filters and recursive directories loading
FilePathList files = LoadDirectoryFiles(directory);
int btnBackPressed = false;
int listScrollIndex = 0;
int listItemActive = -1;
int listItemFocused = -1;
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
@ -62,10 +69,18 @@ int main(void)
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText(directory, 100, 40, 20, DARKGRAY);
btnBackPressed = GuiButton((Rectangle){ 40.0f, 10.0f, 48, 28 }, "<");
GuiSetStyle(DEFAULT, TEXT_SIZE, GuiGetFont().baseSize*2);
GuiLabel((Rectangle){ 40 + 48 + 10, 10, 700, 28 }, directory);
GuiSetStyle(DEFAULT, TEXT_SIZE, GuiGetFont().baseSize);
btnBackPressed = GuiButton((Rectangle){ 40.0f, 38.0f, 48, 24 }, "<");
GuiSetStyle(LISTVIEW, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
GuiSetStyle(LISTVIEW, TEXT_PADDING, 40);
GuiListViewEx((Rectangle){ 0, 50, GetScreenWidth(), GetScreenHeight() - 40 },
files.paths, files.count, &listScrollIndex, &listItemActive, &listItemFocused);
/*
for (int i = 0; i < (int)files.count; i++)
{
Color color = Fade(LIGHTGRAY, 0.3f);
@ -84,6 +99,7 @@ int main(void)
DrawRectangle(0, 85 + 40*i, screenWidth, 40, color);
DrawText(GetFileName(files.paths[i]), 120, 100 + 40*i, 10, GRAY);
}
*/
EndDrawing();
//----------------------------------------------------------------------------------

+ 223
- 167
examples/core/raygui.h
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 2
- 0
examples/models/models_directional_billboard.c Dosyayı Görüntüle

@ -17,7 +17,9 @@
********************************************************************************************/
#include "raylib.h"
#include "raymath.h"
#include <stdlib.h>
//------------------------------------------------------------------------------------

+ 6043
- 0
examples/models/raygui.h
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 223
- 167
examples/shaders/raygui.h
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 223
- 167
examples/shapes/raygui.h
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


Yükleniyor…
İptal
Kaydet