New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow re-using name-input layouts for different languages #1284

Merged
merged 2 commits into from Oct 13, 2017

Conversation

Projects
None yet
5 participants
@rohkea
Member

rohkea commented Oct 12, 2017

Seems to work for me, please test.

Feedback is welcome. I’m particularly not happy with the forward declaration of struct Keyboard_Layout;.


EDIT by @carstene1ns: Fixes #1272.

@Ghabry

This comment has been minimized.

Show comment
Hide comment
@Ghabry

Ghabry Oct 12, 2017

Member

Test case:

https://easyrpg.org/play/pr1284/?start-map-id=36&start-position=6%2011&new-game

To test: via &encoding= : 932, 949, 936, 1251, 1252

Member

Ghabry commented Oct 12, 2017

Test case:

https://easyrpg.org/play/pr1284/?start-map-id=36&start-position=6%2011&new-game

To test: via &encoding= : 932, 949, 936, 1251, 1252

@Ghabry

This comment has been minimized.

Show comment
Hide comment
@Ghabry

Ghabry Oct 12, 2017

Member

When you use encoding 1252 and talk to the right-most event (which launches name scene on katakana page/ page 2) the ABCD button is not labled, but works.

Member

Ghabry commented Oct 12, 2017

When you use encoding 1252 and talk to the right-most event (which launches name scene on katakana page/ page 2) the ABCD button is not labled, but works.

@rohkea

This comment has been minimized.

Show comment
Hide comment
@rohkea

rohkea Oct 12, 2017

Member

Thanks for noticing! It should be OK now.

Actually, it was working in Emscripten, but caused a segmentation fault on desktop ^^' But it should be OK now

Member

rohkea commented Oct 12, 2017

Thanks for noticing! It should be OK now.

Actually, it was working in Emscripten, but caused a segmentation fault on desktop ^^' But it should be OK now

@carstene1ns

Seems to work fine.

@fdelapena

Clever solution 👍
Minor reorder and sign-compare warnings but may be cleaned later.

@rohkea

This comment has been minimized.

Show comment
Hide comment
@rohkea

rohkea Oct 12, 2017

Member

Thanks! I’ve changed int’s to size_t’s as suggested in the IRC, and reordered the initialisations.

Member

rohkea commented Oct 12, 2017

Thanks! I’ve changed int’s to size_t’s as suggested in the IRC, and reordered the initialisations.

@fdelapena fdelapena added this to the 0.5.3 milestone Oct 12, 2017

@carstene1ns

This comment has been minimized.

Show comment
Hide comment
@carstene1ns

carstene1ns Oct 12, 2017

Member

btw. one thing that has annoyed me since ever (mostly noticeable in the symbol page):
When you press down and there is no symbol under it, it will jump one to the left, but only when there is one, otherwise it jumps to the top or skips the empty row.

Demonstration: Press Down here.

screenshot

Member

carstene1ns commented Oct 12, 2017

btw. one thing that has annoyed me since ever (mostly noticeable in the symbol page):
When you press down and there is no symbol under it, it will jump one to the left, but only when there is one, otherwise it jumps to the top or skips the empty row.

Demonstration: Press Down here.

screenshot

@Ghabry

This comment has been minimized.

Show comment
Hide comment
@Ghabry

Ghabry Oct 12, 2017

Member

Which behaviour would you prefer? That it always jumps at ⇖ in the next row or that it goes downwards and jumps to the top?

Member

Ghabry commented Oct 12, 2017

Which behaviour would you prefer? That it always jumps at ⇖ in the next row or that it goes downwards and jumps to the top?

@carstene1ns

This comment has been minimized.

Show comment
Hide comment
@carstene1ns

carstene1ns Oct 12, 2017

Member

IMO it should never jump left anyway.

Member

carstene1ns commented Oct 12, 2017

IMO it should never jump left anyway.

@carstene1ns

This comment has been minimized.

Show comment
Hide comment
@carstene1ns

carstene1ns Oct 13, 2017

Member

Added a commit that fixes this behaviour.
It was actually needed to support moving down on the wide fields.
Achieving this differently now (hack alert).

Member

carstene1ns commented Oct 13, 2017

Added a commit that fixes this behaviour.
It was actually needed to support moving down on the wide fields.
Achieving this differently now (hack alert).

Show outdated Hide outdated src/window_keyboard.cpp
Show outdated Hide outdated src/window_keyboard.cpp
@Ghabry

Ghabry approved these changes Oct 13, 2017

Besides this one minor "hack" I'm fine with the changes.

@carstene1ns carstene1ns merged commit c8fbeb5 into EasyRPG:master Oct 13, 2017

5 of 6 checks passed

GNU/Linux Build triggered. sha1 is merged.
Details
Android (armeabi-v7a) Build finished.
Details
OSX Build finished.
Details
Windows (x64) Build finished.
Details
Windows (x86) Build finished.
Details
web Build finished.
Details
@kane159

This comment has been minimized.

Show comment
Hide comment
@kane159

kane159 Nov 6, 2017

layouts.push_back(Window_Keyboard::ZhTW1);
	layouts.push_back(Window_Keyboard::ZhTW2);
	done = Window_Keyboard::DONE_ZH_TW;

============================================

const char* const Window_Keyboard::DONE_ZH_TW = "<確定>

======================================

{
	"<翻頁>",
	{ //traditional. Chinese 1
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"滿", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", Window_Keyboard::NEXT_PAGE, "", Window_Keyboard::DONE}
	}
}

{
	"<前頁>",
	{ // traditional. Chinese 2
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "",  "", "", "", "", ""},
		{"西", "", "", "", "", "", Window_Keyboard::NEXT_PAGE, "", Window_Keyboard::DONE}
	}
}

kane159 commented on 1ce5c68 Nov 6, 2017

layouts.push_back(Window_Keyboard::ZhTW1);
	layouts.push_back(Window_Keyboard::ZhTW2);
	done = Window_Keyboard::DONE_ZH_TW;

============================================

const char* const Window_Keyboard::DONE_ZH_TW = "<確定>

======================================

{
	"<翻頁>",
	{ //traditional. Chinese 1
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"滿", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", Window_Keyboard::NEXT_PAGE, "", Window_Keyboard::DONE}
	}
}

{
	"<前頁>",
	{ // traditional. Chinese 2
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "", "", "", "", "", ""},
		{"", "", "", "", "",  "", "", "", "", ""},
		{"西", "", "", "", "", "", Window_Keyboard::NEXT_PAGE, "", Window_Keyboard::DONE}
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment