ConfigObject.java 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * Roughly Enough Items by Danielshe.
  3. * Licensed under the MIT License.
  4. */
  5. package me.shedaniel.rei.api;
  6. import me.shedaniel.rei.gui.config.ItemCheatingMode;
  7. import me.shedaniel.rei.gui.config.ItemListOrdering;
  8. import me.shedaniel.rei.gui.config.RecipeScreenType;
  9. import me.shedaniel.rei.gui.config.SearchFieldLocation;
  10. import me.zeroeightsix.fiber.tree.ConfigNode;
  11. import me.zeroeightsix.fiber.tree.Node;
  12. public interface ConfigObject {
  13. Node getGeneral();
  14. ConfigNode getConfigNode();
  15. boolean isCheating();
  16. void setCheating(boolean cheating);
  17. ItemListOrdering getItemListOrdering();
  18. boolean isItemListAscending();
  19. boolean isUsingDarkTheme();
  20. boolean doesRenderEntryExtraOverlay();
  21. boolean isEntryListWidgetScrolled();
  22. boolean shouldAppendModNames();
  23. RecipeScreenType getRecipeScreenType();
  24. void setRecipeScreenType(RecipeScreenType recipeScreenType);
  25. boolean isLoadingDefaultPlugin();
  26. SearchFieldLocation getSearchFieldLocation();
  27. boolean isLeftHandSidePanel();
  28. boolean isCraftableFilterEnabled();
  29. String getGamemodeCommand();
  30. String getGiveCommand();
  31. String getWeatherCommand();
  32. int getMaxRecipePerPage();
  33. boolean doesShowUtilsButtons();
  34. boolean doesDisableRecipeBook();
  35. boolean areClickableRecipeArrowsEnabled();
  36. ItemCheatingMode getItemCheatingMode();
  37. boolean isUsingLightGrayRecipeBorder();
  38. boolean doesVillagerScreenHavePermanentScrollBar();
  39. boolean doesRegisterRecipesInAnotherThread();
  40. RelativePoint getChoosePageDialogPoint();
  41. void setChoosePageDialogPoint(RelativePoint choosePageDialogPoint);
  42. public static class RelativePoint {
  43. private double relativeX, relativeY;
  44. public RelativePoint(double relativeX, double relativeY) {
  45. this.relativeX = relativeX;
  46. this.relativeY = relativeY;
  47. }
  48. public double getRelativeX() {
  49. return relativeX;
  50. }
  51. public double getRelativeY() {
  52. return relativeY;
  53. }
  54. public double getX(double width) {
  55. return width * relativeX;
  56. }
  57. public double getY(double height) {
  58. return height * relativeY;
  59. }
  60. }
  61. }