mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
add client config to adjust tool hud indicator position
This commit is contained in:
parent
dd3746a3d4
commit
c8fe3cc095
@ -35,6 +35,8 @@ public class ClientConfig extends RunningConfig {
|
||||
public static ConfigWrapper<Boolean> RENDER_REBAR_SIMPLE = new ConfigWrapper(false);
|
||||
public static ConfigWrapper<Integer> RENDER_HELIOSTAT_BEAM_LIMIT = new ConfigWrapper(250);
|
||||
public static ConfigWrapper<Integer> RENDER_REBAR_LIMIT = new ConfigWrapper(250);
|
||||
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_X = new ConfigWrapper(0);
|
||||
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_Y = new ConfigWrapper(0);
|
||||
|
||||
private static void initDefaults() {
|
||||
configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL);
|
||||
@ -59,6 +61,8 @@ public class ClientConfig extends RunningConfig {
|
||||
configMap.put("RENDER_REBAR_SIMPLE", RENDER_REBAR_SIMPLE);
|
||||
configMap.put("RENDER_HELIOSTAT_BEAM_LIMIT", RENDER_HELIOSTAT_BEAM_LIMIT);
|
||||
configMap.put("RENDER_REBAR_LIMIT", RENDER_REBAR_LIMIT);
|
||||
configMap.put("TOOL_HUD_INDICATORE_X", TOOL_HUD_INDICATOR_X);
|
||||
configMap.put("TOOL_HUD_INDICATORE_Y", TOOL_HUD_INDICATOR_Y);
|
||||
}
|
||||
|
||||
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
||||
|
||||
@ -18,6 +18,7 @@ import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.ClientConfig;
|
||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||
import com.hbm.handler.ability.AvailableAbilities;
|
||||
import com.hbm.handler.ability.IBaseAbility;
|
||||
@ -603,12 +604,14 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
|
||||
|
||||
GuiIngame gui = Minecraft.getMinecraft().ingameGUI;
|
||||
int size = 16;
|
||||
int ox = ClientConfig.TOOL_HUD_INDICATOR_X.get();
|
||||
int oy = ClientConfig.TOOL_HUD_INDICATOR_Y.get();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(GUIScreenToolAbility.texture);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
||||
gui.drawTexturedModalRect(event.resolution.getScaledWidth() / 2 - size - 8, event.resolution.getScaledHeight() / 2 + 8, uv.key, uv.value, size, size);
|
||||
gui.drawTexturedModalRect(event.resolution.getScaledWidth() / 2 - size - 8 + ox, event.resolution.getScaledHeight() / 2 + 8 + oy, uv.key, uv.value, size, size);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user