Go Back   AC3D Forums > Resources > AC3D Scripts and Mods
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 7th June 2018, 01:52 PM   #1
gogosAC
Junior Member
Member
 
Join Date: Jun 2018
Posts: 20
Default coloured buttons

Hello, I'm new here. Working for some months with AC3D.

Now I've added some buttons in the upper button-menu, just adding them in the toolbar.tcl

1) Now I wish to get some of the buttons coloured.

I have seen this in another thread here. But it was scripted.

2) Is it possible to get a coloured button just adding the "colour-command" to my "toolbar-command" (without scripting) : e.g.

--- toolbar_add_button "SnTog" "ac3d snaptogether" "Snap Together" ---

3) if yes, where to get the colour-names ?

Thanks
gogosAC is offline   Reply With Quote
Old 8th June 2018, 07:31 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,381
Default Re: coloured buttons

The buttons are made from ttk so they inherit their appearance from ttk styles. Therefore it's difficult to change their color.

You could use a tk button.

As an example, put this into a file in the scripts folder "test.tcl":
Code:
button $UI(toolbar).mybutton -text "Make selected red" -background red -command "ac3d set_col 2"
pack $UI(toolbar).mybutton -side left
When AC3D starts, it will run the script and put a button on the tool bar, which when pressed will set the color of anything to selected to red.

Not as pretty. Like you discovered, toolbar_add_button is the way to go for standard toolbar buttons
Andy is offline   Reply With Quote
Old 8th June 2018, 09:35 AM   #3
gogosAC
Junior Member
Member
 
Join Date: Jun 2018
Posts: 20
Default Re: coloured buttons

Thanks Andy, I feared this answer ! It's fortunately only a comfort-problem.

Now another little "problem".

For the upper question, I checked all the tcl-files, to get familiar with.
Perhaps I was a little bit clumsy.
Also I put the - bgimageloadsave.tcl - to the scripts-directory (but didn't see any changes).

It seems, as a result of these two actions(?), that I lost my (quite a lot) "personal" settings.

I detected the ac3dprefs.TXT in the c:\users\...area with MY settings-name.

How can I get my settings back to AC3D ?

I'm not really understanding the settings dialog.

I can save, but there is no "load-button".
What's the function of this TXT-file?

Thanks

Last edited by gogosAC; 8th June 2018 at 09:38 AM.
gogosAC is offline   Reply With Quote
Old 8th June 2018, 12:03 PM   #4
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,381
Default Re: coloured buttons

That file stores your settings. If you delete it, you'll go back to all the default settings. You can load the file into a text editor and have a look inside.



Are you taking about the user interface colors ("UI" tab on settings dialog)? If so - select one from the list and press Apply (or double click on the list) - same as loading one.
Andy is offline   Reply With Quote
Old 8th June 2018, 12:20 PM   #5
gogosAC
Junior Member
Member
 
Join Date: Jun 2018
Posts: 20
Default Re: coloured buttons

Hello Andy,

that's the problem. My settingsname has disappeared from the apply-list.

And I was glad to find the ac3dprefs.TXT (not .tcl) in the c:\users\...area with MY settings-name INSIDE.
Probably before closing AC3D once more.

But how can I use this textfile, just a list of the settings, now ?
Place it in a certain directory?
Rename it ?

Thanks
gogosAC is offline   Reply With Quote
Old 8th June 2018, 12:43 PM   #6
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,381
Default Re: coloured buttons

It should remain in your home directory - it's read every time AC3D starts, and written to when AC3D quits.


If you want to save a copy of the settings, perhaps to move to another computer or send to someone, just make a copy of the ac3dprefs8.txt file. (note that AC3D 8 uses the filename with an "8" in it. The other (non-8) version is for older versions of AC3D.
Andy is offline   Reply With Quote
Old 8th June 2018, 12:57 PM   #7
gogosAC
Junior Member
Member
 
Join Date: Jun 2018
Posts: 20
Default Re: coloured buttons

In Germany, we say thousand thanks, Andy !

It's like a grab bag.

I saved this ac3dprefs8.txt, and copying it back to users\xxx, it worked again
AND solved an additional menu-problem TOO !

But difficult to know, that this is the right place ?

Have a nice day

Gogo
gogosAC is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 03:56 PM.


AC3D Forum
(C) Inivis Limited 2020