edited in my own compact style, can't test cause then you need all parts
include "kzp_playerdata.gs" include "kzp_admbrowser.gs"
include "kzp_vehiclesetbrowser.gs" include "kzp_partsshopbrowser.gs"
class kzp_GuiHandler {
public kzp_AdmBrowser qdBrowser = null;
public kzp_VehicleSettingsBrowser vsBrowser = null;
public kzp_PartsShopBrowser psBrowser = null;
public void openPartsShop(kzp_playerData main) {
if (psBrowser) {psBrowser.mainBrowser = null;}
if (!psBrowser) {
psBrowser = new kzp_PartsShopBrowser();
psBrowser.Init(main);
psBrowser.DisplayBrowser("HELLOPAGE");
}
psBrowser.RestoreWindow();
psBrowser.RefreshDisplayHTML();
psBrowser.mainBrowser.SetWindowSize(800, 460);
psBrowser.SetBrowserVisible(true);
}
public void openAdminGUI(kzp_playerData main) {
if (qdBrowser) {qdBrowser.mainBrowser = null;}
if (!qdBrowser) {
qdBrowser = new kzp_AdmBrowser();
qdBrowser.Init(main);
qdBrowser.DisplayBrowser("HELLOPAGE");
}
qdBrowser.RestoreWindow();
qdBrowser.RefreshDisplayHTML();
qdBrowser.mainBrowser.SetWindowSize(800, 460);
qdBrowser.SetBrowserVisible(true);
}
public void openVehicleGUI(kzp_playerData main, kzp_playerClass player) {
if (vsBrowser) {vsBrowser.mainBrowser = null;}
if (!vsBrowser) {
vsBrowser = new kzp_VehicleSettingsBrowser();
vsBrowser.Init(main, player);
vsBrowser.DisplayBrowser("HELLOPAGE");
}
vsBrowser.RestoreWindow();
vsBrowser.RefreshDisplayHTML();
vsBrowser.mainBrowser.SetWindowSize(800, 460);
vsBrowser.SetBrowserVisible(true);
}
};