flow improvements
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
#include <pu/Plutonium>
|
||||
#include <const.h>
|
||||
#include <title.hpp>
|
||||
#include <account.hpp>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace ui {
|
||||
class TitlesLayout : public pu::ui::Layout {
|
||||
private:
|
||||
|
||||
pu::ui::elm::Menu::Ref titlesMenu;
|
||||
std::unordered_map<AccountUid, pu::ui::elm::Menu::Ref> menuCache;
|
||||
bool m_inputLocked = false;
|
||||
|
||||
public:
|
||||
|
||||
@@ -51,6 +51,20 @@ namespace ui {
|
||||
void SetProgress(double val) {
|
||||
progressBar->SetProgress(val);
|
||||
}
|
||||
|
||||
void SetProgressVisible(bool visible) {
|
||||
progressBar->SetVisible(visible);
|
||||
if (visible) {
|
||||
this->SetHeight(OvlH);
|
||||
this->SetY(OvlY);
|
||||
hintText->SetY(195);
|
||||
} else {
|
||||
static constexpr int SmallH = 160;
|
||||
this->SetHeight(SmallH);
|
||||
this->SetY((720 - SmallH) / 2);
|
||||
hintText->SetY(120);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ namespace ui {
|
||||
private:
|
||||
|
||||
pu::ui::elm::Menu::Ref usersMenu;
|
||||
pu::ui::elm::Rectangle::Ref loadingBg;
|
||||
pu::ui::elm::TextBlock::Ref loadingText;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
+2
-1
@@ -54,7 +54,8 @@ inline bool operator==(const AccountUid& x, u64 y)
|
||||
|
||||
inline bool operator<(const AccountUid& x, const AccountUid& y)
|
||||
{
|
||||
return x.uid[0] < y.uid[0] && x.uid[1] == y.uid[1];
|
||||
if (x.uid[0] != y.uid[0]) return x.uid[0] < y.uid[0];
|
||||
return x.uid[1] < y.uid[1];
|
||||
}
|
||||
|
||||
struct User {
|
||||
|
||||
@@ -5,6 +5,7 @@ int transfer_files(size_t index, AccountUid uid);
|
||||
bool isClientTransferDone();
|
||||
bool isClientTransferCancelled();
|
||||
bool isClientConnectionFailed();
|
||||
bool isClientProgressKnown();
|
||||
void cancelClientTransfer();
|
||||
double getClientProgress();
|
||||
std::string getClientStatusText();
|
||||
|
||||
+4
-3
@@ -48,9 +48,10 @@ public:
|
||||
template <typename... Args>
|
||||
void log(const std::string& level, const std::string& format = {}, Args... args)
|
||||
{
|
||||
// xcbuffer += StringUtils::format(("[" + DateTime::logDateTime() + "] " + level + " " + format + "\n").c_str(), args...);
|
||||
printf("%s\n", format.c_str());
|
||||
// printf("%s\n",StringUtils::format("[" + DateTime::logDateTime() + "] " + level + " " + format + "\n").c_str(), args...);
|
||||
// buffer += StringUtils::format(("[" + DateTime::logDateTime() + "] " + level + " " + format + "\n").c_str(), args...);
|
||||
// buffer += StringUtils::format("%s\n", format.c_str());
|
||||
// buffer += StringUtils::format("%s\n",StringUtils::format("[" + DateTime::logDateTime() + "] " + level + " " + format + "\n").c_str(), args...);
|
||||
printf(StringUtils::format("[" + DateTime::logDateTime() + "] " + level + " " + format + "\n").c_str(), args...);
|
||||
}
|
||||
|
||||
void flush(void)
|
||||
|
||||
@@ -82,6 +82,7 @@ private:
|
||||
void getTitle(Title& dst, AccountUid uid, size_t i);
|
||||
size_t getTitleCount(AccountUid uid);
|
||||
void loadTitles(void);
|
||||
bool areTitlesLoaded(void);
|
||||
void sortTitles(void);
|
||||
void rotateSortMode(void);
|
||||
void refreshDirectories(u64 id);
|
||||
|
||||
Reference in New Issue
Block a user