mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-03-03 22:21:53 +07:00
Added spell tree names and fixed label layouts
This commit is contained in:
parent
45b67e6cb8
commit
61c94795ee
@ -10,6 +10,11 @@ public enum CharacterClass {
|
||||
description = 5128;
|
||||
spellsBackground = "skltree_a_back";
|
||||
spellIcons = "AmSkillicon";
|
||||
spellTree = new String[][]{
|
||||
{"StrSklTree10", "StrSklTree11", "StrSklTree4"},
|
||||
{"StrSklTree8", "StrSklTree9", "StrSklTree4"},
|
||||
{"StrSklTree6", "StrSklTree7", "StrSklTree4"},
|
||||
};
|
||||
firstSpell = 6;
|
||||
lastSpell = 36;
|
||||
}},
|
||||
@ -18,6 +23,11 @@ public enum CharacterClass {
|
||||
description = 5131;
|
||||
spellsBackground = "skltree_s_back";
|
||||
spellIcons = "SoSkillicon";
|
||||
spellTree = new String[][] {
|
||||
{"StrSklTree25", "StrSklTree5"},
|
||||
{"StrSklTree24", "StrSklTree5"},
|
||||
{"StrSklTree23", "StrSklTree5"},
|
||||
};
|
||||
firstSpell = 36;
|
||||
lastSpell = 66;
|
||||
fws = bws = nu3s = true;
|
||||
@ -28,6 +38,11 @@ public enum CharacterClass {
|
||||
description = 5129;
|
||||
spellsBackground = "skltree_n_back";
|
||||
spellIcons = "NeSkillicon";
|
||||
spellTree = new String[][]{
|
||||
{"StrSklTree10", "StrSklTree5"},
|
||||
{"StrSklTree17", "StrSklTree18", "StrSklTree5"},
|
||||
{"StrSklTree19"},
|
||||
};
|
||||
firstSpell = 66;
|
||||
lastSpell = 96;
|
||||
fws = bws = nu3s = true;
|
||||
@ -38,6 +53,11 @@ public enum CharacterClass {
|
||||
description = 5132;
|
||||
spellsBackground = "skltree_p_back";
|
||||
spellIcons = "PaSkillicon";
|
||||
spellTree = new String[][]{
|
||||
{"StrSklTree15", "StrSklTree4"},
|
||||
{"StrSklTree14", "StrSklTree13"},
|
||||
{"StrSklTree12", "StrSklTree13"},
|
||||
};
|
||||
firstSpell = 96;
|
||||
lastSpell = 126;
|
||||
fws = true;
|
||||
@ -48,6 +68,11 @@ public enum CharacterClass {
|
||||
description = 5130;
|
||||
spellsBackground = "skltree_b_back";
|
||||
spellIcons = "BaSkillicon";
|
||||
spellTree = new String[][]{
|
||||
{"StrSklTree21", "StrSklTree4"},
|
||||
{"StrSklTree21", "StrSklTree22"},
|
||||
{"StrSklTree20"},
|
||||
};
|
||||
firstSpell = 126;
|
||||
lastSpell = 156;
|
||||
fws = true;
|
||||
@ -58,6 +83,11 @@ public enum CharacterClass {
|
||||
description = 22518;
|
||||
spellsBackground = "skltree_d_back";
|
||||
spellIcons = "DrSkillicon";
|
||||
spellTree = new String[][]{
|
||||
{"StrSklTree26", "StrSklTree4"},
|
||||
{"StrSklTree27", "StrSklTree28", "StrSklTree4"},
|
||||
{"StrSklTree29", "StrSklTree4"},
|
||||
};
|
||||
firstSpell = 221;
|
||||
lastSpell = 251;
|
||||
}},
|
||||
@ -66,6 +96,11 @@ public enum CharacterClass {
|
||||
description = 22519;
|
||||
spellsBackground = "skltree_i_back";
|
||||
spellIcons = "AsSkillicon";
|
||||
spellTree = new String[][]{
|
||||
{"StrSklTree30"},
|
||||
{"StrSklTree31", "StrSklTree32"},
|
||||
{"StrSklTree33", "StrSklTree34"},
|
||||
};
|
||||
firstSpell = 251;
|
||||
lastSpell = 281;
|
||||
}},
|
||||
@ -78,6 +113,7 @@ public enum CharacterClass {
|
||||
public int blendSpecial = BlendMode.NONE;
|
||||
public String spellsBackground;
|
||||
public String spellIcons;
|
||||
public String spellTree[][];
|
||||
public int firstSpell, lastSpell;
|
||||
|
||||
CharacterClass(String shortName, int id) {
|
||||
|
@ -3,12 +3,12 @@ package com.riiablo.panel;
|
||||
import com.badlogic.gdx.assets.AssetDescriptor;
|
||||
import com.badlogic.gdx.graphics.g2d.Batch;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.Touchable;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.badlogic.gdx.utils.Disposable;
|
||||
import com.riiablo.CharacterClass;
|
||||
import com.riiablo.Riiablo;
|
||||
@ -18,6 +18,8 @@ import com.riiablo.codec.excel.Skills;
|
||||
import com.riiablo.loader.DC6Loader;
|
||||
import com.riiablo.screen.GameScreen;
|
||||
import com.riiablo.widget.Button;
|
||||
import com.riiablo.widget.Label;
|
||||
import com.riiablo.widget.LabelButton;
|
||||
|
||||
public class SpellsPanel extends WidgetGroup implements Disposable {
|
||||
private static final String TAG = "SpellsPanel";
|
||||
@ -58,10 +60,21 @@ public class SpellsPanel extends WidgetGroup implements Disposable {
|
||||
addActor(tab);
|
||||
}
|
||||
|
||||
StringBuilder builder = new StringBuilder(32);
|
||||
float x = getWidth() - 90, y = 0;
|
||||
Actor[] actors = new Actor[3];
|
||||
LabelButton[] actors = new LabelButton[3];
|
||||
for (int i = 0; i < actors.length; i++) {
|
||||
final Actor actor = actors[i] = new Actor();
|
||||
String[] spellTree = charClass.spellTree[i];
|
||||
builder.setLength(0);
|
||||
for (int j = 0; j < spellTree.length; j++) {
|
||||
builder
|
||||
.append(Riiablo.string.lookup(spellTree[j]))
|
||||
.append('\n');
|
||||
}
|
||||
builder.setLength(builder.length() - 1);
|
||||
final LabelButton actor = actors[i] = new LabelButton(builder.toString(), Riiablo.fonts.font16);
|
||||
actor.setWrap(true);
|
||||
actor.setAlignment(Align.center);
|
||||
actor.setPosition(x, y);
|
||||
actor.setSize(90, getHeight() / 4);
|
||||
actor.setUserObject(tabs[i + 1]);
|
||||
@ -77,6 +90,17 @@ public class SpellsPanel extends WidgetGroup implements Disposable {
|
||||
y += actor.getHeight();
|
||||
}
|
||||
|
||||
Label header = new Label(
|
||||
Riiablo.string.lookup("StrSklTree1") + " "
|
||||
+ Riiablo.string.lookup("StrSklTree2") + " "
|
||||
+ Riiablo.string.lookup("StrSklTree3"),
|
||||
Riiablo.fonts.font16);
|
||||
header.setWrap(true);
|
||||
header.setAlignment(Align.center);
|
||||
header.setSize(90, getHeight() / 8);
|
||||
header.setPosition(x, y + header.getHeight());
|
||||
addActor(header);
|
||||
|
||||
float[] X = { 0, 15, 84, 153 };
|
||||
float[] Y = { 0, 370, 302, 234, 166, 98, 30 };
|
||||
for (int i = charClass.firstSpell; i < charClass.lastSpell; i++) {
|
||||
@ -92,6 +116,7 @@ public class SpellsPanel extends WidgetGroup implements Disposable {
|
||||
tab.addActor(button);
|
||||
}
|
||||
|
||||
tabs[1].setVisible(true);
|
||||
setDebug(true, true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user