-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Track selection (video/audio/sub) - Custom Seek Values (in config.ini or via Settings Menu) - Aspect Ratio Control (with custom ratio) - Fix (disable Sleep Mode/Dimming on media playback) - Small fiexs
- Loading branch information
1 parent
54640f2
commit 40a4160
Showing
23 changed files
with
1,064 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef NXMP_APPPOPUPS_H | ||
#define NXMP_APPPOPUPS_H | ||
|
||
#include "imgui.h" | ||
|
||
namespace Popups { | ||
inline void SetupPopup(const char *id) { | ||
ImGui::OpenPopup(id); | ||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(15, 15)); | ||
ImGui::SetNextWindowPos(ImVec2(640.0f, 360.0f), ImGuiCond_Appearing, ImVec2(0.5f, 0.5f)); | ||
}; | ||
|
||
inline void ExitPopup(void) { | ||
ImGui::EndPopup(); | ||
ImGui::PopStyleVar(); | ||
}; | ||
|
||
void SaveSettingsPopup(void); | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#ifndef NXMP_FILEINFO_H | ||
#define NXMP_FILEINFO_H | ||
|
||
#include <string> | ||
#include <vector> | ||
|
||
class fileInfo { | ||
|
||
public: | ||
|
||
class Track { | ||
public: | ||
int id; | ||
std::string type; | ||
std::string title = "Unknown"; | ||
std::string language = "N/A"; | ||
std::string codec; | ||
int channels; | ||
int bit_rate; | ||
int sample_rate; | ||
int width; | ||
int height; | ||
bool selected = false; | ||
}; | ||
|
||
class Chapter{ | ||
public: | ||
std::string title; | ||
double time; | ||
}; | ||
|
||
class Playback { | ||
public: | ||
int vid_id = -1; | ||
int aud_id = -1; | ||
int sub_id = -1; | ||
int position = 0; | ||
}; | ||
|
||
|
||
std::string title = "Unknown"; | ||
std::string path; | ||
long duration = 0; | ||
int bit_rate = 0; | ||
std::vector<Track> videos; | ||
std::vector<Track> audios; | ||
std::vector<Track> subtitles; | ||
|
||
std::vector<Chapter> chapters; | ||
|
||
Playback playbackInfo; | ||
|
||
|
||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef NXMP_PLAYERWINDOWS_H | ||
#define NXMP_PLAYERWINDOWS_H | ||
|
||
#include "imgui.h" | ||
|
||
|
||
namespace playerWindows{ | ||
inline void SetupRightWindow(void) { | ||
ImGui::SetNextWindowPos(ImVec2(1080.0f, 0.0f), ImGuiCond_Once); | ||
ImGui::SetNextWindowSize(ImVec2(200.0f, 720.0f), ImGuiCond_Once); | ||
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f); | ||
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.0,0.0,0.0,0.5)); | ||
|
||
}; | ||
|
||
inline void ExitWindow(void) { | ||
ImGui::End(); | ||
ImGui::PopStyleVar(); | ||
ImGui::PopStyleColor(); | ||
}; | ||
|
||
|
||
|
||
void RightHomeWindow(bool *focus, bool *first_item); | ||
void RightTrackWindow(bool *focus, bool *first_item); | ||
void RightChapterWindow(bool *focus, bool *first_item); | ||
void RightTrackVideoWindow(bool *focus, bool *first_item); | ||
void RightTrackAudioWindow(bool *focus, bool *first_item); | ||
void RightTrackSubWindow(bool *focus, bool *first_item); | ||
void RightHomeARatio(bool *focus, bool *first_item); | ||
void RightHomeCustomARatio(bool *focus, bool *first_item); | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "apppopups.h" | ||
#include "gui.h" | ||
#include "imgui.h" | ||
#include "imgui_internal.h" | ||
#include "utils.h" | ||
|
||
namespace Popups{ | ||
|
||
void SaveSettingsPopup(void) { | ||
Popups::SetupPopup("Save Settings"); | ||
|
||
if (ImGui::BeginPopupModal("Save Settings", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { | ||
|
||
ImGui::Text("Save Settings?"); | ||
|
||
ImVec2 button_size(ImGui::GetFontSize() * 7.0f, 0.0f); | ||
if (ImGui::Button("Yes", button_size)) | ||
{ | ||
item.state = MENU_STATE_HOME; | ||
item.popupstate = POPUP_STATE_NONE; | ||
configini->saveSettings(); | ||
|
||
} | ||
ImGui::SameLine(); | ||
if (ImGui::Button("No", button_size)) | ||
{ | ||
|
||
item.state = MENU_STATE_HOME; | ||
item.popupstate = POPUP_STATE_NONE; | ||
ImGui::CloseCurrentPopup(); | ||
} | ||
|
||
} | ||
Popups::ExitPopup(); | ||
} | ||
|
||
} |
Oops, something went wrong.