mirror of
https://github.com/Lorenzooone/cc3dsfs.git
synced 2026-10-02 03:46:36 -05:00
Add N3DS XL Loopy 3D Mode
Some checks are pending
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux32 flags:32 name:Linux GCC 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux64 flags:64 name:Linux GCC x64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm32 flags:arm32 name:Linux GCC ARM 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm64 flags:arm64 name:Linux GCC ARM 64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:macos name:macOS Apple Silicon os:macos-14]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win32 flags:-A Win32 name:Windows VS2022 Win32 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win64 flags:-A x64 name:Windows VS2022 x64 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:winarm64 flags:-A ARM64 name:Windows VS2022 ARM os:windows-2022]) (push) Waiting to run
CD / Create Pi Mono Setup (push) Blocked by required conditions
CD / Publishing (push) Blocked by required conditions
Some checks are pending
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux32 flags:32 name:Linux GCC 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linux64 flags:64 name:Linux GCC x64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm32 flags:arm32 name:Linux GCC ARM 32 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:linuxarm64 flags:arm64 name:Linux GCC ARM 64 os:ubuntu-latest]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:macos name:macOS Apple Silicon os:macos-14]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win32 flags:-A Win32 name:Windows VS2022 Win32 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:win64 flags:-A x64 name:Windows VS2022 x64 os:windows-2022]) (push) Waiting to run
CD / ${{ matrix.platform.name }} ${{ matrix.config.name }} (map[flags:-DBUILD_SHARED_LIBS=FALSE name:Static], map[artifact_name:winarm64 flags:-A ARM64 name:Windows VS2022 ARM os:windows-2022]) (push) Waiting to run
CD / Create Pi Mono Setup (push) Blocked by required conditions
CD / Publishing (push) Blocked by required conditions
This commit is contained in:
44
include/Menus/Main3DMenu.hpp
Normal file
44
include/Menus/Main3DMenu.hpp
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef __MAIN3DMENU_HPP
|
||||
#define __MAIN3DMENU_HPP
|
||||
|
||||
#include "OptionSelectionMenu.hpp"
|
||||
#include <chrono>
|
||||
|
||||
#include "TextRectangle.hpp"
|
||||
#include "sfml_gfx_structs.hpp"
|
||||
#include "display_structs.hpp"
|
||||
#include "capture_structs.hpp"
|
||||
|
||||
enum Main3DMenuOutAction{
|
||||
MAIN_3D_MENU_NO_ACTION,
|
||||
MAIN_3D_MENU_BACK,
|
||||
MAIN_3D_MENU_REQUEST_3D_TOGGLE,
|
||||
MAIN_3D_MENU_INTERLEAVED_TOGGLE,
|
||||
MAIN_3D_MENU_SQUISH_TOP_TOGGLE,
|
||||
MAIN_3D_MENU_SQUISH_BOTTOM_TOGGLE,
|
||||
MAIN_3D_MENU_USB_SPEED_INFO,
|
||||
MAIN_3D_MENU_DEVICE_INFO,
|
||||
MAIN_3D_MENU_IMPLEMENTATION_INFO,
|
||||
MAIN_3D_MENU_SECOND_SCREEN_POSITION_SETTINGS,
|
||||
};
|
||||
|
||||
class Main3DMenu : public OptionSelectionMenu {
|
||||
public:
|
||||
Main3DMenu(bool font_load_success, sf::Font &text_font);
|
||||
~Main3DMenu();
|
||||
void prepare(float menu_scaling_factor, int view_size_x, int view_size_y, ScreenInfo *info, DisplayData* display_data, CaptureStatus* status);
|
||||
void insert_data(ScreenType stype);
|
||||
Main3DMenuOutAction selected_index = Main3DMenuOutAction::MAIN_3D_MENU_NO_ACTION;
|
||||
void reset_output_option();
|
||||
protected:
|
||||
bool is_option_selectable(int index, int action);
|
||||
bool is_option_inc_dec(int index);
|
||||
void set_output_option(int index, int action);
|
||||
int get_num_options();
|
||||
std::string get_string_option(int index, int action);
|
||||
void class_setup();
|
||||
private:
|
||||
int *options_indexes;
|
||||
int num_enabled_options;
|
||||
};
|
||||
#endif
|
||||
@@ -18,6 +18,7 @@ enum RelPosMenuOutAction{
|
||||
|
||||
class RelativePositionMenu {
|
||||
public:
|
||||
RelativePositionMenu();
|
||||
RelativePositionMenu(bool font_load_success, sf::Font &text_font);
|
||||
~RelativePositionMenu();
|
||||
bool poll(SFEvent &event_data);
|
||||
@@ -29,7 +30,7 @@ public:
|
||||
void insert_data();
|
||||
RelPosMenuOutAction selected_index = RelPosMenuOutAction::REL_POS_MENU_NO_ACTION;
|
||||
BottomRelativePosition selected_confirm_value = BOT_REL_POS_END;
|
||||
private:
|
||||
protected:
|
||||
struct RelPosMenuData {
|
||||
int option_selected = -1;
|
||||
int menu_width;
|
||||
@@ -39,7 +40,11 @@ private:
|
||||
};
|
||||
RelPosMenuData future_data;
|
||||
TextRectangle **labels;
|
||||
bool *selectable_labels;
|
||||
|
||||
int num_vertical_slices;
|
||||
int num_elements_per_screen;
|
||||
int num_elements_displayed_per_screen;
|
||||
int num_options_per_screen;
|
||||
int elements_start_id;
|
||||
int min_elements_text_scaling_factor;
|
||||
@@ -52,10 +57,23 @@ private:
|
||||
sf::Color menu_color;
|
||||
std::string title;
|
||||
|
||||
int num_elements_per_screen;
|
||||
void initialize(bool font_load_success, sf::Font &text_font);
|
||||
void prepare_options();
|
||||
void base_prepare(float menu_scaling_factor, int view_size_x, int view_size_y);
|
||||
void prepare_text_slices(int x_multiplier, int x_divisor, int y_multiplier, int y_divisor, int index, float text_scaling_factor, bool center = false);
|
||||
|
||||
virtual bool is_option_selectable(int index);
|
||||
virtual void set_output_option(int index);
|
||||
virtual std::string get_string_option(int index);
|
||||
virtual void class_setup();
|
||||
virtual void option_slice_prepare(int i, int index, int num_vertical_slices, float text_scaling_factor);
|
||||
virtual bool is_option_element(int option);
|
||||
virtual bool is_option_left(int index);
|
||||
virtual bool is_option_right(int index);
|
||||
virtual bool is_option_above(int index);
|
||||
virtual bool is_option_below(int index);
|
||||
private:
|
||||
int num_title_back_x_elements;
|
||||
int num_elements_displayed_per_screen;
|
||||
int num_vertical_slices;
|
||||
int title_back_x_start_id;
|
||||
int back_x_id;
|
||||
int title_id;
|
||||
@@ -63,26 +81,16 @@ private:
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> last_action_time;
|
||||
const float action_timeout = 0.1;
|
||||
int option_selected = -1;
|
||||
bool *selectable_labels;
|
||||
RelPosMenuData loaded_data;
|
||||
sf::RectangleShape menu_rectangle = sf::RectangleShape(sf::Vector2f(1, 1));
|
||||
|
||||
|
||||
bool is_option_selectable(int index);
|
||||
void set_output_option(int index);
|
||||
std::string get_string_option(int index);
|
||||
void class_setup();
|
||||
void prepare_options();
|
||||
void base_prepare(float menu_scaling_factor, int view_size_x, int view_size_y);
|
||||
void after_class_setup_connected_values();
|
||||
void prepare_text_slices(int x_multiplier, int x_divisor, int y_multiplier, int y_divisor, int index, float text_scaling_factor, bool center = false);
|
||||
bool can_execute_action();
|
||||
void up_code(bool is_simple);
|
||||
void down_code(bool is_simple);
|
||||
void left_code();
|
||||
void right_code();
|
||||
void option_selection_handling();
|
||||
bool is_option_element(int option);
|
||||
void set_default_cursor_position();
|
||||
void decrement_selected_option(bool is_simple);
|
||||
void increment_selected_option(bool is_simple);
|
||||
|
||||
48
include/Menus/SecondScreen3DRelativePositionMenu.hpp
Normal file
48
include/Menus/SecondScreen3DRelativePositionMenu.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef __SECOND_SCREEN_3D_RELPOSMENU_HPP
|
||||
#define __SECOND_SCREEN_3D_RELPOSMENU_HPP
|
||||
|
||||
#include <SFML/Graphics.hpp>
|
||||
#include <chrono>
|
||||
|
||||
#include "TextRectangle.hpp"
|
||||
#include "display_structs.hpp"
|
||||
#include "event_structs.hpp"
|
||||
#include "RelativePositionMenu.hpp"
|
||||
|
||||
#define BACK_X_OUTPUT_OPTION -1
|
||||
|
||||
enum SecondScreen3DRelPosMenuOutAction{
|
||||
SECOND_SCREEN_3D_REL_POS_MENU_NO_ACTION,
|
||||
SECOND_SCREEN_3D_REL_POS_MENU_BACK,
|
||||
SECOND_SCREEN_3D_REL_POS_MENU_TOGGLE_MATCH,
|
||||
SECOND_SCREEN_3D_REL_POS_MENU_CONFIRM,
|
||||
};
|
||||
|
||||
class SecondScreen3DRelativePositionMenu : public RelativePositionMenu {
|
||||
public:
|
||||
SecondScreen3DRelativePositionMenu(bool font_load_success, sf::Font &text_font);
|
||||
~SecondScreen3DRelativePositionMenu();
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> last_input_processed_time;
|
||||
void reset_output_option();
|
||||
void prepare(float scaling_factor, int view_size_x, int view_size_y, ScreenInfo* info);
|
||||
void insert_data(ScreenType stype);
|
||||
SecondScreen3DRelPosMenuOutAction selected_index = SecondScreen3DRelPosMenuOutAction::SECOND_SCREEN_3D_REL_POS_MENU_NO_ACTION;
|
||||
SecondScreen3DRelativePosition selected_confirm_value = SECOND_SCREEN_3D_REL_POS_END;
|
||||
protected:
|
||||
bool is_option_selectable(int index);
|
||||
void set_output_option(int index);
|
||||
std::string get_string_option(int index);
|
||||
void class_setup();
|
||||
|
||||
void option_slice_prepare(int i, int index, int num_vertical_slices, float text_scaling_factor);
|
||||
bool is_option_element(int option);
|
||||
bool is_option_left(int index);
|
||||
bool is_option_right(int index);
|
||||
bool is_option_above(int index);
|
||||
bool is_option_below(int index);
|
||||
private:
|
||||
std::string setTextOptionBool(int index, bool value);
|
||||
std::string get_false_option(int index);
|
||||
int pos_y_subtractor;
|
||||
};
|
||||
#endif
|
||||
@@ -41,6 +41,7 @@ enum VideoMenuOutAction{
|
||||
VIDEO_MENU_CHANGE_TITLEBAR,
|
||||
VIDEO_MENU_VIDEO_EFFECTS_SETTINGS,
|
||||
VIDEO_MENU_SEPARATOR_SETTINGS,
|
||||
VIDEO_MENU_3D_SETTINGS,
|
||||
};
|
||||
|
||||
class VideoMenu : public OptionSelectionMenu {
|
||||
|
||||
Reference in New Issue
Block a user