<commit_before>#include "cinder/app/AppNative.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"

#include "cinder/Rand.h"

#include "pockets/cobweb/CobWeb.h"

#include "PhysicsScrolling.h"
#include "TexturePackingSample.h"

using namespace ci;
using namespace ci::app;
using namespace std;
using namespace pockets;


class PocketsApp : public AppNative {
public:
  void prepareSettings( Settings *settings ) override;
	void setup() override;
	void draw() override;
private:
  SceneRef      mCurrentScene;
  cobweb::Node  mRoot;
};

void PocketsApp::prepareSettings( Settings *settings )
{
  settings->enableMultiTouch();
}

void PocketsApp::setup()
{
  mCurrentScene = make_shared<TexturePackingSample>();
  mCurrentScene->setup();
  mCurrentScene->connect( getWindow() );
  mCurrentScene->show( getWindow(), true );

  // TODO: build a CobWeb gui to select between samples
  auto button = make_shared<cobweb::ButtonBase>( getWindowBounds() );
  button->setSelectFn( []() { app::console() << "Hello from button" << endl; } );
  mRoot.appendChild( button );
  mRoot.deepConnect( getWindow() );
  console() << "Button is active: " << (button->isActive() ? "yes" : "no") << endl;
}

void PocketsApp::draw()
{
  mRoot.deepDraw();
}

CINDER_APP_NATIVE( PocketsApp, RendererGl )<commit_msg>Button responds to coordinates of touch, which are weird on laptop.<commit_after>#include "cinder/app/AppNative.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"

#include "cinder/Rand.h"

#include "pockets/cobweb/CobWeb.h"

#include "PhysicsScrolling.h"
#include "TexturePackingSample.h"

using namespace ci;
using namespace ci::app;
using namespace std;
using namespace pockets;


class PocketsApp : public AppNative {
public:
  void prepareSettings( Settings *settings ) override;
	void setup() override;
	void draw() override;
private:
  SceneRef      mCurrentScene;
  cobweb::Node  mRoot;
};

void PocketsApp::prepareSettings( Settings *settings )
{
  settings->enableMultiTouch();
}

void PocketsApp::setup()
{
  mCurrentScene = make_shared<TexturePackingSample>();
  mCurrentScene->setup();
  mCurrentScene->connect( getWindow() );
  mCurrentScene->show( getWindow(), true );

  // TODO: build a CobWeb gui to select between samples
  auto button = make_shared<cobweb::ButtonBase>( Rectf( 0.0f, 0.0f, getWindowWidth() * 0.5f, getWindowHeight() * 0.5f ) );
  button->setSelectFn( []() { app::console() << "Hello from button" << endl; } );
  mRoot.appendChild( button );
  mRoot.deepConnect( getWindow() );
  console() << "Button is active: " << (button->isActive() ? "yes" : "no") << endl;
}

void PocketsApp::draw()
{
  mRoot.deepDraw();
}

CINDER_APP_NATIVE( PocketsApp, RendererGl )
{'fraction_non_alphanumeric': 0.14761376248612654, 'fraction_numerical': 0.0029596744358120607, 'mean_word_length': 5.187643020594965, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2350327', 'n_tokens_mistral': 910, 'n_tokens_neox': 898, 'n_words': 214}