Hi ,
is it possible to use variables instead of
integer value for at command ?
Project : REAL screen independent GUI
R E B O L [title 'screenindependent']
x: system/view/screen-face/size/1 ;; Width in a variable
y: system/view/screen-face/size/2 ;; Height in a variable
x1: x / 100 ;; 100 percentage steps
y1: y / 100
x2: x1 / 2 ;; half screen size is now 100%
y2: y1 / 2
print x ;; screen full size
print y
print x1 ;; 1 % of it
print y1
print x2 ;; if you use a half screen then half is now 100% size and x2 is 1% of it
print y2
m1: x2 * 75 ;; try to set a variable m1 that contains 75% of the window Width
m2: y2 * 10
view center-face layout [ size system/view/screen-face/size / 2 ;; window IS 50% of machine screen size
at m1 x m2 button 'i am screen independent' [] ;; want to place a button on 75% width of the main window
]