It seems to me creating a GUI builder is a hard task, but not impossible. Now my little pet project is able to load and render project files that describe a gui or a part of gui. Here is few examples.
After start the program.
A project loaded and rendered on the canvas.
Added a button to a selected panel.
Here is the source of the loaded project:
Code
{ two_panels:
content = "panel"
{ panel:
type = "native_panel"
name = "gui_2"
pos_x = "710"
pos_y = "0"
size_x = "356"
size_y = "324"
bmap = "images/panel.png"
layer = "2"
}
{ panel:
type = "native_panel"
name = "gui_4"
pos_x = "350"
pos_y = "350"
bmap = "images/panel.png"
layer = "2"
{ button:
type = "sgb_button"
name = "button_1"
pos_x = "130"
pos_y = "44"
bmap = "images/base_btn_1_bg.png"
layer = "3"
function = "bubu_function"
{ text:
type = "caption"
text = "BUBU"
font = "arial"
size = "12"
}
}
{ button:
type = "sgb_button"
name = "button_2"
pos_x = "211"
pos_y = "20"
bmap = "images/btn_for_panel.png"
layer = "3"
}
}
}