Posted 23 February 2017 - 10:43 PM
I have some weird bug regarding my Control Panel in an OS I am working on.
In my Control Panel there is an Appearance menu where you can change the colour of most objects' Background colour and Text colour. However, there is something very weird happening and I have looked in all the 'Classic Mistakes' places and there is nothing wrong that I can see.
This usually means I need a fresh pair of eyes to take a look at my code for me.
That's where you guys come in.
Have a look.
"What's the bug?" you ask?
Well. When I change the colour of any one of the 'Text' objects in the Appearance menu, it will first change the Main 'Background' colour and then the Main 'Text' colour. Then if I try again it will do the next 'Text' object down (Menu 'Text' colour), and then the next and so on. When it finally reaches the bottom, it will go back to the top except it will change the 'Background' objects and will go down those next. I am very confused at what is going on here.
Knock yourself out. Feel free to play around with the code to see what you can do to make it work.
It will automatically create a config file like so:
So far it just saves object colours.
You may need to create a directory like so:
Don't bother trying to add files/folders in there as it gets complicated. You can probably see that when you look through my code.
NOTE: The code is semi-OOP programmed so it can be easier to read and it can also be harder to read…Good luck!
THE PASTEBIN CODE: QKh35fqK
Thanks in advance and GOOD LUCK FIXING IT :D/>
In my Control Panel there is an Appearance menu where you can change the colour of most objects' Background colour and Text colour. However, there is something very weird happening and I have looked in all the 'Classic Mistakes' places and there is nothing wrong that I can see.
This usually means I need a fresh pair of eyes to take a look at my code for me.
That's where you guys come in.
Have a look.
"What's the bug?" you ask?
Well. When I change the colour of any one of the 'Text' objects in the Appearance menu, it will first change the Main 'Background' colour and then the Main 'Text' colour. Then if I try again it will do the next 'Text' object down (Menu 'Text' colour), and then the next and so on. When it finally reaches the bottom, it will go back to the top except it will change the 'Background' objects and will go down those next. I am very confused at what is going on here.
Knock yourself out. Feel free to play around with the code to see what you can do to make it work.
It will automatically create a config file like so:
/dj.cfg
So far it just saves object colours.
You may need to create a directory like so:
/desktop
Don't bother trying to add files/folders in there as it gets complicated. You can probably see that when you look through my code.
NOTE: The code is semi-OOP programmed so it can be easier to read and it can also be harder to read…Good luck!
THE PASTEBIN CODE: QKh35fqK
Thanks in advance and GOOD LUCK FIXING IT :D/>
Edited on 24 February 2017 - 12:59 AM