1
0
mirror of synced 2024-12-01 02:27:21 +01:00

Add puchichara section on the OpenEncyclopedia, slightly improve the menu UX

This commit is contained in:
0aubsq 2022-06-28 12:52:28 +02:00
parent 567fbdec60
commit 63fe8e46cf
47 changed files with 175 additions and 57 deletions

View File

@ -16,6 +16,7 @@ namespace TJAPlayer3
public CEncyclopediaControler()
{
_callStack = new Stack<DBEncyclopediaMenus.EncyclopediaMenu>();
_idxStack = new Stack<int>();
_current = TJAPlayer3.Databases.DBEncyclopediaMenus.data;
@ -146,10 +147,12 @@ namespace TJAPlayer3
if (_callStack.Count() <= 0)
return true;
var _oldIndex = _idxStack.Pop();
if (tArePagesOpened())
PageIndex = 0;
else
tResetIndexes();
MenuIndex = _oldIndex;
_current = _callStack.Pop();
@ -165,15 +168,21 @@ namespace TJAPlayer3
if (!tArePagesOpened() && MenuIndex != 0)
{
_callStack.Push(_current);
_idxStack.Push(MenuIndex);
_current = _current.Menus[MenuIndex - 1].Value;
if (tArePagesOpened())
bool _hasPages = tArePagesOpened();
if (_hasPages)
PageIndex = 0;
else
tResetIndexes();
tReallocateCurrentAccordingly();
if (_hasPages)
tUpdatePageIndex();
return (true, false);
}
var _mainMenu = tHandleBack();
@ -195,12 +204,22 @@ namespace TJAPlayer3
#region [private utils methods]
private void tUpdatePageIndex()
{
PageText = TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(
new TitleTextureKey((PageIndex + 1).ToString() + "/" + Pages.Length.ToString(), _pfEncyclopediaMenu, Color.White, Color.Brown, 1000));
}
private void tMove(bool pages, int count)
{
if (pages)
{
if (Pages.Length > 0)
{
PageIndex = (PageIndex + count + Pages.Length) % Pages.Length;
tUpdatePageIndex();
}
}
else
{
@ -243,6 +262,7 @@ namespace TJAPlayer3
public (int, CTexture)[] Submenus;
public (int, CTexture, CTexture)[] Pages;
public CTexture PageText;
public int MenuIndex;
public int PageIndex;
@ -251,6 +271,7 @@ namespace TJAPlayer3
#region [private variables]
private Stack<DBEncyclopediaMenus.EncyclopediaMenu> _callStack;
private Stack<int> _idxStack;
private DBEncyclopediaMenus.EncyclopediaMenu _current;
private string _lang;
private static CPrivateFastFont _pfEncyclopediaMenu;

View File

@ -82,9 +82,9 @@ namespace TJAPlayer3
{
var _page = _controler.Pages[_controler.PageIndex];
// To adapt for future 1080p update
_page.Item2?.t2D描画(TJAPlayer3.app.Device, 640, 0);
_page.Item2?.t2D中心基準描画(TJAPlayer3.app.Device, 960, 180);
_page.Item3?.t2D描画(TJAPlayer3.app.Device, 640, 360);
_controler.PageText?.t2D下中央基準描画(TJAPlayer3.app.Device, 960, 720);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -3,25 +3,7 @@
{
"Key": 1,
"Value": {
"menus": [
{
"Key": 10,
"Value": {
"pages": [
100,
101,
102,
],
}
},
{
"Key": 11,
"Value": {
}
}
],
}
},
@ -30,7 +12,78 @@
"Value": {
}
},
{
"Key": 3,
"Value": {
}
},
{
"Key": 4,
"Value": {
"menus": [
{
"Key": 40,
"Value": {
"menus": [
{
"Key": 400,
"Value": {
}
},
],
}
},
{
"Key": 41,
"Value": {
"menus": [
{
"Key": 410,
"Value": {
"pages": [
4100,
4101,
],
}
},
],
}
},
{
"Key": 42,
"Value": {
}
},
],
}
},
{
"Key": 5,
"Value": {
}
},
],
}

View File

@ -1 +1 @@
Test1
General

View File

@ -1 +1 @@
Test1
一般

View File

@ -1 +0,0 @@
Test10

View File

@ -1 +0,0 @@
Test10

View File

@ -1 +0,0 @@
Test11

View File

@ -1 +0,0 @@
Test11

View File

@ -1 +1 @@
Test2
Gameplay

View File

@ -1 +1 @@
Test2
ゲームプレイ

View File

@ -0,0 +1 @@
Charting

View File

@ -0,0 +1 @@
創作譜面作り

View File

@ -0,0 +1 @@
Skinning & Customization

View File

@ -0,0 +1 @@
スキン作り & カスタマイズ

View File

@ -0,0 +1 @@
Characters

View File

@ -0,0 +1 @@
キャラクター

View File

@ -0,0 +1 @@
Character folder structure

View File

@ -0,0 +1 @@
キャラクターのフォルダ構造

View File

@ -0,0 +1 @@
Puchicharas

View File

@ -0,0 +1 @@
プチキャラ

View File

@ -0,0 +1 @@
Puchichara folder structure

View File

@ -0,0 +1 @@
プチキャラのフォルダ構造

View File

@ -0,0 +1 @@
Skins

View File

@ -0,0 +1 @@
スキン

View File

@ -0,0 +1 @@
Frequently Asked Questions

View File

@ -0,0 +1 @@
よくあるご質問

View File

@ -1,3 +0,0 @@
This is a test page
with the number
100

View File

@ -1,3 +0,0 @@
This is a test page
with the number
100

View File

@ -1,3 +0,0 @@
This is a test page
with the number
101

View File

@ -1,3 +0,0 @@
This is a test page
with the number
101

View File

@ -1,3 +0,0 @@
This is a test page
with the number
102

View File

@ -1,3 +0,0 @@
This is a test page
with the number
102

View File

@ -0,0 +1,13 @@
Each Puchichara is defined by 4 files :
- Chara.png : The 2 frames for the Puchichara.
The texture size is 512x256px.
Both frames should be 256x256px each before merging.
- Metadata.json : The Puchichara's related informations.
A .json file with 3 attributes :
- "name" : The Puchichara's name.
- "rarity" : The Puchichara's rarity.
=> (Poor), Common, Uncommon, Rare, Epic, Legendary
=> Has effects on the unlocking modal style and on the name text color.
- "author" : The Puchichara's maker/artist name.

View File

@ -0,0 +1,13 @@
各プチキャラは下記のファイル4枚を含みます:
- Chara.png : プチキャラのフレーム2枚。
画像サイズは512x256pxです。
合流の前に、各フレームのサイズが256x256pxであることをご確認ください。
- Metadata.json : プチキャラに関するの情報。
属性3つの.jsonファイル :
- "name" : プチキャラの名前。
- "rarity" : プチキャラの希少性。
=> (Poor), Common, Uncommon, Rare, Epic, Legendary
=> 解放画面及び名前の文字色に影響あり。
- "author" : プチキャラの画家またはメーカーのクレジット。

View File

@ -0,0 +1,12 @@
- Unlock.json : The Puchichara's unlock informations.
A .json file with 3 attributes :
- "condition" : The unlock condition type.
- "type" : The value comparer used with the condition.
- "values" : An array of values related to the condition.
=> Unfinished feature, more informations coming soon.
- Welcome.ogg : A voice sample played when the Puchichara is selected.
Also plays when the Puchichara is unlocked.
Puchicharas can have the folder name of your choice.
They have to be put within the "Global/PuchiChara" folder.

View File

@ -0,0 +1,12 @@
- Unlock.json : プチキャラの解放情報。
属性3つの.jsonファイル :
- "condition" : 解放の条件。
- "type" : 比較の計算。
- "values" : 条件に関するの値配列。
=> 未だ中途半端な機能、進捗次第情報を更新します。
- Welcome.ogg : プチキャラが選ばれる際に再生される音声です。
プチキャラが解放させる際にも再生。
プチキャラのフォルダ名はご自由に。
「Global/PuchiChara」にプチキャラのフォルダをお入れください。

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,5 +0,0 @@
{
"name" : "Placeholder",
"rarity": "Uncommon",
"author": "[Author]",
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,5 @@
{
"name" : "Template",
"rarity": "Common",
"author": "[Author]",
}

View File

@ -2,6 +2,6 @@
"condition": "ch",
"type": "me",
"values": [
10,
5,
],
}