Commit f140ce29a31777df13e5c0242a80b6afefe56de0

Authored by Mumfrey
1 parent 176016ae

LiteLoader 1.6.4_02 - experimental - minor tweaks to ConfigPanel handling

java/com/mumfrey/liteloader/gui/GuiConfigPanelContainer.java
... ... @@ -213,7 +213,7 @@ public class GuiConfigPanelContainer extends Gui implements ConfigPanelHost
213 213 glTranslatef(MARGIN, this.panelTop, 0.0F);
214 214  
215 215 // Draw panel contents
216   - this.panel.drawPanel(this, mouseX - MARGIN, mouseY - this.panelTop, partialTicks);
  216 + this.panel.drawPanel(this, mouseX - MARGIN - (this.mouseOverPanel(mouseX, mouseY) ? 0 : 99999), mouseY - this.panelTop, partialTicks);
217 217 glClear(GL_DEPTH_BUFFER_BIT);
218 218  
219 219 // Disable clip rect
... ... @@ -243,6 +243,16 @@ public class GuiConfigPanelContainer extends Gui implements ConfigPanelHost
243 243 }
244 244  
245 245 /**
  246 + * @param mouseX
  247 + * @param mouseY
  248 + * @return
  249 + */
  250 + private boolean mouseOverPanel(int mouseX, int mouseY)
  251 + {
  252 + return mouseX > MARGIN && mouseX <= this.width - MARGIN && mouseY > TOP && mouseY <= this.height - BOTTOM;
  253 + }
  254 +
  255 + /**
246 256 * @param mouseWheelDelta
247 257 */
248 258 public void mouseWheelScrolled(int mouseWheelDelta)
... ... @@ -272,7 +282,10 @@ public class GuiConfigPanelContainer extends Gui implements ConfigPanelHost
272 282 }
273 283 }
274 284  
275   - this.panel.mousePressed(this, mouseX - MARGIN, mouseY - this.panelTop, mouseButton);
  285 + if (this.mouseOverPanel(mouseX, mouseY))
  286 + {
  287 + this.panel.mousePressed(this, mouseX - MARGIN, mouseY - this.panelTop, mouseButton);
  288 + }
276 289 }
277 290  
278 291 /**
... ...
java/com/mumfrey/liteloader/gui/GuiScreenModInfo.java
... ... @@ -237,7 +237,7 @@ public class GuiScreenModInfo extends GuiScreen
237 237  
238 238 this.buttonList.clear();
239 239 this.buttonList.add(this.btnToggle = new GuiButton(0, left, this.height - PANEL_BOTTOM - 24, 90, 20, "Enable mod"));
240   - this.buttonList.add(this.btnConfig = new GuiButton(1, left + 92, this.height - PANEL_BOTTOM - 24, 60, 20, "Config"));
  240 + this.buttonList.add(this.btnConfig = new GuiButton(1, left + 92, this.height - PANEL_BOTTOM - 24, 69, 20, "Settings..."));
241 241 this.buttonList.add(this.chkEnabled = new GuiCheckbox(2, LEFT_EDGE + MARGIN, this.height - PANEL_BOTTOM + 9, "Show LiteLoader tab on main menu"));
242 242  
243 243 this.selectMod(this.selectedMod);
... ...