-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
175 changed files
with
20,196 additions
and
883 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 |
---|---|---|
|
@@ -3,5 +3,11 @@ | |
|
||
//#define RES_MY_RES CINDER_RESOURCE( ../resources/, image_name.png, 128, IMAGE ) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
68 changes: 68 additions & 0 deletions
68
samples/BaseAppCrossPlatform/src/BaseAppCrossPlatformApp.cpp
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,68 @@ | ||
#include "cinder/app/App.h" | ||
#include "cinder/app/RendererGl.h" | ||
#include "cinder/gl/gl.h" | ||
|
||
#include "core/BaseApp.h" | ||
#include "views/TouchView.h" | ||
|
||
using namespace ci; | ||
using namespace ci::app; | ||
using namespace std; | ||
|
||
using namespace bluecadet::core; | ||
using namespace bluecadet::views; | ||
using namespace bluecadet::touch; | ||
|
||
class BaseAppCrossPlatformApp : public BaseApp { | ||
public: | ||
static void prepareSettings(ci::app::App::Settings* settings); | ||
void setup() override; | ||
void update() override; | ||
void draw() override; | ||
}; | ||
|
||
void BaseAppCrossPlatformApp::prepareSettings(ci::app::App::Settings* settings) { | ||
// Use this method to set up your window | ||
SettingsManager::getInstance()->mFullscreen = false; | ||
SettingsManager::getInstance()->mWindowSize = ivec2(1280, 720); | ||
SettingsManager::getInstance()->mBorderless = false; | ||
|
||
BaseApp::prepareSettings(settings); | ||
|
||
// Optional: configure a multi-screen layout (defaults to 1x1 1080p landscape) | ||
ScreenLayout::getInstance()->setDisplaySize(ivec2(1080, 1920)); | ||
ScreenLayout::getInstance()->setNumRows(1); | ||
ScreenLayout::getInstance()->setNumColumns(3); | ||
} | ||
|
||
void BaseAppCrossPlatformApp::setup() { | ||
|
||
BaseApp::setup(); | ||
BaseApp::addTouchSimulatorParams(); | ||
|
||
// Optional: configure your root view | ||
getRootView()->setBackgroundColor(Color::gray(0.5f)); | ||
|
||
// Sample content | ||
auto button = TouchViewRef(new TouchView()); | ||
button->setSize(getRootView()->getSize() * 0.75f); | ||
button->setPosition((getRootView()->getSize() - button->getSize()) * 0.5f); | ||
button->setBackgroundColor(ColorA(1, 0, 0)); | ||
button->setMultiTouchEnabled(true); | ||
button->mDidBeginTouch.connect([](bluecadet::touch::TouchEvent e) { e.touchTarget->setAlpha(0.75f); }); | ||
button->mDidEndTouch.connect([](bluecadet::touch::TouchEvent e) { e.touchTarget->setAlpha(1.0f); }); | ||
getRootView()->addChild(button); | ||
} | ||
|
||
void BaseAppCrossPlatformApp::update() { | ||
// Optional override. BaseApp::update() will update all views. | ||
BaseApp::update(); | ||
} | ||
|
||
void BaseAppCrossPlatformApp::draw() { | ||
// Optional override. BaseApp::draw() will draw all views. | ||
BaseApp::draw(); | ||
} | ||
|
||
// Make sure to pass a reference to prepareSettings to configure the app correctly. MSAA and other render options are optional. | ||
CINDER_APP(BaseAppCrossPlatformApp, RendererGl(RendererGl::Options().msaa(4)), BaseAppCrossPlatformApp::prepareSettings); |
26 changes: 26 additions & 0 deletions
26
samples/BaseAppCrossPlatform/vc2013/BaseAppCrossPlatform.sln
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,26 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2013 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BaseAppCrossPlatform", "BaseAppCrossPlatform.vcxproj", "{9BDC3383-716A-4AC9-BABC-54C14253623D}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Win32 = Debug|Win32 | ||
Release|Win32 = Release|Win32 | ||
Debug|x64 = Debug|x64 | ||
Release|x64 = Release|x64 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{9BDC3383-716A-4AC9-BABC-54C14253623D}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
{9BDC3383-716A-4AC9-BABC-54C14253623D}.Debug|Win32.Build.0 = Debug|Win32 | ||
{9BDC3383-716A-4AC9-BABC-54C14253623D}.Release|Win32.ActiveCfg = Release|Win32 | ||
{9BDC3383-716A-4AC9-BABC-54C14253623D}.Release|Win32.Build.0 = Release|Win32 | ||
{9BDC3383-716A-4AC9-BABC-54C14253623D}.Debug|x64.ActiveCfg = Debug|x64 | ||
{9BDC3383-716A-4AC9-BABC-54C14253623D}.Debug|x64.Build.0 = Debug|x64 | ||
{9BDC3383-716A-4AC9-BABC-54C14253623D}.Release|x64.ActiveCfg = Release|x64 | ||
{9BDC3383-716A-4AC9-BABC-54C14253623D}.Release|x64.Build.0 = Release|x64 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.