Skip to content

Commit 198d36f

Browse files
author
Benjamin Bojko
committed
Merge branch 'release/1.7.0'
2 parents f62bc91 + 22f66c5 commit 198d36f

File tree

80 files changed

+3865
-1241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+3865
-1241
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,4 @@ $RECYCLE.BIN/
176176
._.DS_Store
177177

178178
*.xcuserstate
179+
src/bluecadet/core/BaseApp.h

README.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,33 @@ A basic, rectangular view with an optional size and background color that can co
6060
* Layout-caching minimizes re-calculation of layout while maintaining ability to call methods like `getSize()` at any time
6161
* *Windows only, requires [Cinder-BluecadetText](/bluecadet/Cinder-BluecadetText)*
6262

63+
### MaskView
64+
65+
* A `MaskView` can use any `BaseView` as a mask for its child views
66+
* `REVEAL` and `HIDE` masked content modes (essentially stencil or knockout)
67+
* Uses GL stencils, so doesn't support semi-transparency, but does allow for more custom shapes than GL scissor
68+
* Most view subclasses can be used individually and combined as masks
69+
70+
### SettingsManager
71+
72+
The SettingsManager provides an easy means to map JSON settings to app parameters, override them via command line parameters for development and load/save them to/from JSON via InterfaceGl params.
73+
6374
### View Samples
6475

6576
![](docs/media/view-types-sample.gif)
6677

78+
### Misc Features
79+
80+
| Multi-Screen Support | Virtual Touches & Stress Testing |
81+
|---|---|
82+
| ![](docs/media/debug-multi-screen.gif) | ![](docs/media/debug-touch-stress-test.gif) |
83+
| Bezel compensation, debug layout, mini-map, keyboard-based panning/zooming. | Built-in support to create virtual touches and stress test your app. Can also be used to simulate complex touch patterns like capacitive fiducials. |
84+
85+
| Multi-Touch Simulation | Debug Info | Plugin Support |
86+
|---|---|--|
87+
| ![](docs/media/debug-multi-touch-sim.gif) | ![](docs/media/debug-view-info.gif) | ![](docs/media/debug-plugins.gif) |
88+
| Simulate multiple touches with your mouse cursor. | Display view bounds, position, transform origin, type and name or id. | Simulate, intercept and manipulate touches with custom plugins. |
89+
6790
## Getting Started
6891

6992
Clone the block and check the dependencies below to make sure you're all set to start your first project.
@@ -99,27 +122,22 @@ void BaseAppSampleApp::prepareSettings(ci::app::App::Settings* settings) {
99122
SettingsManager::setInstance(myApp::MyAppSettingsManager::getInstance());
100123

101124
// Initialize the settings manager with the cinder app settings and the settings json
102-
SettingsManager::getInstance()->setup(settings, ci::app::getAssetPath("appSettings.json"), [](SettingsManager * manager) {
103-
// Optional: Override json defaults at runtime
104-
manager->mFullscreen = false;
105-
manager->mWindowSize = ivec2(1280, 720);
106-
});
125+
SettingsManager::getInstance()->setup(settings);
107126
}
108127

109128
void BaseAppSampleApp::setup() {
110129

111130
BaseApp::setup();
112-
BaseApp::addTouchSimulatorParams();
113131

114132
// Optional: configure your root view
115133
getRootView()->setBackgroundColor(Color::gray(0.5f));
116134

117135
// Sample content
118-
auto button = TouchViewRef(new TouchView());
119-
button->setPosition(vec2(400, 300));
120-
button->setSize(vec2(200, 100));
136+
auto button = make_shared<TouchView>();
137+
button->setPosition(400.f, 300.f);
138+
button->setSize(200.f, 100.f);
121139
button->setBackgroundColor(Color(1, 0, 0));
122-
button->getSignalTapped().connect([=](bluecadet::touch::TouchEvent e) { CI_LOG_I("Button tapped"); });
140+
button->getSignalTapped().connect([=](...) { CI_LOG_I("Button tapped"); });
123141
getRootView()->addChild(button);
124142
}
125143

@@ -160,7 +178,7 @@ public:
160178
~PathView() {}
161179
162180
protected:
163-
void update(const double deltaTime) override;
181+
void update(const FrameInfo & frame) override;
164182
void draw() override;
165183
166184
ci::Path2d mPath;
@@ -176,19 +194,22 @@ using namespace ci;
176194
using namespace ci::app;
177195
using namespace std;
178196

179-
void PathView::update(const double deltaTime) {
197+
void PathView::update(const FrameInfo & frame) {
180198
// update your view on each frame if you'd like
181-
// no need to call base view implementation
199+
// no need to call base view implementation.
200+
// FrameInfo contains the time since the previous
201+
// update call (deltaTime) and the time the app
202+
// has been running (absoluteTime).
182203
}
183204
void PathView::draw() {
184-
// no need to call base view implementation
205+
// no need to call base-view implementation
185206
// unless you want to draw a solid rect of
186207
// getSize() and getBackgroundColor()
187208
// bluecadet::views::BaseView::draw();
188209

189210
// you could set the color to the current background color
190211
// but by default getTint() and getAlpha() are used
191-
// gl::color(getBackgroundColor());
212+
// gl::ScopedColor color(getBackgroundColor());
192213

193214
// this will draw the path using the current color, which
194215
// defaults to getDrawColor() (combination of tint and alpha)
@@ -205,7 +226,7 @@ void PathView::draw() {
205226
206227
## Notes
207228
208-
Version 1.5.0
229+
Version 1.7.0
209230
210231
Built for [Cinder v0.9.2 dev](https://github.com/cinder/Cinder/) and [Cinder v0.9.1](https://github.com/cinder/Cinder/tree/v0.9.1). Samples require VS 2015 v140 toolset, but tested with VS 2013 v120 as well.
211232

assets/settings.json

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,45 @@
11
{
2-
"settings": {
3-
"general": {
4-
"consoleWindowEnabled": true,
5-
"FPS": 60,
6-
"appVersion": "alpha-1.0"
7-
},
8-
"display": {
9-
"width": 1920,
10-
"height": 1080,
11-
"columns": 1,
12-
"rows": 1
13-
},
14-
"graphics": {
15-
"verticalSync": true,
16-
"fullscreen": true,
17-
"borderless": false
18-
},
19-
"debug": {
20-
"debugMode": true,
21-
"drawMinimap": true,
22-
"drawTouches": false,
23-
"minimizeParams": true,
24-
"drawScreenLayout": false
25-
},
26-
"touch": {
27-
"mouse": true,
28-
"tuio": true,
29-
"native": true
30-
},
31-
"analytics": {
32-
"appName": "",
33-
"trackingId": "",
34-
"clientId": ""
35-
}
36-
}
2+
"settings": {
3+
"general": {
4+
"console": true,
5+
"version": "v1.0.0"
6+
},
7+
"display": {
8+
"size": {"x": 1920, "y": 1080},
9+
"columns": 1,
10+
"rows": 1,
11+
"bezel": {"x": 0, "y": 0}
12+
},
13+
"window": {
14+
"fps": 60,
15+
"vsync": true,
16+
"fullscreen": true,
17+
"borderless": false,
18+
"size": {"x": 1280, "y": 720},
19+
"cameraOffset": {"x": 0, "y": 0},
20+
"clearColor": {"r": 0, "g": 0, "b": 0, "a": 1.0}
21+
},
22+
"touch": {
23+
"mouse": true,
24+
"tuio": true,
25+
"native": false,
26+
"supportMultipleNativeTouchScreens": true
27+
},
28+
"debug": {
29+
"debugEnabled": true,
30+
"showStats": false,
31+
"showMinimap": false,
32+
"showTouches": false,
33+
"showScreenLayout": false,
34+
"showCursor": true,
35+
"minimizeParams": false,
36+
"collapseParams": true,
37+
"displayIdHotkeys": false,
38+
"zoomToggleHotkey": true,
39+
"touchSimulator": {
40+
"enabled": false,
41+
"touchesPerSecond": 50.0
42+
}
43+
}
44+
}
3745
}

cinderblock.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
author="Bluecadet"
88
summary="Scene graph with nested transforms, events, touch/mouse delegation and app boilerplates."
99
license="MIT"
10-
version="1.5.0"
10+
version="1.7.0"
1111
url="https://github.com/bluecadet/Cinder-BluecadetViews"
1212
>
1313

@@ -30,4 +30,5 @@
3030

3131
<includePath>src</includePath>
3232
</block>
33+
<template>templates/Bluecadet App/template.xml</template>
3334
</cinder>

docs/media/debug-mini-map.gif

100 KB
Loading

docs/media/debug-multi-screen.gif

892 KB
Loading

docs/media/debug-multi-touch-sim.gif

346 KB
Loading

docs/media/debug-plugins.gif

1.07 MB
Loading
752 KB
Loading

docs/media/debug-view-info.gif

102 KB
Loading
Loading
Loading
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"settings": {
3+
"general": {
4+
"console": true,
5+
"version": "v1.0.0"
6+
},
7+
"display": {
8+
"size": {"x": 1920, "y": 1080},
9+
"columns": 1,
10+
"rows": 1,
11+
"bezel": {"x": 0, "y": 0}
12+
},
13+
"window": {
14+
"fps": 60,
15+
"vsync": true,
16+
"fullscreen": true,
17+
"borderless": false,
18+
"size": {"x": 1280, "y": 720},
19+
"cameraOffset": {"x": 0, "y": 0},
20+
"clearColor": {"r": 0, "g": 0, "b": 0, "a": 1.0}
21+
},
22+
"touch": {
23+
"mouse": true,
24+
"tuio": true,
25+
"native": false
26+
},
27+
"debug": {
28+
"debugEnabled": true,
29+
"showStats": false,
30+
"showMinimap": false,
31+
"showTouches": false,
32+
"showScreenLayout": false,
33+
"showCursor": true,
34+
"minimizeParams": false,
35+
"collapseParams": true,
36+
"displayIdHotkeys": false,
37+
"zoomToggleHotkey": true
38+
}
39+
}
40+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#pragma once
2+
#include "cinder/CinderResources.h"
3+
4+
//#define RES_MY_RES CINDER_RESOURCE( ../resources/, image_name.png, 128, IMAGE )
5+
6+
7+
Binary file not shown.

0 commit comments

Comments
 (0)