mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-03 06:01:29 +00:00
GUI: intro, part 6 - DO NOT USE
This commit is contained in:
parent
4d67c5978e
commit
2a3580618d
7 changed files with 13216 additions and 2 deletions
|
@ -588,6 +588,7 @@ src/gui/image_icon.cpp
|
|||
src/gui/image_talogo.cpp
|
||||
src/gui/image_tachip.cpp
|
||||
src/gui/image_logo.cpp
|
||||
src/gui/image_wordmark.cpp
|
||||
src/gui/image.cpp
|
||||
|
||||
src/gui/debug.cpp
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 154 KiB |
|
@ -654,6 +654,7 @@ enum FurnaceGUIImages {
|
|||
GUI_IMAGE_TALOGO,
|
||||
GUI_IMAGE_TACHIP,
|
||||
GUI_IMAGE_LOGO,
|
||||
GUI_IMAGE_WORDMARK,
|
||||
|
||||
GUI_IMAGE_MAX
|
||||
};
|
||||
|
|
|
@ -33,14 +33,16 @@ const unsigned char* imageData[GUI_IMAGE_MAX]={
|
|||
image_icon_data,
|
||||
image_talogo_data,
|
||||
image_tachip_data,
|
||||
image_logo_data
|
||||
image_logo_data,
|
||||
image_wordmark_data
|
||||
};
|
||||
|
||||
const unsigned int imageLen[GUI_IMAGE_MAX]={
|
||||
image_icon_size,
|
||||
image_talogo_size,
|
||||
image_tachip_size,
|
||||
image_logo_size
|
||||
image_logo_size,
|
||||
image_wordmark_size
|
||||
};
|
||||
|
||||
SDL_Texture* FurnaceGUI::getTexture(FurnaceGUIImages image) {
|
||||
|
|
|
@ -30,4 +30,7 @@ extern const unsigned int image_tachip_size;
|
|||
|
||||
extern const unsigned char image_logo_data[];
|
||||
extern const unsigned int image_logo_size;
|
||||
|
||||
extern const unsigned char image_wordmark_data[];
|
||||
extern const unsigned int image_wordmark_size;
|
||||
#endif
|
||||
|
|
13192
src/gui/image_wordmark.cpp
Normal file
13192
src/gui/image_wordmark.cpp
Normal file
File diff suppressed because it is too large
Load diff
|
@ -82,6 +82,11 @@ void FurnaceGUI::drawIntro() {
|
|||
ImVec2 top=ImVec2(0.0f,0.0f);
|
||||
ImVec2 bottom=ImVec2(canvasW,canvasH);
|
||||
|
||||
// preload textures
|
||||
SDL_Texture* pt=getTexture(GUI_IMAGE_TALOGO);
|
||||
pt=getTexture(GUI_IMAGE_TACHIP);
|
||||
pt=getTexture(GUI_IMAGE_LOGO);
|
||||
|
||||
// background
|
||||
float bgAlpha=CLAMP(9.0-introPos,0.0,1.0);
|
||||
bgAlpha=3.0*pow(bgAlpha,2.0)-2.0*pow(bgAlpha,3.0);
|
||||
|
@ -144,6 +149,16 @@ void FurnaceGUI::drawIntro() {
|
|||
|
||||
// part 4 - logo end
|
||||
if (introPos>5.0) {
|
||||
drawImage(
|
||||
dl,
|
||||
GUI_IMAGE_WORDMARK,
|
||||
ImVec2(0.36+0.3*(1.0-pow(1.0-CLAMP(introPos-6.0,0.0,1.0),6.0)),0.5+pow(1.0-CLAMP(introPos-5.0,0.0,1.0),4.0)),
|
||||
ImVec2(1.0,1.0),
|
||||
0.0f,
|
||||
ImVec2(pow(1.0-CLAMP(introPos-6.0,0.0,1.0),8.0),0.0),
|
||||
ImVec2(1.0,1.0),
|
||||
ImVec4(1.0,1.0,1.0,bgAlpha)
|
||||
);
|
||||
drawImage(dl,GUI_IMAGE_LOGO,ImVec2(0.5-0.25*(1.0-pow(1.0-CLAMP(introPos-6.0,0.0,1.0),6.0)),0.5+pow(1.0-CLAMP(introPos-5.0,0.0,1.0),4.0)),ImVec2(0.67,0.67),0.0f,ImVec2(0.0,0.0),ImVec2(1.0,1.0),ImVec4(1.0,1.0,1.0,bgAlpha));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue