Skip to content

Commit

Permalink
Bump version and hide resize button until the feature is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel16 committed Jul 31, 2020
1 parent 457df8d commit f8471b6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set(VITA_APP_NAME "VITAlbum")
# unique string of developer and Y = a unique number for this app
set(VITA_TITLEID "VITALBUM0")
# Optional version string to show in LiveArea's more info screen
set(VITA_VERSION "01.01")
set(VITA_VERSION "01.10")

## Flags and includes for building
# Note that we make sure not to overwrite previous flags
Expand Down
23 changes: 21 additions & 2 deletions source/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "fs.h"
#include "imgui_internal.h"
#include "keyboard.h"
#include "textures.h"
#include "utils.h"

Expand Down Expand Up @@ -60,6 +61,7 @@ namespace GUI {
static void PropertiesWindow(bool *window, const std::string &cwd, SceIoDirent *entry, Tex *texture) {
ImGui::OpenPopup("Properties");
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(20, 20));
std::string new_width, new_height;
if (ImGui::BeginPopupModal("Properties", window, ImGuiWindowFlags_AlwaysAutoResize)) {
std::string parent_text = "Parent: ";
parent_text.append(cwd);
Expand Down Expand Up @@ -88,7 +90,9 @@ namespace GUI {
width_text.append("px");
ImGui::Text(width_text.c_str());
ImGui::SameLine(0.0f, 10.0f);
ImGui::Button("Edit width");
if (ImGui::Button("Edit width")) {
new_width = Keyboard::GetText("Enter width", std::to_string(texture->width));
}

ImGui::Dummy(ImVec2(0.0f, 5.0f)); // Spacing

Expand All @@ -97,14 +101,29 @@ namespace GUI {
height_text.append("px");
ImGui::Text(height_text.c_str());
ImGui::SameLine(0.0f, 10.0f);
ImGui::Button("Edit height");
if (ImGui::Button("Edit height")) {
new_height = Keyboard::GetText("Enter height", std::to_string(texture->height));
}

ImGui::Dummy(ImVec2(0.0f, 5.0f)); // Spacing

/*if (ImGui::Button("Apply changes", ImVec2(120, 0))) {
// int new_width_int = std::stoi(new_width);
// int new_height_int = std::stoi(new_height);
if ((!new_height.empty()) || (!new_width.empty())) {
if (new_width != std::to_string(texture->width))
else if (new_height != std::to_string(texture->height))
}
}*/

ImGui::SameLine();

if (ImGui::Button("OK", ImVec2(120, 0))) {
*window = false;
ImGui::CloseCurrentPopup();
}

ImGui::EndPopup();
}
ImGui::PopStyleVar();
Expand Down

0 comments on commit f8471b6

Please sign in to comment.