mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-20 19:49:47 +07:00
Added aura icon color
Added aura icon color Added default button state BlendMode Changed level entry image to use BlendMode.DARKEN Added darkenGold color Changed darken colors to be references of existing colors (looks correct) Clicking a SpellsQuickPanel button will hide the panel
This commit is contained in:
parent
c3fcfc4f05
commit
85b7602e15
@ -32,9 +32,10 @@ public class Colors {
|
||||
public Color purple = PURPLE.cpy();
|
||||
public Color c12 = C12.cpy();
|
||||
|
||||
public Color highlight = new Color(0.15f, 0.15f, 0.12f, 0);
|
||||
public Color darken = new Color(0.40f, 0.40f, 0.40f, 0);
|
||||
public Color darkenR = new Color(1.00f, 0.20f, 0.20f, 0);
|
||||
public Color highlight = new Color(0.15f, 0.15f, 0.12f, 0);
|
||||
public Color darken = new Color(0.40f, 0.40f, 0.40f, 0);
|
||||
public Color darkenRed = RED.cpy();//new Color(1.00f, 0.20f, 0.20f, 0);
|
||||
public Color darkenGold = GOLD.cpy();
|
||||
|
||||
public Color invBlue = new Color(0.1f, 0.1f, 0.5f, 0.3f);
|
||||
public Color invGreen = new Color(0.1f, 0.5f, 0.1f, 0.3f);
|
||||
|
@ -30,5 +30,6 @@ public class Skills extends Excel<Skills.Entry> {
|
||||
public int Param[];
|
||||
@Column public boolean leftskill;
|
||||
@Column public boolean passive;
|
||||
@Column public boolean aura;
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import com.riiablo.codec.DC6;
|
||||
import com.riiablo.codec.excel.SkillDesc;
|
||||
import com.riiablo.codec.excel.Skills;
|
||||
import com.riiablo.entity.Player;
|
||||
import com.riiablo.graphics.BlendMode;
|
||||
import com.riiablo.key.MappedKey;
|
||||
import com.riiablo.key.MappedKeyStateAdapter;
|
||||
import com.riiablo.screen.GameScreen;
|
||||
@ -64,6 +65,9 @@ public class SpellsQuickPanel extends Table implements Disposable {
|
||||
Table table = tables[desc.ListRow];
|
||||
if (table == null) table = tables[desc.ListRow] = new Table();
|
||||
final HotkeyButton button = new HotkeyButton(CharSkillicon, desc.IconCel);
|
||||
if (skill.aura) {
|
||||
button.setBlendMode(BlendMode.DARKEN, Riiablo.colors.darkenGold);
|
||||
}
|
||||
|
||||
int index = ArrayUtils.indexOf(player.skillBar, i);
|
||||
if (index != ArrayUtils.INDEX_NOT_FOUND) {
|
||||
@ -81,6 +85,7 @@ public class SpellsQuickPanel extends Table implements Disposable {
|
||||
} else {
|
||||
controlPanel.getRightSkill().copy(button);
|
||||
}
|
||||
SpellsQuickPanel.this.setVisible(false);
|
||||
}
|
||||
});
|
||||
table.add(button);
|
||||
|
@ -815,7 +815,8 @@ public class GameScreen extends ScreenAdapter implements LoadingScreen.Loadable
|
||||
enteringImage = new DCWrapper();
|
||||
enteringImage.setScaling(Scaling.none);
|
||||
enteringImage.setAlign(Align.center);
|
||||
enteringImage.setBlendMode(BlendMode.TINT_ID_RED);
|
||||
enteringImage.setBlendMode(BlendMode.DARKEN);
|
||||
enteringImage.setColor(Riiablo.colors.darkenRed);
|
||||
stage.addActor(enteringImage);
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,9 @@ public class Button extends com.badlogic.gdx.scenes.scene2d.ui.Button implements
|
||||
int highlightedBlendMode = BlendMode.BRIGHTEN;
|
||||
Color highlightedColor = Riiablo.colors.highlight;
|
||||
|
||||
int blendMode = BlendMode.ID;
|
||||
Color color = Riiablo.colors.white;
|
||||
|
||||
@Override
|
||||
public void setStyle(com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle style) {
|
||||
super.setStyle(style);
|
||||
@ -53,6 +56,11 @@ public class Button extends com.badlogic.gdx.scenes.scene2d.ui.Button implements
|
||||
});
|
||||
}
|
||||
|
||||
public void setBlendMode(int blendMode, Color color) {
|
||||
this.blendMode = blendMode;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public void setDisabledBlendMode(int blendMode, Color color) {
|
||||
disabledBlendMode = blendMode;
|
||||
disabledColor = color;
|
||||
@ -88,10 +96,11 @@ public class Button extends com.badlogic.gdx.scenes.scene2d.ui.Button implements
|
||||
setColor(highlightedColor);
|
||||
batch.setBlendMode(highlightedBlendMode);
|
||||
} else {
|
||||
setColor(Color.WHITE);
|
||||
setColor(color);
|
||||
batch.setBlendMode(blendMode);
|
||||
}
|
||||
super.draw(batch, parentAlpha);
|
||||
if (disabled || over) batch.resetBlendMode();
|
||||
batch.resetBlendMode();
|
||||
}
|
||||
|
||||
public static class ButtonStyle extends com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle {
|
||||
|
@ -25,7 +25,7 @@ public class HotkeyButton extends Button {
|
||||
pad(2);
|
||||
pack();
|
||||
|
||||
setDisabledBlendMode(BlendMode.DARKEN, Riiablo.colors.darkenR);
|
||||
setDisabledBlendMode(BlendMode.DARKEN, Riiablo.colors.darkenRed);
|
||||
}
|
||||
|
||||
public void map(MappedKey mapping) {
|
||||
|
Loading…
Reference in New Issue
Block a user