Add puchichara section on the OpenEncyclopedia, slightly improve the menu UX
This commit is contained in:
parent
567fbdec60
commit
63fe8e46cf
@ -16,6 +16,7 @@ namespace TJAPlayer3
|
|||||||
public CEncyclopediaControler()
|
public CEncyclopediaControler()
|
||||||
{
|
{
|
||||||
_callStack = new Stack<DBEncyclopediaMenus.EncyclopediaMenu>();
|
_callStack = new Stack<DBEncyclopediaMenus.EncyclopediaMenu>();
|
||||||
|
_idxStack = new Stack<int>();
|
||||||
|
|
||||||
_current = TJAPlayer3.Databases.DBEncyclopediaMenus.data;
|
_current = TJAPlayer3.Databases.DBEncyclopediaMenus.data;
|
||||||
|
|
||||||
@ -146,10 +147,12 @@ namespace TJAPlayer3
|
|||||||
if (_callStack.Count() <= 0)
|
if (_callStack.Count() <= 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
var _oldIndex = _idxStack.Pop();
|
||||||
|
|
||||||
if (tArePagesOpened())
|
if (tArePagesOpened())
|
||||||
PageIndex = 0;
|
PageIndex = 0;
|
||||||
else
|
else
|
||||||
tResetIndexes();
|
MenuIndex = _oldIndex;
|
||||||
|
|
||||||
_current = _callStack.Pop();
|
_current = _callStack.Pop();
|
||||||
|
|
||||||
@ -165,15 +168,21 @@ namespace TJAPlayer3
|
|||||||
if (!tArePagesOpened() && MenuIndex != 0)
|
if (!tArePagesOpened() && MenuIndex != 0)
|
||||||
{
|
{
|
||||||
_callStack.Push(_current);
|
_callStack.Push(_current);
|
||||||
|
_idxStack.Push(MenuIndex);
|
||||||
_current = _current.Menus[MenuIndex - 1].Value;
|
_current = _current.Menus[MenuIndex - 1].Value;
|
||||||
|
|
||||||
if (tArePagesOpened())
|
bool _hasPages = tArePagesOpened();
|
||||||
|
|
||||||
|
if (_hasPages)
|
||||||
PageIndex = 0;
|
PageIndex = 0;
|
||||||
else
|
else
|
||||||
tResetIndexes();
|
tResetIndexes();
|
||||||
|
|
||||||
tReallocateCurrentAccordingly();
|
tReallocateCurrentAccordingly();
|
||||||
|
|
||||||
|
if (_hasPages)
|
||||||
|
tUpdatePageIndex();
|
||||||
|
|
||||||
return (true, false);
|
return (true, false);
|
||||||
}
|
}
|
||||||
var _mainMenu = tHandleBack();
|
var _mainMenu = tHandleBack();
|
||||||
@ -195,12 +204,22 @@ namespace TJAPlayer3
|
|||||||
|
|
||||||
#region [private utils methods]
|
#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)
|
private void tMove(bool pages, int count)
|
||||||
{
|
{
|
||||||
if (pages)
|
if (pages)
|
||||||
{
|
{
|
||||||
if (Pages.Length > 0)
|
if (Pages.Length > 0)
|
||||||
|
{
|
||||||
PageIndex = (PageIndex + count + Pages.Length) % Pages.Length;
|
PageIndex = (PageIndex + count + Pages.Length) % Pages.Length;
|
||||||
|
tUpdatePageIndex();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -243,6 +262,7 @@ namespace TJAPlayer3
|
|||||||
|
|
||||||
public (int, CTexture)[] Submenus;
|
public (int, CTexture)[] Submenus;
|
||||||
public (int, CTexture, CTexture)[] Pages;
|
public (int, CTexture, CTexture)[] Pages;
|
||||||
|
public CTexture PageText;
|
||||||
public int MenuIndex;
|
public int MenuIndex;
|
||||||
public int PageIndex;
|
public int PageIndex;
|
||||||
|
|
||||||
@ -251,6 +271,7 @@ namespace TJAPlayer3
|
|||||||
#region [private variables]
|
#region [private variables]
|
||||||
|
|
||||||
private Stack<DBEncyclopediaMenus.EncyclopediaMenu> _callStack;
|
private Stack<DBEncyclopediaMenus.EncyclopediaMenu> _callStack;
|
||||||
|
private Stack<int> _idxStack;
|
||||||
private DBEncyclopediaMenus.EncyclopediaMenu _current;
|
private DBEncyclopediaMenus.EncyclopediaMenu _current;
|
||||||
private string _lang;
|
private string _lang;
|
||||||
private static CPrivateFastFont _pfEncyclopediaMenu;
|
private static CPrivateFastFont _pfEncyclopediaMenu;
|
||||||
|
@ -82,9 +82,9 @@ namespace TJAPlayer3
|
|||||||
{
|
{
|
||||||
var _page = _controler.Pages[_controler.PageIndex];
|
var _page = _controler.Pages[_controler.PageIndex];
|
||||||
|
|
||||||
// To adapt for future 1080p update
|
_page.Item2?.t2D中心基準描画(TJAPlayer3.app.Device, 960, 180);
|
||||||
_page.Item2?.t2D描画(TJAPlayer3.app.Device, 640, 0);
|
|
||||||
_page.Item3?.t2D描画(TJAPlayer3.app.Device, 640, 360);
|
_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 |
BIN
Test/Encyclopedia/Images/4100.png
Normal file
BIN
Test/Encyclopedia/Images/4100.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
Test/Encyclopedia/Images/4101.png
Normal file
BIN
Test/Encyclopedia/Images/4101.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
@ -3,25 +3,7 @@
|
|||||||
{
|
{
|
||||||
"Key": 1,
|
"Key": 1,
|
||||||
"Value": {
|
"Value": {
|
||||||
"menus": [
|
|
||||||
{
|
|
||||||
"Key": 10,
|
|
||||||
"Value": {
|
|
||||||
"pages": [
|
|
||||||
100,
|
|
||||||
101,
|
|
||||||
102,
|
|
||||||
],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"Key": 11,
|
|
||||||
"Value": {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -30,7 +12,78 @@
|
|||||||
"Value": {
|
"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": {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
}
|
}
|
@ -1 +1 @@
|
|||||||
Test1
|
General
|
@ -1 +1 @@
|
|||||||
Test1
|
一般
|
@ -1 +0,0 @@
|
|||||||
Test10
|
|
@ -1 +0,0 @@
|
|||||||
Test10
|
|
@ -1 +0,0 @@
|
|||||||
Test11
|
|
@ -1 +0,0 @@
|
|||||||
Test11
|
|
@ -1 +1 @@
|
|||||||
Test2
|
Gameplay
|
@ -1 +1 @@
|
|||||||
Test2
|
ゲームプレイ
|
1
Test/Encyclopedia/Menus/3/en.txt
Normal file
1
Test/Encyclopedia/Menus/3/en.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Charting
|
1
Test/Encyclopedia/Menus/3/jp.txt
Normal file
1
Test/Encyclopedia/Menus/3/jp.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
創作譜面作り
|
1
Test/Encyclopedia/Menus/4/en.txt
Normal file
1
Test/Encyclopedia/Menus/4/en.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Skinning & Customization
|
1
Test/Encyclopedia/Menus/4/jp.txt
Normal file
1
Test/Encyclopedia/Menus/4/jp.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
スキン作り & カスタマイズ
|
1
Test/Encyclopedia/Menus/40/en.txt
Normal file
1
Test/Encyclopedia/Menus/40/en.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Characters
|
1
Test/Encyclopedia/Menus/40/jp.txt
Normal file
1
Test/Encyclopedia/Menus/40/jp.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
キャラクター
|
1
Test/Encyclopedia/Menus/400/en.txt
Normal file
1
Test/Encyclopedia/Menus/400/en.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Character folder structure
|
1
Test/Encyclopedia/Menus/400/jp.txt
Normal file
1
Test/Encyclopedia/Menus/400/jp.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
キャラクターのフォルダ構造
|
1
Test/Encyclopedia/Menus/41/en.txt
Normal file
1
Test/Encyclopedia/Menus/41/en.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Puchicharas
|
1
Test/Encyclopedia/Menus/41/jp.txt
Normal file
1
Test/Encyclopedia/Menus/41/jp.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
プチキャラ
|
1
Test/Encyclopedia/Menus/410/en.txt
Normal file
1
Test/Encyclopedia/Menus/410/en.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Puchichara folder structure
|
1
Test/Encyclopedia/Menus/410/jp.txt
Normal file
1
Test/Encyclopedia/Menus/410/jp.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
プチキャラのフォルダ構造
|
1
Test/Encyclopedia/Menus/42/en.txt
Normal file
1
Test/Encyclopedia/Menus/42/en.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Skins
|
1
Test/Encyclopedia/Menus/42/jp.txt
Normal file
1
Test/Encyclopedia/Menus/42/jp.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
スキン
|
1
Test/Encyclopedia/Menus/5/en.txt
Normal file
1
Test/Encyclopedia/Menus/5/en.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Frequently Asked Questions
|
1
Test/Encyclopedia/Menus/5/jp.txt
Normal file
1
Test/Encyclopedia/Menus/5/jp.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
よくあるご質問
|
@ -1,3 +0,0 @@
|
|||||||
This is a test page
|
|
||||||
with the number
|
|
||||||
100
|
|
@ -1,3 +0,0 @@
|
|||||||
This is a test page
|
|
||||||
with the number
|
|
||||||
100
|
|
@ -1,3 +0,0 @@
|
|||||||
This is a test page
|
|
||||||
with the number
|
|
||||||
101
|
|
@ -1,3 +0,0 @@
|
|||||||
This is a test page
|
|
||||||
with the number
|
|
||||||
101
|
|
@ -1,3 +0,0 @@
|
|||||||
This is a test page
|
|
||||||
with the number
|
|
||||||
102
|
|
@ -1,3 +0,0 @@
|
|||||||
This is a test page
|
|
||||||
with the number
|
|
||||||
102
|
|
13
Test/Encyclopedia/Pages/4100/en.txt
Normal file
13
Test/Encyclopedia/Pages/4100/en.txt
Normal 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.
|
13
Test/Encyclopedia/Pages/4100/jp.txt
Normal file
13
Test/Encyclopedia/Pages/4100/jp.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
各プチキャラは下記のファイル4枚を含みます:
|
||||||
|
|
||||||
|
- Chara.png : プチキャラのフレーム2枚。
|
||||||
|
画像サイズは512x256pxです。
|
||||||
|
合流の前に、各フレームのサイズが256x256pxであることをご確認ください。
|
||||||
|
|
||||||
|
- Metadata.json : プチキャラに関するの情報。
|
||||||
|
属性3つの.jsonファイル :
|
||||||
|
- "name" : プチキャラの名前。
|
||||||
|
- "rarity" : プチキャラの希少性。
|
||||||
|
=> (Poor), Common, Uncommon, Rare, Epic, Legendary
|
||||||
|
=> 解放画面及び名前の文字色に影響あり。
|
||||||
|
- "author" : プチキャラの画家またはメーカーのクレジット。
|
12
Test/Encyclopedia/Pages/4101/en.txt
Normal file
12
Test/Encyclopedia/Pages/4101/en.txt
Normal 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.
|
12
Test/Encyclopedia/Pages/4101/jp.txt
Normal file
12
Test/Encyclopedia/Pages/4101/jp.txt
Normal 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 |
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"name" : "Placeholder",
|
|
||||||
"rarity": "Uncommon",
|
|
||||||
"author": "[Author]",
|
|
||||||
}
|
|
BIN
Test/Global/PuchiChara/Template/Chara.png
Normal file
BIN
Test/Global/PuchiChara/Template/Chara.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
5
Test/Global/PuchiChara/Template/Metadata.json
Normal file
5
Test/Global/PuchiChara/Template/Metadata.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name" : "Template",
|
||||||
|
"rarity": "Common",
|
||||||
|
"author": "[Author]",
|
||||||
|
}
|
@ -2,6 +2,6 @@
|
|||||||
"condition": "ch",
|
"condition": "ch",
|
||||||
"type": "me",
|
"type": "me",
|
||||||
"values": [
|
"values": [
|
||||||
10,
|
5,
|
||||||
],
|
],
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user