mirror of
https://github.com/joel16/VITA-Homebrew-Sorter.git
synced 2024-11-26 21:00:27 +00:00
gui: Render splashscreen natively using pic0 and bump version for release
This commit is contained in:
parent
70f965af15
commit
f311deb431
@ -13,7 +13,7 @@ include("${VITASDK}/share/vita.cmake" REQUIRED)
|
||||
|
||||
set(VITA_APP_NAME "VITA Homebrew Sorter")
|
||||
set(VITA_TITLEID "VITAHBSRT")
|
||||
set(VITA_VERSION "01.22")
|
||||
set(VITA_VERSION "01.23")
|
||||
|
||||
add_definitions(-DAPP_VERSION="${VITA_VERSION}")
|
||||
|
||||
@ -85,11 +85,11 @@ vita_create_vpk(${PROJECT_NAME}.vpk ${VITA_TITLEID} ${PROJECT_NAME}.self
|
||||
VERSION ${VITA_VERSION}
|
||||
NAME ${VITA_APP_NAME}
|
||||
FILE sce_sys/icon0.png sce_sys/icon0.png
|
||||
FILE sce_sys/pic0.png sce_sys/pic0.png
|
||||
FILE sce_sys/livearea/contents/bg.png sce_sys/livearea/contents/bg.png
|
||||
FILE sce_sys/livearea/contents/startup.png sce_sys/livearea/contents/startup.png
|
||||
FILE sce_sys/livearea/contents/template.xml sce_sys/livearea/contents/template.xml
|
||||
FILE res/app.png res/app.png
|
||||
FILE res/db.png res/db.png
|
||||
FILE res/folder.png res/folder.png
|
||||
FILE res/splashscreen.png res/splashscreen.png
|
||||
)
|
||||
|
@ -10,7 +10,6 @@ typedef struct {
|
||||
int height = 0;
|
||||
} Tex;
|
||||
|
||||
extern Tex splash;
|
||||
extern std::vector<Tex> icons;
|
||||
|
||||
namespace Textures {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 145 KiB |
@ -28,7 +28,7 @@
|
||||
<frame id="frame4">
|
||||
<liveitem>
|
||||
<text align="left" text-align="left" word-wrap="off" ellipsis="on">
|
||||
<str size="18" color="#ffffff" shadow="on">v1.21</str>
|
||||
<str size="18" color="#ffffff" shadow="on">v1.23</str>
|
||||
</text>
|
||||
</liveitem>
|
||||
</frame>
|
||||
|
BIN
sce_sys/pic0.png
Normal file
BIN
sce_sys/pic0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 65 KiB |
@ -77,33 +77,6 @@ namespace GUI {
|
||||
}
|
||||
}
|
||||
|
||||
void RenderSplash(void) {
|
||||
bool done = false;
|
||||
SceRtcTick start, now;
|
||||
|
||||
sceRtcGetCurrentTick(&start);
|
||||
|
||||
while(!done) {
|
||||
sceRtcGetCurrentTick(&now);
|
||||
|
||||
ImGui_ImplVitaGL_NewFrame();
|
||||
GUI::SetupWindow();
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0));
|
||||
|
||||
if (ImGui::Begin("splash", nullptr, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar)) {
|
||||
ImGui::SetCursorPos((ImGui::GetContentRegionAvail() - ImVec2((splash.width), (splash.height))) * 0.5f);
|
||||
ImGui::Image(reinterpret_cast<ImTextureID>(splash.id), ImVec2(splash.width, splash.height));
|
||||
}
|
||||
|
||||
GUI::ExitWindow();
|
||||
ImGui::PopStyleVar();
|
||||
Renderer::End(true, ImVec4(0.05f, 0.07f, 0.13f, 1.00f));
|
||||
|
||||
if ((now.tick - start.tick) >= 6000000)
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void Prompt(State *state, std::vector<AppInfoIcon> &entries, const char *name) {
|
||||
if (*state == StateNone)
|
||||
return;
|
||||
|
@ -111,7 +111,6 @@ namespace Services {
|
||||
int main(int argc, char *argv[]) {
|
||||
Services::Init();
|
||||
Services::SetDefaultTheme();
|
||||
GUI::RenderSplash();
|
||||
GUI::RenderLoop();
|
||||
Services::Exit();
|
||||
return 0;
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "log.h"
|
||||
#include "textures.h"
|
||||
|
||||
Tex splash;
|
||||
std::vector<Tex> icons;
|
||||
|
||||
namespace Textures {
|
||||
@ -76,15 +75,11 @@ namespace Textures {
|
||||
|
||||
ret = Textures::LoadImagePNG("app0:res/folder.png", &icons[2]);
|
||||
IM_ASSERT(ret);
|
||||
|
||||
ret = Textures::LoadImagePNG("app0:res/splashscreen.png", &splash);
|
||||
IM_ASSERT(ret);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Exit(void) {
|
||||
glDeleteTextures(1, &splash.id);
|
||||
glDeleteTextures(1, &icons[2].id);
|
||||
glDeleteTextures(1, &icons[1].id);
|
||||
glDeleteTextures(1, &icons[0].id);
|
||||
|
Loading…
Reference in New Issue
Block a user