Initial commit

This commit is contained in:
Daniil Vinogradov
2023-09-19 14:13:09 +02:00
commit 6ec9506113
118 changed files with 2394 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
cmake-build-debug
.DS_Store
+3
View File
@@ -0,0 +1,3 @@
[submodule "extern/borealis"]
path = extern/borealis
url = https://github.com/xfangfang/borealis.git
+134
View File
@@ -0,0 +1,134 @@
cmake_minimum_required(VERSION 3.10)
set(BOREALIS_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/extern/borealis/library)
# build options
include(${BOREALIS_LIBRARY}/cmake/commonOption.cmake)
# Dependencies
option(USE_SHARED_LIB "Whether to use shared libs provided by system" OFF)
cmake_dependent_option(USE_SYSTEM_FMT "" OFF "NOT USE_SHARED_LIB" ON)
cmake_dependent_option(USE_SYSTEM_TINYXML2 "" OFF "NOT USE_SHARED_LIB" ON)
if (APPLE AND PLATFORM_DESKTOP)
option(BUNDLE_MACOS_APP "Bundle a app for macOS" OFF)
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "" FORCE)
set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET[arch=arm64] "11.0" CACHE STRING "" FORCE)
message(STATUS "CMAKE_OSX_ARCHITECTURES: ${CMAKE_OSX_ARCHITECTURES}")
endif ()
# toolchain
include(${BOREALIS_LIBRARY}/cmake/toolchain.cmake)
# project info
project(borealis_demo)
set(VERSION_MAJOR "1")
set(VERSION_MINOR "0")
set(VERSION_ALTER "0")
set(VERSION_BUILD "0")
set(PACKAGE_NAME "com.borealis.demo")
set(VITA_TITLEID "BOREALIS0")
set(VITA_VERSION "01.00")
set(PROJECT_AUTHOR "borealis")
set(PROJECT_ICON ${CMAKE_CURRENT_SOURCE_DIR}/resources/img/demo_icon.jpg)
set(PROJECT_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/resources)
if (USE_LIBROMFS)
add_libromfs(${PROJECT_NAME} ${PROJECT_RESOURCES})
endif ()
add_subdirectory(extern)
# setting src and include
file(GLOB_RECURSE MAIN_SRC app/*.cpp)
set(PLATFORM_OPTION)
if (PLATFORM_DESKTOP)
if (WIN32)
configure_file("${CMAKE_SOURCE_DIR}/app/resource.rc.in" "${CMAKE_BINARY_DIR}/resource.rc")
list(APPEND MAIN_SRC ${CMAKE_BINARY_DIR}/resource.rc)
elseif (BUNDLE_MACOS_APP)
list(APPEND MAIN_SRC ${CMAKE_SOURCE_DIR}/app/borealis.icns)
endif ()
elseif (PLATFORM_SWITCH)
set(PLATFORM_LIBS
# needed by borealis
glfw3 EGL glapi drm_nouveau
# base lib
nx m
)
list(APPEND MAIN_SRC ${CMAKE_SOURCE_DIR}/library/lib/platforms/switch/switch_wrapper.c)
elseif (PLATFORM_PSV)
add_definitions(-D__psp2__ -D__PSV__)
endif ()
# building target
program_target(${PROJECT_NAME} "${MAIN_SRC}")
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)
# building release file
if (PLATFORM_DESKTOP)
if (BUNDLE_MACOS_APP)
set_target_properties(${PROJECT_NAME} PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}
MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_ALTER}"
MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_ALTER}"
MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}"
MACOSX_BUNDLE_ICON_FILE "borealis.icns"
MACOSX_BUNDLE_COPYRIGHT "Copyright 2023 ${PROJECT_AUTHOR}"
RESOURCE "${CMAKE_SOURCE_DIR}/app/borealis.icns"
)
add_custom_target(${PROJECT_NAME}.data
COMMAND "${CMAKE_COMMAND}" -E copy_directory ${PROJECT_RESOURCES} ${PROJECT_NAME}.app/Contents/Resources/resources
)
else ()
add_custom_target(${PROJECT_NAME}.data
COMMAND "${CMAKE_COMMAND}" -E copy_directory ${PROJECT_RESOURCES} ${CMAKE_CURRENT_BINARY_DIR}/resources
)
endif ()
if (NOT USE_LIBROMFS)
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}.data)
endif ()
elseif (PLATFORM_PSV)
set(VITA_MKSFOEX_FLAGS "${VITA_MKSFOEX_FLAGS} -d ATTRIBUTE2=12") # max heap size mode
vita_create_self(${PROJECT_NAME}.self ${PROJECT_NAME} UNSAFE)
if (USE_LIBROMFS)
vita_create_vpk(${PROJECT_NAME}.vpk ${VITA_TITLEID} ${PROJECT_NAME}.self
VERSION ${VITA_VERSION}
NAME ${PROJECT_NAME}
FILE ${CMAKE_SOURCE_DIR}/psv/sce_sys sce_sys
FILE ${CMAKE_SOURCE_DIR}/psv/module/ module
)
else()
vita_create_vpk(${PROJECT_NAME}.vpk ${VITA_TITLEID} ${PROJECT_NAME}.self
VERSION ${VITA_VERSION}
NAME ${PROJECT_NAME}
FILE ${CMAKE_SOURCE_DIR}/resources resources
FILE ${CMAKE_SOURCE_DIR}/psv/sce_sys sce_sys
FILE ${CMAKE_SOURCE_DIR}/psv/module/ module
)
endif()
elseif (PLATFORM_SWITCH)
add_custom_target(${PROJECT_NAME}.nro DEPENDS ${PROJECT_NAME}
COMMAND ${NX_NACPTOOL_EXE} --create "${PROJECT_NAME}" "${PROJECT_AUTHOR}" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_ALTER}" ${PROJECT_NAME}.nacp --titleid=${PROJECT_TITLEID}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_RESOURCES} ${CMAKE_BINARY_DIR}/resources
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/resources/font
COMMAND ${NX_ELF2NRO_EXE} ${PROJECT_NAME}.elf ${PROJECT_NAME}.nro --icon=${PROJECT_ICON} --nacp=${PROJECT_NAME}.nacp --romfsdir=${CMAKE_BINARY_DIR}/resources
)
elseif (PLATFORM_IOS)
ios_bundle(
"${CMAKE_CURRENT_SOURCE_DIR}/app/ios/tvos/Splash.storyboard"
"${CMAKE_CURRENT_SOURCE_DIR}/app/ios/iphoneos/Splash.storyboard"
"${CMAKE_CURRENT_SOURCE_DIR}/app/ios/Images.xcassets"
"${CMAKE_CURRENT_SOURCE_DIR}/app/ios/iOSBundleInfo.plist.in"
"borealis"
"${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_ALTER}")
endif ()
target_include_directories(${PROJECT_NAME} PRIVATE app ${APP_PLATFORM_INCLUDE})
target_compile_options(${PROJECT_NAME} PRIVATE -ffunction-sections -fdata-sections ${APP_PLATFORM_OPTION})
target_link_libraries(${PROJECT_NAME} PRIVATE borealis ${APP_PLATFORM_LIB})
BIN
View File
Binary file not shown.
+67
View File
@@ -0,0 +1,67 @@
/*
Copyright 2020-2021 natinusala
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "captioned_image.hpp"
CaptionedImage::CaptionedImage()
{
// Load the XML file and inflate ourself with its content
// The top-level Box in the XML corresponds to us, and every XML child
// is added to our children (and the attributes are applied)
// The CaptionedImage instance basically becomes what's written in the XML
this->inflateFromXMLRes("xml/views/captioned_image.xml");
// The label stays hidden until focused, so hide it right away
this->label->hide([] {});
// Forward Image and Label XML attributes
this->forwardXMLAttribute("scalingType", this->image);
this->forwardXMLAttribute("image", this->image);
this->forwardXMLAttribute("focusUp", this->image);
this->forwardXMLAttribute("focusRight", this->image);
this->forwardXMLAttribute("focusDown", this->image);
this->forwardXMLAttribute("focusLeft", this->image);
this->forwardXMLAttribute("imageWidth", this->image, "width");
this->forwardXMLAttribute("imageHeight", this->image, "height");
this->forwardXMLAttribute("caption", this->label, "text");
this->addGestureRecognizer(new brls::TapGestureRecognizer(this, brls::TapGestureConfig(false, brls::SOUND_NONE, brls::SOUND_NONE, brls::SOUND_NONE)));
}
void CaptionedImage::onChildFocusGained(brls::View* directChild, brls::View* focusedView)
{
// Called when a child of ours gets focused, in that case it's the Image
Box::onChildFocusGained(directChild, focusedView);
this->label->show([] {});
}
void CaptionedImage::onChildFocusLost(brls::View* directChild, brls::View* focusedView)
{
// Called when a child of ours losts focused, in that case it's the Image
Box::onChildFocusLost(directChild, focusedView);
this->label->hide([] {});
}
brls::View* CaptionedImage::create()
{
// Called by the XML engine to create a new CaptionedImage
return new CaptionedImage();
}
+34
View File
@@ -0,0 +1,34 @@
/*
Copyright 2020-2021 natinusala
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <borealis.hpp>
class CaptionedImage : public brls::Box
{
public:
CaptionedImage();
void onChildFocusGained(brls::View* directChild, brls::View* focusedView) override;
void onChildFocusLost(brls::View* directChild, brls::View* focusedView) override;
static brls::View* create();
private:
BRLS_BIND(brls::Image, image, "image");
BRLS_BIND(brls::Label, label, "label");
};
+66
View File
@@ -0,0 +1,66 @@
/*
Copyright 2021 natinusala
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "components_tab.hpp"
#include "pokemon_view.hpp"
ComponentsTab::ComponentsTab()
{
// Inflate the tab from the XML file
this->inflateFromXMLRes("xml/tabs/components.xml");
// Bind the button click to a method using the macro (just for the sake of showcasing it, it's overkill in this situation)
BRLS_REGISTER_CLICK_BY_ID("button_primary", this->onPrimaryButtonClicked);
// Get a handle to the button and register the action directly
brls::Button* highlightButton = (brls::Button*)this->getView("button_highlight");
highlightButton->registerAction(
"Honk", brls::BUTTON_A, [](brls::View* view) { return true; }, false, false, brls::SOUND_HONK);
progress->setText(std::to_string((int)(slider->getProgress() * 100)));
slider->getProgressEvent()->subscribe([this](float progress) {
this->progress->setText(std::to_string((int)(progress * 100)));
});
}
int selected = 0;
bool ComponentsTab::onPrimaryButtonClicked(brls::View* view)
{
// brls::AppletFrame* frame = new brls::AppletFrame(PokemonView::create());
// frame->setFooterVisibility(brls::Visibility::GONE);
// brls::Application::pushActivity(new brls::Activity(frame));
brls::Dropdown* dropdown = new brls::Dropdown(
"Test", std::vector<std::string> { "Test 1", "Test 2", "Test 3", "Test 4", "Test 5", "Test 6", "Test 7", "Test 8", "Test 9", "Test 10", "Test 11", "Test 12", "Test 13" }, [](int _selected) {
selected = _selected;
},
selected);
// brls::Dropdown* dropdown = new brls::Dropdown(
// "Test", std::vector<std::string> { "Test 1", "Test 2", "Test 3" }, [](int _selected) {
// selected = _selected;
// },
// selected);
brls::Application::pushActivity(new brls::Activity(dropdown));
brls::Logger::info("Clicked");
return true;
}
brls::View* ComponentsTab::create()
{
// Called by the XML engine to create a new ComponentsTab
return new ComponentsTab();
}
+32
View File
@@ -0,0 +1,32 @@
/*
Copyright 2021 natinusala
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <borealis.hpp>
class ComponentsTab : public brls::Box
{
public:
ComponentsTab();
static brls::View* create();
private:
BRLS_BIND(brls::Label, progress, "progress");
BRLS_BIND(brls::Slider, slider, "slider");
bool onPrimaryButtonClicked(brls::View* view);
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

@@ -0,0 +1,346 @@
{
"images" : [
{
"filename" : "40.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "60.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"filename" : "29.png",
"idiom" : "iphone",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "58.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "87.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "80.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "120.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"filename" : "57.png",
"idiom" : "iphone",
"scale" : "1x",
"size" : "57x57"
},
{
"filename" : "114.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "57x57"
},
{
"filename" : "120.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "180.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"filename" : "20.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"filename" : "40.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "29.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "58.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "40.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"filename" : "80.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "50.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "50x50"
},
{
"filename" : "100.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "50x50"
},
{
"filename" : "72.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "72x72"
},
{
"filename" : "144.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "72x72"
},
{
"filename" : "76.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"filename" : "152.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"filename" : "167.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"filename" : "1024.png",
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
},
{
"filename" : "16.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"filename" : "32.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"filename" : "32.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"filename" : "64.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"filename" : "128.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"filename" : "256.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"filename" : "256.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"filename" : "512.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"filename" : "512.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"filename" : "1024.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
},
{
"filename" : "48.png",
"idiom" : "watch",
"role" : "notificationCenter",
"scale" : "2x",
"size" : "24x24",
"subtype" : "38mm"
},
{
"filename" : "55.png",
"idiom" : "watch",
"role" : "notificationCenter",
"scale" : "2x",
"size" : "27.5x27.5",
"subtype" : "42mm"
},
{
"filename" : "58.png",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "87.png",
"idiom" : "watch",
"role" : "companionSettings",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "66.png",
"idiom" : "watch",
"role" : "notificationCenter",
"scale" : "2x",
"size" : "33x33",
"subtype" : "45mm"
},
{
"filename" : "80.png",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "40x40",
"subtype" : "38mm"
},
{
"filename" : "88.png",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "44x44",
"subtype" : "40mm"
},
{
"filename" : "92.png",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "46x46",
"subtype" : "41mm"
},
{
"filename" : "100.png",
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "50x50",
"subtype" : "44mm"
},
{
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "51x51",
"subtype" : "45mm"
},
{
"idiom" : "watch",
"role" : "appLauncher",
"scale" : "2x",
"size" : "54x54",
"subtype" : "49mm"
},
{
"filename" : "172.png",
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "86x86",
"subtype" : "38mm"
},
{
"filename" : "196.png",
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "98x98",
"subtype" : "42mm"
},
{
"filename" : "216.png",
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "108x108",
"subtype" : "44mm"
},
{
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "117x117",
"subtype" : "45mm"
},
{
"idiom" : "watch",
"role" : "quickLook",
"scale" : "2x",
"size" : "129x129",
"subtype" : "49mm"
},
{
"filename" : "1024.png",
"idiom" : "watch-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
+55
View File
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
<key>UILaunchStoryboardName</key>
<string>Splash</string>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
</array>
</dict>
</dict>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app.</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app.</string>
</dict>
</plist>
+29
View File
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder.AppleTV.Storyboard" version="3.0" toolsVersion="13122.16" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="wu6-TO-1qx"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
+95
View File
@@ -0,0 +1,95 @@
/*
Copyright 2020-2021 natinusala
Copyright 2019 p-sam
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Switch include only necessary for demo videos recording
#ifdef __SWITCH__
#include <switch.h>
#endif
#if defined(ANDROID) || defined(IOS)
#include <SDL2/SDL_main.h>
#endif
#include <borealis.hpp>
#include <cstdlib>
#include <string>
#include "captioned_image.hpp"
#include "components_tab.hpp"
#include "main_activity.hpp"
#include "pokemon_view.hpp"
#include "recycling_list_tab.hpp"
#include "settings_tab.hpp"
using namespace brls::literals; // for _i18n
int main(int argc, char* argv[])
{
// Enable recording for Twitter memes
#ifdef __SWITCH__
appletInitializeGamePlayRecording();
#endif
// Set log level
// We recommend to use INFO for real apps
brls::Logger::setLogLevel(brls::LogLevel::LOG_DEBUG);
brls::Application::setFPSStatus(true);
// Init the app and i18n
if (!brls::Application::init())
{
brls::Logger::error("Unable to init Borealis application");
return EXIT_FAILURE;
}
brls::Application::createWindow("demo/title"_i18n);
brls::Application::getPlatform()->setThemeVariant(brls::ThemeVariant::DARK);
// Have the application register an action on every activity that will quit when you press BUTTON_START
brls::Application::setGlobalQuit(false);
// Register custom views (including tabs, which are views)
brls::Application::registerXMLView("CaptionedImage", CaptionedImage::create);
brls::Application::registerXMLView("RecyclingListTab", RecyclingListTab::create);
brls::Application::registerXMLView("ComponentsTab", ComponentsTab::create);
brls::Application::registerXMLView("PokemonView", PokemonView::create);
brls::Application::registerXMLView("SettingsTab", SettingsTab::create);
// Add custom values to the theme
brls::Theme::getLightTheme().addColor("captioned_image/caption", nvgRGB(2, 176, 183));
brls::Theme::getDarkTheme().addColor("captioned_image/caption", nvgRGB(51, 186, 227));
// Add custom values to the style
brls::getStyle().addMetric("about/padding_top_bottom", 50);
brls::getStyle().addMetric("about/padding_sides", 75);
brls::getStyle().addMetric("about/description_margin", 50);
// Create and push the main activity to the stack
brls::Application::pushActivity(new MainActivity());
// Run the app
while (brls::Application::mainLoop())
;
// Exit
return EXIT_SUCCESS;
}
#ifdef __WINRT__
#include <borealis/core/main.hpp>
#endif
+17
View File
@@ -0,0 +1,17 @@
/*
Copyright 2020-2021 natinusala
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "main_activity.hpp"
+26
View File
@@ -0,0 +1,26 @@
/*
Copyright 2020-2021 natinusala
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <borealis.hpp>
class MainActivity : public brls::Activity
{
public:
// Declare that the content of this activity is the given XML file
CONTENT_FROM_XML_RES("activity/main.xml");
};
+72
View File
@@ -0,0 +1,72 @@
/*
Copyright 2021 XITRIX
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "pokemon_view.hpp"
#include <borealis/core/i18n.hpp>
using namespace brls::literals;
bool dismissView(brls::View* view, PokemonView* pock)
{
return true;
}
PokemonView::PokemonView(Pokemon pokemon)
: pokemon(pokemon)
{
// Inflate the tab from the XML file
this->inflateFromXMLRes("xml/views/pokemon.xml");
auto dismissAction = [this](View* view) {
this->dismiss();
return true;
};
brls::Label* label = new brls::Label();
label->setText(brls::Hint::getKeyIcon(brls::ControllerButton::BUTTON_RB) + " Закрыть");
label->setFontSize(24);
label->setMargins(0, 12, 0, 12);
brls::Box* holder = new brls::Box();
holder->addView(label);
holder->setFocusable(true);
holder->addGestureRecognizer(new brls::TapGestureRecognizer(holder));
holder->registerClickAction(dismissAction);
holder->registerAction("Close", brls::ControllerButton::BUTTON_RB, dismissAction, true);
registerAction("Close", brls::ControllerButton::BUTTON_RB, dismissAction, true);
getAppletFrameItem()->title = pokemon.name;
getAppletFrameItem()->setIconFromRes("img/pokemon/" + pokemon.id + ".png");
// getAppletFrameItem()->hintView = holder;
image->setImageFromRes("img/pokemon/" + pokemon.id + ".png");
description->setText("It's a pokemon with name: " + pokemon.name + "\nCollect them all to became a Shaman king!");
this->getView("close_button")->registerAction(
"hints/ok"_i18n, brls::BUTTON_A, [this](brls::View* view) {
this->dismiss();
return true;
},
false, false, brls::SOUND_BACK);
}
brls::View* PokemonView::create()
{
// Called by the XML engine to create a new ComponentsTab
return new PokemonView();
}
+49
View File
@@ -0,0 +1,49 @@
/*
Copyright 2021 XITRIX
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <borealis.hpp>
class Pokemon
{
public:
std::string id;
std::string name;
Pokemon(std::string id, std::string name)
: id(id)
, name(name)
{
}
};
class PokemonView : public brls::Box
{
public:
PokemonView(Pokemon pokemon);
PokemonView()
: PokemonView(Pokemon("001", "ТУПА ПАКИМОН!!!"))
{
}
static brls::View* create();
private:
Pokemon pokemon;
BRLS_BIND(brls::Image, image, "image");
BRLS_BIND(brls::Label, description, "description");
};
+93
View File
@@ -0,0 +1,93 @@
/*
Copyright 2020-2021 natinusala
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "recycling_list_tab.hpp"
#include "pokemon_view.hpp"
std::vector<Pokemon> pokemons;
RecyclerCell::RecyclerCell()
{
this->inflateFromXMLRes("xml/cells/cell.xml");
}
RecyclerCell* RecyclerCell::create()
{
return new RecyclerCell();
}
// DATA SOURCE
int DataSource::numberOfSections(brls::RecyclerFrame* recycler)
{
return 2;
}
int DataSource::numberOfRows(brls::RecyclerFrame* recycler, int section)
{
return pokemons.size();
}
std::string DataSource::titleForHeader(brls::RecyclerFrame* recycler, int section)
{
if (section == 0)
return "";
return "Section #" + std::to_string(section+1);
}
brls::RecyclerCell* DataSource::cellForRow(brls::RecyclerFrame* recycler, brls::IndexPath indexPath)
{
RecyclerCell* item = (RecyclerCell*)recycler->dequeueReusableCell("Cell");
item->label->setText(pokemons[indexPath.row].name);
item->image->setImageFromRes("img/pokemon/thumbnails/" + pokemons[indexPath.row].id + ".png");
return item;
}
void DataSource::didSelectRowAt(brls::RecyclerFrame* recycler, brls::IndexPath indexPath)
{
// brls::Logger::info("Item Index(" + std::to_string(index.section) + ":" + std::to_string(index.row) + ") selected.");
recycler->present(new PokemonView(pokemons[indexPath.row]));
}
// RECYCLER VIEW
RecyclingListTab::RecyclingListTab()
{
// Inflate the tab from the XML file
this->inflateFromXMLRes("xml/tabs/recycling_list.xml");
pokemons.clear();
pokemons.push_back(Pokemon("001", "Bulbasaur"));
pokemons.push_back(Pokemon("004", "Charmander"));
pokemons.push_back(Pokemon("007", "Squirtle"));
pokemons.push_back(Pokemon("011", "Metapod"));
pokemons.push_back(Pokemon("014", "Kakuna"));
pokemons.push_back(Pokemon("017", "Pidgeotto"));
pokemons.push_back(Pokemon("021", "Spearow"));
pokemons.push_back(Pokemon("024", "Arbok"));
pokemons.push_back(Pokemon("027", "Sandshrew"));
recycler->estimatedRowHeight = 70;
recycler->registerCell("Header", []() { return RecyclerHeader::create(); });
recycler->registerCell("Cell", []() { return RecyclerCell::create(); });
recycler->setDataSource(new DataSource());
}
brls::View* RecyclingListTab::create()
{
// Called by the XML engine to create a new RecyclingListTab
return new RecyclingListTab();
}
+59
View File
@@ -0,0 +1,59 @@
/*
Copyright 2020-2021 natinusala
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <borealis.hpp>
class RecyclerHeader
: public brls::RecyclerHeader
{
};
class RecyclerCell
: public brls::RecyclerCell
{
public:
RecyclerCell();
BRLS_BIND(brls::Rectangle, accent, "brls/sidebar/item_accent");
BRLS_BIND(brls::Label, label, "title");
BRLS_BIND(brls::Image, image, "image");
static RecyclerCell* create();
};
class DataSource
: public brls::RecyclerDataSource
{
public:
int numberOfSections(brls::RecyclerFrame* recycler) override;
int numberOfRows(brls::RecyclerFrame* recycler, int section) override;
brls::RecyclerCell* cellForRow(brls::RecyclerFrame* recycler, brls::IndexPath index) override;
void didSelectRowAt(brls::RecyclerFrame* recycler, brls::IndexPath indexPath) override;
std::string titleForHeader(brls::RecyclerFrame* recycler, int section) override;
};
class RecyclingListTab : public brls::Box
{
public:
RecyclingListTab();
static brls::View* create();
private:
BRLS_BIND(brls::RecyclerFrame, recycler, "recycler");
};
+47
View File
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<application>
<windowsSettings>
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
</windowsSettings>
</application>
<assemblyIdentity
type="win32"
version="1.0.0.0"
processorArchitecture="*"
name="demo.exe"
/>
<description>demo</description>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
</application>
</compatibility>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
+28
View File
@@ -0,0 +1,28 @@
1 VERSIONINFO
FILEVERSION ${VERSION_MAJOR}, ${VERSION_MINOR}, ${VERSION_ALTER}, ${VERSION_BUILD}
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "LegalCopyright", "${PROJECT_AUTHOR}"
VALUE "OriginalFilename", "${PROJECT_NAME}.exe"
VALUE "ProductVersion", "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_ALTER}.${VERSION_BUILD}"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
1 24 "${CMAKE_SOURCE_DIR}/demo/resource.manifest"
+70
View File
@@ -0,0 +1,70 @@
/*
Copyright 2021 natinusala
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "settings_tab.hpp"
using namespace brls::literals; // for _i18n
bool radioSelected = false;
SettingsTab::SettingsTab()
{
// Inflate the tab from the XML file
this->inflateFromXMLRes("xml/tabs/settings.xml");
radio->title->setText("Radio cell");
radio->setSelected(radioSelected);
radio->registerClickAction([this](brls::View* view) {
radioSelected = !radioSelected;
this->radio->setSelected(radioSelected);
return true;
});
boolean->title->setText("Switcher");
selector->init("Selector", { "Test 1", "Test 2", "Test 3", "Test 4", "Test 5", "Test 6", "Test 7", "Test 8", "Test 9", "Test 10", "Test 11", "Test 12", "Test 13" }, 0, [](int selected) {
}, [](int selected) {
auto dialog = new brls::Dialog(fmt::format("selected {}", selected));
dialog->addButton("hints/ok"_i18n, []() {});
dialog->open();
});
input->init(
"Input text", "https://github.com", [](std::string text) {
},
"Placeholder", "Hint");
inputNumeric->init(
"Input number", 2448, [](int number) {
},
"Hint");
ipAddress->setDetailText(brls::Application::getPlatform()->getIpAddress());
dnsServer->setDetailText(brls::Application::getPlatform()->getDnsServer());
input->registerAction("hints/open"_i18n, brls::BUTTON_X, [](brls::View* view) {
brls::DetailCell *cell = dynamic_cast<brls::DetailCell *>(view);
brls::Application::getPlatform()->openBrowser(cell->detail->getFullText());
return true;
}, false, false, brls::SOUND_CLICK);
}
brls::View* SettingsTab::create()
{
return new SettingsTab();
}
+35
View File
@@ -0,0 +1,35 @@
/*
Copyright 2021 natinusala
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <borealis.hpp>
class SettingsTab : public brls::Box
{
public:
SettingsTab();
BRLS_BIND(brls::RadioCell, radio, "radio");
BRLS_BIND(brls::BooleanCell, boolean, "boolean");
BRLS_BIND(brls::SelectorCell, selector, "selector");
BRLS_BIND(brls::InputCell, input, "input");
BRLS_BIND(brls::InputNumericCell, inputNumeric, "inputNumeric");
BRLS_BIND(brls::DetailCell, ipAddress, "ipAddress");
BRLS_BIND(brls::DetailCell, dnsServer, "dnsServer");
static brls::View* create();
};
+2
View File
@@ -0,0 +1,2 @@
add_subdirectory(borealis/library)
Vendored Submodule
+1
Submodule extern/borealis added at 6cf1fe7000
+2
View File
@@ -0,0 +1,2 @@
User-Regular.ttf
User-Switch-Icons.ttf
View File
View File
Binary file not shown.
Binary file not shown.
+51
View File
@@ -0,0 +1,51 @@
{
"title": "Borealis Demo App",
"tabs": {
"components": "Basic components",
"scroll": "Scroll test",
"layout": "Layout and alignment",
"pokedex": "Pokedex",
"settings": "Settings",
"popups": "Popups, notifications and dialogs",
"hos_layout": "Horizon layouts",
"misc_layouts": "Misc. layouts",
"misc_components": "Misc. components",
"misc_tools": "Misc. dev tools",
"about": "About borealis"
},
"welcome": "Welcome to the borealis demo! Feel free to explore and discover what the library can do.",
"components": {
"buttons_header": "Buttons",
"button_primary": "Primary button",
"button_highlight": "\uE13C Highlight button",
"button_wrapping": "Default button with wrapping text",
"button_bordered": "Bordered button",
"button_borderless": "Borderless button",
"slider_header": "Slider",
"labels_header": "Labels",
"regular_label": "This is a label. By default, they will automatically wrap and expand their height, should the remaining vertical space allow it. Otherwise, they will be truncated, like some of the tabs of the sidebar.\nThis is a label. By default, they will automatically wrap and expand their height, should the remaining vertical space allow it. Otherwise, they will be truncated, like some of the tabs of the sidebar.",
"label_left": "This label is left-aligned",
"label_center": "This label is center-aligned",
"label_right": "This label is right-aligned",
"images_header_title": "Images",
"images_header_subtitle": "Focus them to see the scaling method",
"images_downscaled": "Downscaled",
"images_original": "Original",
"images_upscaled": "Upscaled",
"images_stretched": "Stretched",
"images_cropped": "Cropped"
},
"about": {
"title": "borealis",
"description": "A hardware accelerated, controller and TV oriented UI library for PC and Nintendo Switch (libnx).",
"github": "Find it on github.com/natinusala/borealis",
"licence": "Licensed under Apache 2.0",
"logo_credit": "Logo by @MeganRoshelle"
}
}
+14
View File
@@ -0,0 +1,14 @@
{
"ok": "OK",
"cancel": "Cancel",
"back": "Back",
"exit": "Exit",
"exit_hint": "You will exit this app",
"open": "Open",
"on": "On",
"off": "Off",
"delete": "Delete",
"save": "Save",
"input": "Please input...",
"submit": "Submit"
}
File diff suppressed because one or more lines are too long
+15
View File
@@ -0,0 +1,15 @@
{
"hints": {
"ok": "OK",
"back": "Retour",
"exit": "Quitter"
},
"crash_frame": {
"button": "OK"
},
"thumbnail_sidebar": {
"save": "Sauvegarder"
}
}
+1
View File
@@ -0,0 +1 @@
{}
+17
View File
@@ -0,0 +1,17 @@
{
"hints": {
"ok": "OK",
"back": "Назад",
"exit": "Закрыть",
"on": "Вкл.",
"off": "Выкл."
},
"crash_frame": {
"button": "OK"
},
"thumbnail_sidebar": {
"save": "Save"
}
}
+45
View File
@@ -0,0 +1,45 @@
{
"title": "Borealis Demo App",
"tabs": {
"components": "Basic components",
"scroll": "Scroll test",
"layout": "Layout and alignment",
"pokedex": "Pokedex",
"settings": "Settings",
"popups": "Popups, notifications and dialogs",
"hos_layout": "Horizon layouts",
"misc_layouts": "Misc. layouts",
"misc_components": "Misc. components",
"misc_tools": "Misc. dev tools",
"about": "About borealis"
},
"welcome": "Welcome to the borealis demo! Feel free to explore and discover what the library can do.",
"components": {
"buttons_header": "Buttons",
"button_primary": "Primary button",
"button_highlight": "\uE13C Highlight button",
"button_wrapping": "Default button with wrapping text",
"button_bordered": "Bordered button",
"button_borderless": "Borderless button",
"slider_header": "Slider",
"labels_header": "Labels",
"regular_label": "This is a label. By default, they will automatically wrap and expand their height, should the remaining vertical space allow it. Otherwise, they will be truncated, like some of the tabs of the sidebar.\nThis is a label. By default, they will automatically wrap and expand their height, should the remaining vertical space allow it. Otherwise, they will be truncated, like some of the tabs of the sidebar.",
"label_left": "This label is left-aligned",
"label_center": "This label is center-aligned",
"label_right": "This label is right-aligned",
"images_header_title": "Images",
"images_header_subtitle": "Focus them to see the scaling method",
"images_downscaled": "Downscaled",
"images_original": "Original",
"images_upscaled": "Upscaled",
"images_stretched": "Stretched",
"images_cropped": "Cropped"
},
"about": {
"title": "borealis",
"description": "A hardware accelerated, controller and TV oriented UI library for PC and Nintendo Switch (libnx).",
"github": "Find it on github.com/natinusala/borealis",
"licence": "Licensed under Apache 2.0",
"logo_credit": "Logo by @MeganRoshelle"
}
}
+14
View File
@@ -0,0 +1,14 @@
{
"ok": "确定",
"back": "返回",
"cancel": "取消",
"exit": "退出",
"exit_hint": "即将退出应用",
"open": "打开",
"on": "开",
"off": "关",
"delete": "删除",
"save": "保存",
"input": "请输入...",
"submit": "提交"
}
+3
View File
@@ -0,0 +1,3 @@
{
"text": "Borealis是一个跨平台的UI库是怎么回事呢?Borealis相信大家都很熟悉,但是Borealis是一个跨平台的UI库是怎么回事呢,下面就让小编带大家一起了解吧。\n\nBorealis是一个跨平台的UI库,其实就是底层用到了opengl,大家可能会很惊讶Borealis怎么会是一个跨平台的UI库呢?但事实就是这样,小编也感到非常惊讶。\n\n这就是关于Borealis是一个跨平台的UI库的事情了,大家有什么想法呢,欢迎在评论区告诉小编一起讨论哦!Borealis是一个跨平台的UI库是怎么回事呢?Borealis相信大家都很熟悉,但是Borealis是一个跨平台的UI库是怎么回事呢,下面就让小编带大家一起了解吧。\n\nBorealis是一个跨平台的UI库,其实就是底层用到了opengl,大家可能会很惊讶Borealis怎么会是一个跨平台的UI库呢?但事实就是这样,小编也感到非常惊讶。\n\n这就是关于Borealis是一个跨平台的UI库的事情了,大家有什么想法呢,欢迎在评论区告诉小编一起讨论哦!Borealis是一个跨平台的UI库是怎么回事呢?Borealis相信大家都很熟悉,但是Borealis是一个跨平台的UI库是怎么回事呢,下面就让小编带大家一起了解吧。\n\nBorealis是一个跨平台的UI库,其实就是底层用到了opengl,大家可能会很惊讶Borealis怎么会是一个跨平台的UI库呢?但事实就是这样,小编也感到非常惊讶。\n\n这就是关于Borealis是一个跨平台的UI库的事情了,大家有什么想法呢,欢迎在评论区告诉小编一起讨论哦!"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Some files were not shown because too many files have changed in this diff Show More