From 392889b030f8e6028ac97043c9d8b8fb59dc48e7 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Thu, 20 Aug 2020 22:02:57 -0700 Subject: [PATCH] Replace ControlPanel specific code with an observer copy --- core/src/com/riiablo/screen/panel/SpellsQuickPanel.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core/src/com/riiablo/screen/panel/SpellsQuickPanel.java b/core/src/com/riiablo/screen/panel/SpellsQuickPanel.java index c2464f4d..4bc16244 100644 --- a/core/src/com/riiablo/screen/panel/SpellsQuickPanel.java +++ b/core/src/com/riiablo/screen/panel/SpellsQuickPanel.java @@ -107,12 +107,7 @@ public class SpellsQuickPanel extends Table implements Disposable, CharData.Skil HotkeyButton button = keyMappings.get(key); if (button == null) return; // TODO: Assign - ControlPanel controlPanel = Riiablo.game.controlPanel; - if (leftSkills) { - controlPanel.getLeftSkill().copy(button); - } else { - controlPanel.getRightSkill().copy(button); - } + observer.copy(button); } }; for (MappedKey Skill : Keys.Skill) Skill.addStateListener(mappedKeyListener);