-
Notifications
You must be signed in to change notification settings - Fork 15
Helper class + Fixed columns #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ShaRose
wants to merge
53
commits into
lahwran:master
Choose a base branch
from
ShaRose:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contains helper methods to create buttons with ModActions Contains a helper system to create prompts Modified WidgetClassicTwocolumn and WidgetSinglecolumn removed overridewidth: Was broken and nobody used it anyways Fixed overrideheight Added heightOverrideExceptions so you can unable height overrides on specific widgets Assorted Formatting
…everything. Added examples.
…to do them. Fixed a few bugs.
…it's supposed to call doesn't exist, until you actually try and CALL the ModAction. Now crashes when it is created as it's supposed to.
… It's hardcoded because I don't know how to do otherwise. Please don't make fun of it :(
Added WidgetClassicTwocolumn.widthOverrideExceptions. Fixed a bug in ModAction (Basically just exception text) Changed the simple API (Breaking change for it). Can now get the Setting objects, and not JUST the values. Added SettingList. Updated the basic example to the new Simple API.
…g a bug where if a button was disabled and you rolled over it it would stay highlighted. Added TextArea.Callback support to ModAction, so you can use the href tag more effectively. Example of use forthcoming. Minor reformats (Getting rid of a few redundant else clauses).
Added SettingDictionary (What used to be SettingList). Added WidgetList (A listbox linked up with SettingList). Updated some things in ModSettings. Updated the Ant task. Added GuiApiFontHelper (allows you do do easy colouring of fonts, and set them for some widgets). Added some TWL examples (Includes SettingsList example, and the font helper). Modified GuiWidgetScreen slightly to add a field for the url of the theme.
Added javadocs to GuiApiFontHelper Did some formatting Changed GuiApiHelper.genWidget to return WidgetSimplewindow instead of Widget Changed the location check from MinecraftImpl.class to EnumOS2.class just in case Fixed javadoc tag in ModAction Removed some code that I added and forgot about for an example that wasn't supposed to be there in the first place Updated mod_GuiApiTWLExamples
Changed WidgetSimplewindow.mainWidget to actually be the passed widget instead of the scrollpane. Added WidgetItem2DRender (Still a work in progress).
Fixed up WidgetItem2DRender.
Fixed a bug in GuiApiTWLExamples that I thought I had fixed several months ago.
Added bounds updating for WidgetFloat and WidgetInt. Updated WidgetItem2DRender so it uses ItemStack instead of just a render ID: This allows support for Damage values / Subitems to render correctly. Added WidgetTick, to allow Runnable calls on things such as a frame being drawn, every X milliseconds, after X milliseconds of the screen being shown, etc. This is extendable. Added a new example showing off the new uses of WidgetItem2DRender and WidgetTick. Does not currently show the extendability of WidgetTick.iTick.
… for more information for a rare bug. Hasn't come up lately, but hey, why not)
…s via Custom Classloaders. Added a try / catch block in WidgetItem2DRender so that if an exception is thrown during Item render it catches it instead of crashing. Added support so that you can set a flag to allow editing on ValueSliders. (WidgetInt / WidgetFloat)
…a ScrollPane instead of a Widget. Changed a variable name in the constructor for said class it doesn't conflict (Will fix this better when I do the above fix). Fixed a typo in mod_GuiApiTWLExamples. Added textAlignment tags to Progressbars (They now center the text).
…mn / WidgetSinglecolumn. Added said interface to WidgetTick. Added clipping support for WidgetClassicTwoColumn / WidgetSinglecolumn for ScrollPanes (aka MASSIVE performance increase for large windows)
…e dbgout call though: It was never used anyways. This includes a fix to the dreaded "Already tesselating!" exceptions! Hopefully, all of them! (At least me testing with all the mods in DireWolf20's LP worked, so)
Updated ModSettings.getMcinst() to just use Minecraft.getMinecraft() now. Also, because of this got rid of ModSettings.presetMcint(Minecraft) because it's not like anyone used it, and I honestly have no idea why the hell it was there in the first place tbh because it would just break stuff. Removed an unused import for WidgetItem2DRender, which shouldn't have been there anyways (It was a leftover from debugging stuff). WidgetItem2DRender now has to use reflection to get the isDrawing field from the tesselator because mojang made it a private field. If it can't get it, it will just print to console and that part of the protection will be removed, but it's not likely to happen so.
Files created via ModSettings should now be created at the proper location depending on where minecraft is located. The change should not be noticeable by user.
Added a file saying which revision of TWL we are currently using. Updated to 0.15.0 / 0.15.1 (1.4.4 / 1.4.5).
Repackaged everything to sharose.mods.guiapi. Examples are also repackaged to sharose.mods.guiapi.examples. The GuiAPI mod file is now a forge style mod. GuiAPI as a whole requires Forge now. Fixed a bug relating to injecting the global mod options button (If you resized the window it would disappear and not come back) Made GuiAPI a coremod: It's just a dummy and doesn't do anything, but it will have TWL and such injected into the classpath far earlier than a regular mod, removing (for good) the need to edit the jar.
Also, the button add code is hacked together now so it forces it into the corner between touchscreen mode and difficulty because there's literally nowhere else to stick it. I'm so sorry. I hope I can get around to rewriting the internals later so they are fit for forge, since apparently whoever it was who asked for it didn't want to put in the effort for it and thus the deadline was missed. At least when I do it it'll hopefully use coremodding and stuff on TWL so I don't need to manually patch it all whenever I get around to updating it. Also it'll be less shit internally, maybe.
Made it specifically say everything was in the releases branch.
Fixed the cannot find isDrawing issue in 0.15.4. Not that it matters, since it turns out the field is public again now. Likewise, I used the ObfuscationReflectionHelper system to try and get the field for GuiScreen.buttonList instead of the loop, but it'll still fall back.
Commited the 'debug' version of GuiAPI I made to find the Invalid value (1281) issue that randomly cropped up. Which somehow solved the said issue by way of spamming Util.checkGLError(). I don't even know anymore.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added GuiApiHelper
Contains helper methods to create buttons with ModActions
Contains a helper system to create prompts
Modified WidgetClassicTwocolumn and WidgetSinglecolumn
removed overridewidth: Was broken and nobody used it anyways
Fixed overrideheight
Added heightOverrideExceptions so you can unable height overrides on specific widgets
Assorted Formatting
Note that the columns are actually tested and working perfectly this time. See examples:
WidgetSinglecolumn
http://cl.ly/0v1R0t1z3D350J1c1j3Y
WidgetClassicTwocolumn
http://cl.ly/1Y2e1U3Q2l2c0L3t1j0j