Add config option to reverse the spell switching scroll direction
This commit is contained in:
@@ -158,6 +158,8 @@ public final class Settings {
|
|||||||
* while sneaking.
|
* while sneaking.
|
||||||
*/
|
*/
|
||||||
public boolean enableShiftScrolling = true;
|
public boolean enableShiftScrolling = true;
|
||||||
|
/** <b>[Client-only]</b> Whether to reverse the spell switching scroll direction.*/
|
||||||
|
public boolean reverseScrollDirection = false;
|
||||||
|
|
||||||
// Display
|
// Display
|
||||||
/** <b>[Client-only]</b> Whether to show summoned creatures' names and owners above their heads. */
|
/** <b>[Client-only]</b> Whether to show summoned creatures' names and owners above their heads. */
|
||||||
@@ -459,6 +461,12 @@ public final class Settings {
|
|||||||
property.setRequiresWorldRestart(false);
|
property.setRequiresWorldRestart(false);
|
||||||
enableShiftScrolling = property.getBoolean();
|
enableShiftScrolling = property.getBoolean();
|
||||||
propOrder.add(property.getName());
|
propOrder.add(property.getName());
|
||||||
|
|
||||||
|
property = config.get(CLIENT_CATEGORY, "reverseScrollDirection", true, "Whether to reverse the scroll direction used to switch between spells on a wand while sneaking.");
|
||||||
|
property.setLanguageKey("config." + Wizardry.MODID + ".reverse_scroll_direction");
|
||||||
|
property.setRequiresWorldRestart(false);
|
||||||
|
reverseScrollDirection = property.getBoolean();
|
||||||
|
propOrder.add(property.getName());
|
||||||
|
|
||||||
property = config.get(CLIENT_CATEGORY, "spellHUDPosition", GuiPosition.BOTTOM_LEFT.name, "The position of the spell HUD.", GuiPosition.names);
|
property = config.get(CLIENT_CATEGORY, "spellHUDPosition", GuiPosition.BOTTOM_LEFT.name, "The position of the spell HUD.", GuiPosition.names);
|
||||||
property.setLanguageKey("config." + Wizardry.MODID + ".spell_hud_position");
|
property.setLanguageKey("config." + Wizardry.MODID + ".spell_hud_position");
|
||||||
|
|||||||
@@ -101,10 +101,12 @@ public class WizardryControlHandler {
|
|||||||
&& Wizardry.settings.enableShiftScrolling){
|
&& Wizardry.settings.enableShiftScrolling){
|
||||||
|
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
|
|
||||||
|
int d = Wizardry.settings.reverseScrollDirection ? -event.getDwheel() : event.getDwheel();
|
||||||
|
|
||||||
if(event.getDwheel() > 0){
|
if(d > 0){
|
||||||
selectNextSpell(wand);
|
selectNextSpell(wand);
|
||||||
}else if(event.getDwheel() < 0){
|
}else if(d < 0){
|
||||||
selectPreviousSpell(wand);
|
selectPreviousSpell(wand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -703,6 +703,7 @@ config.ebwizardry.friendly_fire=Friendly Fire
|
|||||||
config.ebwizardry.telekinetic_disarmament=Telekinetic Disarmament
|
config.ebwizardry.telekinetic_disarmament=Telekinetic Disarmament
|
||||||
config.ebwizardry.discovery_mode=Discovery Mode
|
config.ebwizardry.discovery_mode=Discovery Mode
|
||||||
config.ebwizardry.enable_shift_scrolling=Enable Shift-scrolling
|
config.ebwizardry.enable_shift_scrolling=Enable Shift-scrolling
|
||||||
|
config.ebwizardry.reverse_scroll_direction=Reverse Scroll Direction
|
||||||
config.ebwizardry.minion_revenge_targeting=Minion Revenge Targeting
|
config.ebwizardry.minion_revenge_targeting=Minion Revenge Targeting
|
||||||
config.ebwizardry.player_damage_scaling=Player Damage Scaling Factor
|
config.ebwizardry.player_damage_scaling=Player Damage Scaling Factor
|
||||||
config.ebwizardry.npc_damage_scaling=NPC Damage Scaling Factor
|
config.ebwizardry.npc_damage_scaling=NPC Damage Scaling Factor
|
||||||
@@ -740,6 +741,7 @@ config.ebwizardry.friendly_fire.tooltip=Whether to allow players to damage their
|
|||||||
config.ebwizardry.telekinetic_disarmament.tooltip=Whether to allow players to disarm other players using the telekinesis spell. Set to false to prevent stealing of items.
|
config.ebwizardry.telekinetic_disarmament.tooltip=Whether to allow players to disarm other players using the telekinesis spell. Set to false to prevent stealing of items.
|
||||||
config.ebwizardry.discovery_mode.tooltip=For those who like a sense of mystery! When set to true, spells you haven't cast yet will be unreadable until you cast them (on a per-world basis). Has no effect when in creative mode. Spells of identification will be unobtainable in survival mode if this is false.
|
config.ebwizardry.discovery_mode.tooltip=For those who like a sense of mystery! When set to true, spells you haven't cast yet will be unreadable until you cast them (on a per-world basis). Has no effect when in creative mode. Spells of identification will be unobtainable in survival mode if this is false.
|
||||||
config.ebwizardry.enable_shift_scrolling.tooltip=Whether you can switch between spells on a wand by scrolling with the mouse wheel while sneaking. Note that this will only affect you; other players connected to the same server obey their own settings.
|
config.ebwizardry.enable_shift_scrolling.tooltip=Whether you can switch between spells on a wand by scrolling with the mouse wheel while sneaking. Note that this will only affect you; other players connected to the same server obey their own settings.
|
||||||
|
config.ebwizardry.reverse_scroll_direction.tooltip=Whether to reverse the scroll direction used to switch between spells on a wand while sneaking.
|
||||||
config.ebwizardry.minion_revenge_targeting.tooltip=Whether summoned creatures can revenge attack their owner if their owner attacks them.
|
config.ebwizardry.minion_revenge_targeting.tooltip=Whether summoned creatures can revenge attack their owner if their owner attacks them.
|
||||||
config.ebwizardry.player_damage_scaling.tooltip=Global damage scaling factor for the damage dealt by players casting spells, relative to 1.
|
config.ebwizardry.player_damage_scaling.tooltip=Global damage scaling factor for the damage dealt by players casting spells, relative to 1.
|
||||||
config.ebwizardry.npc_damage_scaling.tooltip=Global damage scaling factor for the damage dealt by NPCs casting spells, relative to 1.
|
config.ebwizardry.npc_damage_scaling.tooltip=Global damage scaling factor for the damage dealt by NPCs casting spells, relative to 1.
|
||||||
|
|||||||
@@ -703,6 +703,7 @@ config.ebwizardry.friendly_fire=Friendly Fire
|
|||||||
config.ebwizardry.telekinetic_disarmament=Telekinetic Disarmament
|
config.ebwizardry.telekinetic_disarmament=Telekinetic Disarmament
|
||||||
config.ebwizardry.discovery_mode=Discovery Mode
|
config.ebwizardry.discovery_mode=Discovery Mode
|
||||||
config.ebwizardry.enable_shift_scrolling=Enable Shift-scrolling
|
config.ebwizardry.enable_shift_scrolling=Enable Shift-scrolling
|
||||||
|
config.ebwizardry.reverse_scroll_direction=Reverse Scroll Direction
|
||||||
config.ebwizardry.minion_revenge_targeting=Minion Revenge Targeting
|
config.ebwizardry.minion_revenge_targeting=Minion Revenge Targeting
|
||||||
config.ebwizardry.player_damage_scaling=Player Damage Scaling Factor
|
config.ebwizardry.player_damage_scaling=Player Damage Scaling Factor
|
||||||
config.ebwizardry.npc_damage_scaling=NPC Damage Scaling Factor
|
config.ebwizardry.npc_damage_scaling=NPC Damage Scaling Factor
|
||||||
@@ -739,7 +740,7 @@ config.ebwizardry.show_summoned_creature_names.tooltip=Whether to show summoned
|
|||||||
config.ebwizardry.friendly_fire.tooltip=Whether to allow players to damage their designated allies using magic.
|
config.ebwizardry.friendly_fire.tooltip=Whether to allow players to damage their designated allies using magic.
|
||||||
config.ebwizardry.telekinetic_disarmament.tooltip=Whether to allow players to disarm other players using the telekinesis spell. Set to false to prevent stealing of items.
|
config.ebwizardry.telekinetic_disarmament.tooltip=Whether to allow players to disarm other players using the telekinesis spell. Set to false to prevent stealing of items.
|
||||||
config.ebwizardry.discovery_mode.tooltip=For those who like a sense of mystery! When set to true, spells you haven't cast yet will be unreadable until you cast them (on a per-world basis). Has no effect when in creative mode. Spells of identification will be unobtainable in survival mode if this is false.
|
config.ebwizardry.discovery_mode.tooltip=For those who like a sense of mystery! When set to true, spells you haven't cast yet will be unreadable until you cast them (on a per-world basis). Has no effect when in creative mode. Spells of identification will be unobtainable in survival mode if this is false.
|
||||||
config.ebwizardry.enable_shift_scrolling.tooltip=Whether you can switch between spells on a wand by scrolling with the mouse wheel while sneaking. Note that this will only affect you; other players connected to the same server obey their own settings.
|
config.ebwizardry.enable_shift_scrolling.tooltip=Whether you can switch between spells on a wand by scrolling with the mouse wheel while sneaking. Note that this will only affect you; other players connected to the same server obey their own settings.config.ebwizardry.reverse_scroll_direction.tooltip=Whether to reverse the scroll direction used to switch between spells on a wand while sneaking.
|
||||||
config.ebwizardry.minion_revenge_targeting.tooltip=Whether summoned creatures can revenge attack their owner if their owner attacks them.
|
config.ebwizardry.minion_revenge_targeting.tooltip=Whether summoned creatures can revenge attack their owner if their owner attacks them.
|
||||||
config.ebwizardry.player_damage_scaling.tooltip=Global damage scaling factor for the damage dealt by players casting spells, relative to 1.
|
config.ebwizardry.player_damage_scaling.tooltip=Global damage scaling factor for the damage dealt by players casting spells, relative to 1.
|
||||||
config.ebwizardry.npc_damage_scaling.tooltip=Global damage scaling factor for the damage dealt by NPCs casting spells, relative to 1.
|
config.ebwizardry.npc_damage_scaling.tooltip=Global damage scaling factor for the damage dealt by NPCs casting spells, relative to 1.
|
||||||
|
|||||||
Reference in New Issue
Block a user