Hey this looks great! It looks like you can use a variable to determine a panel's position.
I am trying to do something like this, I want to place buttons on the screen based on the current screen resolution, this allows buttons to stay at the right place, even when resolution changes.
So I wanted to put a variable at the position of the panel button, but that gives a syntax error.
Is it possible to place buttons (that can be pressed) depending on a variable, then I could have them at the right places for every resolution.
code:
build()
{ create_building; }
if (video_mode == 7) var button_pos = 400;
if (video_mode == 8) var button_pos = 500;
panel UI_button
{
button = button_pos,button_pos, icon, icon, pressed, build(), NULL, NULL;
layer = 1; flags = d3d, refresh;
}
function main {
while (game) {
UI_button.visible = on; // show panel
wait(1); } }
sadly this gives a syntax error for the variable I use...