Skip to content

Commit

Permalink
even more hints on how to use the library
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke100000 committed May 27, 2023
1 parent 0799acc commit 03425a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 28 deletions.
36 changes: 9 additions & 27 deletions common/src/main/java/net/mca/client/gui/SkinLibraryScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,7 @@ private void rebuild() {
}

switch (page) {
case LIBRARY -> //noinspection CommentedOutCode
{
case LIBRARY -> {
//page
addDrawableChild(new ButtonWidget(width / 2 - 35 - 30, height / 2 + 80, 30, 20, Text.literal("<<"), sender -> {
setSelectionPage(selectionPage - 1);
Expand Down Expand Up @@ -767,31 +766,6 @@ private void rebuild() {
updateSearch();
}));

//tags
/*
int tx = width / 2 - 200;
for (Map.Entry<String, Long> tag : tags.entrySet()) {
String str = "%d x %s".formatted(tag.getValue(), tag.getKey());
int w = textRenderer.getWidth(str) + 8;
addDrawableChild(new ToggleableButtonWidget(tx, height / 2 - 110 + 22, w, 20,
selectedTags.contains(tag.getKey()),
Text.literal(str),
v -> {
if (selectedTags.contains(tag.getKey())) {
selectedTags.remove(tag.getKey());
} else {
selectedTags.add(tag.getKey());
}
((ToggleableButtonWidget)v).toggle = !((ToggleableButtonWidget)v).toggle;
updateSearch();
}));
tx += w;
if (tx > width / 2 + 200) {
break;
}
}
*/

//controls
int i = 0;
for (int y = 0; y < CLOTHES_V; y++) {
Expand Down Expand Up @@ -834,6 +808,14 @@ private void rebuild() {
workspace.skinType = SkinType.CLOTHING;
setPage(Page.EDITOR);
}));

// help
addDrawableChild(new TooltipButtonWidget(width / 2 - 10, height / 2 + 30, 20, 20,
Text.literal("?"),
Text.translatable("gui.skin_library.help"),
v -> {
openHelp();
}));
}
case LOGIN -> {
addDrawableChild(new ButtonWidget(width / 2 - 50, height / 2 + 25, 100, 20,
Expand Down
3 changes: 2 additions & 1 deletion common/src/main/resources/assets/mca/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,15 @@
"gui.skin_library.meta.by": "By %s",
"gui.skin_library.meta.likes": "%s Likes",

"gui.skin_library.prepare": "What asset type do you want to create?",
"gui.skin_library.prepare": "What asset type do you want to create?\nClick on '?' BEFORE uploading skins!",
"gui.skin_library.prepare.hair": "Create hairstyle",
"gui.skin_library.prepare.clothing": "Create Clothing",

"gui.skin_library.fillToolThreshold": "Fill threshold",
"gui.skin_library.fillToolThreshold.tooltip": "Pressing F fill delete similar, adjacent pixels up to the given threshold.",

"gui.skin_library.tool_help": "Controls:\nLeft mouse to paint\nRight mouse to delete\nMiddle mouse to pick color\nHold space or mouse 3 to pan\nMousewheel to zoom\nF to clear similar pixels\nClick to open help",
"gui.skin_library.help": "Click to open help. MCA Skins need a bit of preprocessing in order to look good.",

"gui.skin_library.temperature.0": "Cold",
"gui.skin_library.temperature.1": "Chilly",
Expand Down

0 comments on commit 03425a8

Please sign in to comment.