mirror of
https://github.com/BluTac10/Xbox-Neo.git
synced 2026-05-23 03:15:01 +00:00
Implement Book & Quill: - IUIScene_WritingBookMenu and UIScene_BookAndQuillMenu for UI - Edited UIControl_Label to add direct editing (quite hardcoded to my needs right now) - Reimplement scrapped custom payload packets for books and signing - Other misc changes TODO: - Coloured and scambled text - Book copying - Clean up code
56 lines
1.2 KiB
C++
56 lines
1.2 KiB
C++
#include "stdafx.h"
|
|
#include "UI.h"
|
|
#include "UIControl_Book.h"
|
|
|
|
UIControl_Book::UIControl_Book()
|
|
{
|
|
}
|
|
|
|
bool UIControl_Book::setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName)
|
|
{
|
|
UIControl::setControlType(UIControl::eBook);
|
|
bool success = UIControl_Base::setupControl(scene,parent,controlName);
|
|
|
|
return success;
|
|
}
|
|
|
|
void UIControl_Book::init(UIString label, int id)
|
|
{
|
|
m_label = label;
|
|
m_id = id;
|
|
|
|
IggyDataValue result;
|
|
IggyDataValue value[2];
|
|
value[0].type = IGGY_DATATYPE_string_UTF16;
|
|
IggyStringUTF16 stringVal;
|
|
|
|
stringVal.string = (IggyUTF16*)label.c_str();
|
|
stringVal.length = label.length();
|
|
value[0].string16 = stringVal;
|
|
|
|
value[1].type = IGGY_DATATYPE_number;
|
|
value[1].number = id;
|
|
IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_initFunc , 2 , value );
|
|
|
|
#ifdef __PSVITA__
|
|
// 4J-PB - add this button to the vita touch box list
|
|
|
|
switch(m_parentScene->GetParentLayer()->m_iLayer)
|
|
{
|
|
case eUILayer_Error:
|
|
case eUILayer_Fullscreen:
|
|
case eUILayer_Scene:
|
|
case eUILayer_HUD:
|
|
ui.TouchBoxAdd(this,m_parentScene);
|
|
break;
|
|
}
|
|
#endif
|
|
}
|
|
|
|
void UIControl_Book::ReInit()
|
|
{
|
|
UIControl_Base::ReInit();
|
|
|
|
init(m_label, m_id);
|
|
}
|