texture gui

This commit is contained in:
huaqo-games
2025-03-23 21:17:00 +01:00
parent 908f57d172
commit 71660ba942
90 changed files with 189 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 831 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

+70
View File
@@ -0,0 +1,70 @@
Heyo! Thanks for downloading the Sprout Lands Basic pack !!!
- Made by: Cup Nooble
This asset pack is the start of a series of different asset packs,
so let me know if there are any specific sprites you'd like to be added in future packs.
-------------------------------------------------------------------------------------------------------------
>>> License - Basic Pack
----------
- You can modify the assets.
[ Feel free to get creative and make your own sprites in this style or use them as reference for your own ]
[ Making additional sprites in the same style or using them as reference for your own project is also allowed ]
----------
- You can use these assets in any kind of non-commercial projects.
[ Except anything to do with NFTs or AI training is not allowed ]
----------
- You can not redistribute the asset pack itself or resell it on other platforms, even if it is slightly modified.
[ Of course, you can redistribute your own projects made with these assets like games, software, or other ]
[ Making your project opensource is also allowed ]
[ For open source projects include a note that says some or all assets are made by Cup Nooble together with the licensing terms ]
----------
- Credit is required : (Cup Nooble)
[ Credit example : Assets -From : Sprout Lands -By : Cup Nooble ]
[ If you share your game on itch.io a link to the Asset Packs page would be very appreciated ]
[ But feel free to credit in whatever way fits your project best ]
[ Thanks a lot for reading ^^ ]
----------
~ And most importantly hope you have fun with your project !!!
? And if you have questions or need/want different licensing terms please reach out to me and I can work with you on a license that suits your needs.
My Discord : cup_nooble
-------------------------------------------------------------------------------------------------------------
>>> See updates here :
- Discord server :
Join The Sprout Lands Discord for any hotfixes and updates or for any questions
Link - https://discord.gg/PyDwcnPY
- Twitter :
Link - https://twitter.com/Sprout_Lands
-------------------------------------------------------------------------------------------------------------
>>> Support
If you enjoy this asset pack consider leaving a rating and a comment.
It really helps to support the future of this project ^u^!
----------
Want to find more from Cup Nooble ?
check out their link tree - cupnooble.carrd.co
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1005 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 971 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

+70
View File
@@ -0,0 +1,70 @@
Heyo! Thanks for downloading the Sprout Lands Basic UI pack !!!
- Made by: Cup Nooble
This asset pack is the start of a series of different asset packs,
so let me know if there are any specific sprites you'd like to be added in future packs.
-------------------------------------------------------------------------------------------------------------
>>> License - Basic UI Pack
----------
- You can modify the assets.
[ Feel free to get creative and make your own sprites in this style or use them as reference for your own ]
[ Making additional sprites in the same style or using them as reference for your own project is also allowed ]
----------
- You can use these assets in any kind of non-commercial projects.
[ Except anything to do with NFTs or AI training is not allowed ]
----------
- You can not redistribute the asset pack itself or resell it on other platforms, even if it is slightly modified.
[ Of course, you can redistribute your own projects made with these assets like games, software, or other ]
[ Making your project opensource is also allowed ]
[ For open source projects include a note that says some or all assets are made by Cup Nooble together with the licensing terms ]
----------
- Credit is required : (Cup Nooble)
[ Credit example : Assets -From : Sprout Lands -By : Cup Nooble ]
[ If you share your game on itch.io a link to the Asset Packs page would be very appreciated ]
[ But feel free to credit in whatever way fits your project best ]
[ Thanks a lot for reading ^^ ]
----------
~ And most importantly hope you have fun with your project !!!
? And if you have questions or need/want different licensing terms please reach out to me and I can work with you on a license that suits your needs.
My Discord : cup_nooble
-------------------------------------------------------------------------------------------------------------
>>> See updates here :
- Discord server :
Join The Sprout Lands Discord for any hotfixes and updates or for any questions
Link - https://discord.gg/PyDwcnPY
- Twitter :
Link - https://twitter.com/Sprout_Lands
-------------------------------------------------------------------------------------------------------------
>>> Support
If you enjoy this asset pack consider leaving a rating and a comment.
It really helps to support the future of this project ^u^!
----------
Want to find more from Cup Nooble ?
check out their link tree - cupnooble.carrd.co
+49
View File
@@ -0,0 +1,49 @@
#ifndef GAMEGUI_H
#define GAMEGUI_H
#include "sprite.h"
typedef struct
{
int state;
Rectangle textureRecs[2];
Rectangle buttonBounds;
Texture2D texture;
} ImageButton;
void initImageButton(ImageButton *b, Rectangle textureRecs[2], Rectangle buttonBounds, Texture2D texture){
b->textureRecs[0] = textureRecs[0];
b->textureRecs[1] = textureRecs[1];
b->buttonBounds = buttonBounds;
b->texture = texture;
b->state = 0;
}
int isImageButtonClicked(ImageButton *b){
Vector2 mousePoint = GetMousePosition();
if (CheckCollisionPointRec(mousePoint, b->buttonBounds)) {
if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) b->state = 1;
if (IsMouseButtonReleased(MOUSE_LEFT_BUTTON))
{
b->state = 0;
return true;
}
} else {
b->state = 0;
}
return false;
}
void renderImageButton(ImageButton *b) {
Sprite sprite;
sprite.texture = b->texture;
sprite.sourceRec = b->textureRecs[b->state];
sprite.destRec = b->buttonBounds;
sprite.origin = (Vector2){ 0, 0 };
sprite.rotation = 0.0f;
sprite.color = WHITE;
RenderSprite(&sprite);
}
#endif // GAMEGUI_H