<commit_before>
#include "menuController.h"

#include "p1Scene.h"
#include "p2Scene.h"
#include "p3Scene.h"
#include "p4Scene.h"
#include "p5Scene.h"
#include "p6Scene.h"
#include "p7Scene.h"

menuController::menuController(int _sceneNum)
{
	sceneNum = _sceneNum;

	Size visibleSize = Director::getInstance()->getVisibleSize();

	//base layout create & setup
	baseLayout = Layout::create();
	baseLayout->setAnchorPoint(Vec2(0.5, 0.5));
	baseLayout->setPosition(Vec2(visibleSize.width / 2, visibleSize.height - 205));
	baseLayout->setSize(Size(1080, 410));

	//background sprite setup
	layoutBackgroundSpr = Sprite::create("menu1.png");
	layoutBackgroundSpr->setAnchorPoint(Vec2());
	layoutBackgroundSpr->setPosition(Vec2());
	//TODO: animation
	Vector<SpriteFrame*> animFrames(2);
	auto frame1 = SpriteFrame::create("menu1.png", Rect(0, 0, 1080, 259));
	auto frame2 = SpriteFrame::create("menu2.png", Rect(0, 0, 1080, 259));
	animFrames.pushBack(frame1);
	animFrames.pushBack(frame2);
	auto animation = Animation::createWithSpriteFrames(animFrames, 0.2f);
	auto animate = RepeatForever::create(Animate::create(animation));
	layoutBackgroundSpr->runAction(animate);
	baseLayout->addChild(layoutBackgroundSpr, 0);

	//scrollview setup
	scrollview = ScrollView::create();
	scrollview->setAnchorPoint(Vec2());
	scrollview->setPosition(Vec2(200, 35));
	scrollview->setDirection(ScrollView::Direction::HORIZONTAL);
	scrollview->setSize(Size(700, 195));
	scrollview->setInnerContainerSize(Size(1440, 195));
	scrollview->setTouchEnabled(false);
	scrollview->setScrollBarEnabled(false);
	//for test--------------------
	scrollview->addEventListener(CC_CALLBACK_2(menuController::scrollEvent, this));
	//----------------------------
	baseLayout->addChild(scrollview, 1);

	//home, option btns setup
	//left arrow btn setup
	homeBtn = Button::create("home.png", "home_s.png");
	homeBtn->setPosition(Vec2(115, 325));
	homeBtn->setTag(20);<commit_msg>cocos version must update 3.9v<commit_after>
#include "menuController.h"

#include "p1Scene.h"
#include "p2Scene.h"
#include "p3Scene.h"
#include "p4Scene.h"
#include "p5Scene.h"
#include "p6Scene.h"
#include "p7Scene.h"

menuController::menuController(int _sceneNum)
{
	sceneNum = _sceneNum;

	Size visibleSize = Director::getInstance()->getVisibleSize();

	//base layout create & setup
	baseLayout = Layout::create();
	baseLayout->setAnchorPoint(Vec2(0.5, 0.5));
	baseLayout->setPosition(Vec2(visibleSize.width / 2, visibleSize.height - 205));
	baseLayout->setSize(Size(1080, 410));

	//background sprite setup
	layoutBackgroundSpr = Sprite::create("menu1.png");
	layoutBackgroundSpr->setAnchorPoint(Vec2());
	layoutBackgroundSpr->setPosition(Vec2());
	//TODO: animation
	Vector<SpriteFrame*> animFrames(2);
	auto frame1 = SpriteFrame::create("menu1.png", Rect(0, 0, 1080, 259));
	auto frame2 = SpriteFrame::create("menu2.png", Rect(0, 0, 1080, 259));
	animFrames.pushBack(frame1);
	animFrames.pushBack(frame2);
	auto animation = Animation::createWithSpriteFrames(animFrames, 0.2f);
	auto animate = RepeatForever::create(Animate::create(animation));
	layoutBackgroundSpr->runAction(animate);
	baseLayout->addChild(layoutBackgroundSpr, 0);

	//scrollview setup
	scrollview = ScrollView::create();
	scrollview->setAnchorPoint(Vec2());
	scrollview->setPosition(Vec2(200, 35));
	scrollview->setDirection(ScrollView::Direction::HORIZONTAL);
	scrollview->setSize(Size(700, 195));
	scrollview->setInnerContainerSize(Size(1440, 195));
	scrollview->setTouchEnabled(false);
	//scrollview->setScrollBarEnabled(false);
	//for test--------------------
	scrollview->addEventListener(CC_CALLBACK_2(menuController::scrollEvent, this));
	//----------------------------
	baseLayout->addChild(scrollview, 1);

	//home, option btns setup
	//left arrow btn setup
	homeBtn = Button::create("home.png", "home_s.png");
	homeBtn->setPosition(Vec2(115, 325));
	homeBtn->setTag(20);
{'fraction_non_alphanumeric': 0.17997432605905006, 'fraction_numerical': 0.04467265725288832, 'mean_word_length': 6.0071942446043165, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, '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': '3680327', 'n_tokens_mistral': 1412, 'n_tokens_neox': 1271, 'n_words': 221}