cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Design forum

Interface Script

Red
Enthusiast
Hopefully this is possible. Once I’m completely finished with Interface it will probably be about 10 pages. So what I wondering is there a wait to setup the first page as a menu with buttons that would take you to each page. Also each page would need a menu button to take you back to the menu. If this is possible does anyone have an example?
Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
19 REPLIES 19

Anonymous
Not applicable
Attached, a UI PageTurn object.
Explanations inside the object, for AC 8.1 & 9.

This is a variation around the original idea from Joachim Suehlo.
The main advantage of Joachim's method : one can jump directly from page 1 to page 5.

Fast and easy to script, if you don't need images to illustrate buttons.
Enjoy.


Attachment deleted by the author: see next posts

Anonymous
Not applicable
An image, showing the result.
UI PageTurn.jpg

Rob
Graphisoft
Graphisoft
Olivier,

I quite like your concept with buttons as it is really easy to code that crossplatformly but you're getting a bit ugly artefacts when double-clicking on a button (see attached image)...and that makes me wonder if it's worth it...
::rk

Anonymous
Not applicable
Rob wrote:
Olivier,

I quite like your concept with buttons as it is really easy to code that crossplatformly but you're getting a bit ugly artefacts when double-clicking on a button (see attached image)...and that makes me wonder if it's worth it...
Hi Rob,

Why to click twice? Once is enough.
You are right, in case of double-click the background button remains.
I did a small rectification, surely one can do better. Any idea is welcome.

Joachim just remembers to me that the UI pageturn method with booleans is from Roberto Corona.
That's true. My apologies to Roberto. I have rectified this too, into the object.
Joachim did the adaptation with ui_pict for masking the boolean buttons.


Attachment deleted by the author: see next post

Anonymous
Not applicable
Finaly i got it !!!

A simple (one pixel) ui_pict "pix_red", 0, 0
placed anywhere in the script, but WITHOUT x & y dimensions, and this does the trick.
In case of double-clicking, all is fine.

This is so weird, but it works. Mysteries of GDL.

Rob
Graphisoft
Graphisoft
sorry Olivier,

I didn't get back to you after my initial comment because I've got absolutely hammered at work. I'll test this one for sure...
::rk

gerd
Newcomer
great !

here are some ideas to make it work in archicad 7 (I think it will also work in archicad 6.5).
here are some differences betwenn 7.0 and later versions:
- In archiCAD 7 the width of the user interface is smaller and if we place elements outside, nothing is displayed (even not the elements inside). so we need to make the buttons smaller (see below)
- couriously the button placed in the negative space makes no problem, so we can leave this like it is now.
- the problem with the grayed out button (the first one) didn't occure in 7.0, so (if we want) we can leave it, but like mentioned above, it makes no problems
- to avoid the ckeckbox, if a button is double clicked: the method with the 0x0 pixel gif does not work in 7.0, so we need to use the more complicate method shown in the UI_pageturn2.zip

to check, if archicad 7 or 6.5 is in use, we can do it this way:
!!! additional method for usage in archicad 7 by gerd schneider
!!! change size of buttons for archicad versions 7.0 and maybe 6.5
!!! maybe the limit value for the gdl version is not correct

gdlv = req("GDL_Version")
if gdlv < 1.279 and bpos = 0 then      ! archicad 7.0r3 gdlv1.278
	xx = 44    ! button length 
	yy = 22    ! button height 
else
	xx = 63    ! button length
	yy = 22    ! button height
endif
the same method can be used in the script changing the parameters of but1, but2...

ok, maybe it is too complicated to make one object working well in several archicad versions,
I don't know, how many people work with the 7.0 and the startedition and if it is really necessary to develop gdl's working with older versions, but perhaps it is interesting for some of you.

best regards, gerd

gerd
Newcomer
one additional remark to the methods used to change the page
(the part from roberto corona) and cover the ckeckboxes with buttons (olivier dentan): when i use it in archicad 7 with the modifications I told, the doubleclick on another button than the selected one
- page 1 gets active (method from ui---2 :parameterscript)
- the double clicked button gets active (better!), but the ckeckbox gets visible (method from ui---3 :parameterscript)

but with one klick it works well.
best regards, gerd

Anonymous
Not applicable
Danke Gerd,

I have deleted the two previous versions, to avoid confusion.
Using the third and last version, you don't jump to another page in case of double-clic.
Same thing if you adapt the UI for AC 7.

To clarify a point, the checkbox (boolean) shows through the button during a fraction of second,
the time during which it is clicked or double clicked, but it disapears after.
This happens too, with Joachim's method, one can't avoid it.
One may don't like that, for myself, it is a minor desagreement, compared to the flexibility.

I did a try on AC 7, and your script works.
The first button is not greyed on 7, that's true.

On Mac, with AC 7, if i delete the (ui_pict "pix_red", 0, 0), i get the same artefact pointed by Rob.
Curiously, if i delete it, it works fine only for the double button, when i double-click it.
Still weird.

Anonymous
Not applicable
Following my investigations, i have found this.
For ui_infield using arrays, there is no way to add a title on the button (in place of the four squares).

Using the "dummy" ui_button command, one can add a title overlapping the original button.
It works the same. See code with attachment.

Of course, i know that it is the kind of feature that GS can change at any time.
If they do, for next release, i hope they will replace this workaround by a new "official" feature, allowing the same result.

Didn't find the answer? Start a new discussion

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!