Jump to content
Default Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Default Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Sign in to follow this  
GameHackerPM

Request: MenuComponent.Enabled

Recommended Posts

Posted (edited)

Hello, I think it will be good thing, if you can add "Enabled" field to MenuComponent Object, which should control if the component can be used or not, like normal Enabled Field in WPF or Forms in C#.. 

image.png

When uncheck the first checkbox ("Draw Ammo Items") it should disable the following checkboxes.. That's what I'm trying to do.

Edited by GameHackerPM

Share this post


Link to post
Share on other sites

Yes that would be really easy to do, since they're seperate components. 

You have to choose what your "main checkbox" will do with code when it's checked/unchecked.

 

Inside OnTick you can do a check, if "DrawAmmoItems" is enabled to save in a separate variable each of the checkboxes status, making them "enabled - available for checking and so on".

Inside OnDraw, you can do a check again if "DrawAmmoItems" is disabled, if yes, then set all the rest of the checkboxes to the saved variables from OnTick earlier.

For example:

 

if (Components.MiscComponent.DrawAmmoItems.Enabled == false)
{
 Components.MiscComponent.LightRounds.Enabled = lightroundsbool; 
 Components.MiscComponent.EnergyRounds.Enabled = energyroundbool; 
  //and so on for the rest of the checkboxes
}

 

 

My suggestion is to not manipulate the state of the checkboxes based on the main boolean above them. Instead allow them to be changed at all situations and simply control the code flow trough the main checkbox boolean "DrawAmmoItems". Exactly like there is a MainAssemblyToggle in all of my assemblies, which is a toggle button for the cheat with "DELETE" key.


giphy.gif

Gaben strategies too OP.

Share this post


Link to post
Share on other sites
4 minutes ago, Feretorix said:

Yes that would be really easy to do, since they're seperate components. 

You have to choose what your "main checkbox" will do with code when it's checked/unchecked.

 

Inside OnTick you can do a check, if "DrawAmmoItems" is enabled to save in a separate variable each of the checkboxes status, making them "enabled - available for checking and so on".

Inside OnDraw, you can do a check again if "DrawAmmoItems" is disabled, if yes, then set all the rest of the checkboxes to the saved variables from OnTick earlier.

For example:

 


if (Components.MiscComponent.DrawAmmoItems.Enabled == false)
{
 Components.MiscComponent.LightRounds.Enabled = lightroundsbool; 
 Components.MiscComponent.EnergyRounds.Enabled = energyroundbool; 
  //and so on for the rest of the checkboxes
}

 

 

My suggestion is to not manipulate the state of the checkboxes based on the main boolean above them. Instead allow them to be changed at all situations and simply control the code flow trough the main checkbox boolean "DrawAmmoItems". Exactly like there is a MainAssemblyToggle in all of my assemblies, which is a toggle button for the cheat with "DELETE" key.

I know it can be done simply by putting a check of the main with the check of each checkbox, so it needs to be enabled, but I was talking about the way of how it "Looks".. I don't like the way that I set all checkboxes to whatever the main enabled value is ... cause won't be so efficient cause of a case like if WeScript.App get closed while the main is false, then all other checkboxes will be false, and for example before I disable the main, I had 3 of the checkboxes enabled and other 2 are not, which in this case all will be enabled or disabled can't know my old choices (If the app is closed when it's false) I will need to save that settings ..etc to fix that. Which is not very good I believe..

I was just talking about the way of how it "Looks" that's all, but can work with it no problems.

Share this post


Link to post
Share on other sites

I understand, you're asking for some sort of "grayed out" option, plus them being unable to be changed from the menu. I can probably add that at a later stage.

Since the SDK is nothing special at this moment (just a menu), do you want me to make it a public open source release so you can contribute with your code to it?


giphy.gif

Gaben strategies too OP.

Share this post


Link to post
Share on other sites
4 minutes ago, Feretorix said:

I understand, you're asking for some sort of "grayed out" option, plus them being unable to be changed from the menu. I can probably add that at a later stage.

Since the SDK is nothing special at this moment (just a menu), do you want me to make it a public open source release so you can contribute with your code to it?

I can take a look if you don't mind.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...