How to Edit Panel Custom Styles in GD Script?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By The_Duskitty
:warning: Old Version Published before Godot 3 was released.

I need to be able to Go into the panel custom styles so i can make a theme changer for a game im working on

How would i go about doing this? And Could you explain it in the simplest way possible, cause ive tried reading other stuff and it just confuses me to death

:bust_in_silhouette: Reply From: KRL
  1. Insert “Panel” object
  2. From “Inspector” choose property “Custom Styles”
  3. Tick the enabling box next to “Panel” property
  4. Press arrow pointing down next the at the same line
  5. Choose “new stylebox texture”
  6. Press arrow pointing right at the same line
  7. Inspector will jump yo the new style box parameters
  8. Scrooll up and assign wated texture

Edited on 13.03.16:

via code:

get_stylebox("panel", "" ).set_texture(load("res://AAAAA.png"))

I was Asking How to edit them via GD Script, not how to Add them in general

The_Duskitty | 2016-03-12 19:09

OK. Here it is:

  1. Create new theme on your panel
  2. Then change the resource of the theme named “panel”

KRL | 2016-03-13 11:19

Ok here is the solution:

get_stylebox("panel", "" ).set_texture(load("res://AAAAA.png"))

it replaces original panel background image with image called “AAAAA” located in project folder

KRL | 2016-03-13 12:26