* The UIHelper class for providing GUI pages and elements.<br>
* It has been designed so that multiple stages can utilize the UIHelper with multiple UIHelper instances.
*
* @author despawningbone
*/
@SuppressWarnings({"unchecked","rawtypes"})//had to do this to drastically reduce code lines; besides i wont actually use the events in the functions anyways
publicclassUIHelper{
privateStagem;
privateinth;
privateintw;
/**
* Instantiates the UIHelper with the respective window stage, and its size.
* @param main the window stage the UIHelper should operate on
* @param width the width of the window stage, in pixels
* @param height the height of the window stage, in pixels
*/
publicUIHelper(Stagemain,intwidth,intheight){
m=main;
h=height;
w=width;
}
/**
* Displays a page according to the node given, adding suitable uniformed styling in the process.
* @param node the page node to be displayed
* @param darkenBg whether the background should be darkened or not
((Button)event.getSource()).setDisable(true);//so people cant spam it when its in result mode; have to cast coz even tho send is definitely initialized it thinks it isnt