Gem dialogs

GFA BASIC-related articles in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

sashapont
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 144
Joined: Sat Jun 03, 2017 9:40 pm

Gem dialogs

Postby sashapont » Sun Jan 06, 2019 9:35 am

Are there any demo, tutorial, or example for working with dialogs and other gem widgets?
Atari Falcon, Firebee

Moulinaie
Captain Atari
Captain Atari
Posts: 248
Joined: Wed Feb 01, 2012 9:34 pm

Re: Gem dialogs

Postby Moulinaie » Sun Jan 06, 2019 9:58 am

Hi,

Do you want to program GEM ? What language ?

Guillaume.

sashapont
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 144
Joined: Sat Jun 03, 2017 9:40 pm

Re: Gem dialogs

Postby sashapont » Sun Jan 06, 2019 10:06 am

GFA BASIC
Atari Falcon, Firebee

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2500
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Gem dialogs

Postby charles » Sun Jan 06, 2019 1:29 pm

prob some of the keywords to search on the forum are
.RSC
dialogbox
file selecter
menu bar
aes message pipe

charles
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2440
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: Gem dialogs

Postby lp » Sun Jan 06, 2019 4:05 pm

Examples at https://ptonthat.fr/
All source codes can be downloaded.

Playmobil
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 136
Joined: Fri Nov 13, 2015 7:40 pm

Re: Gem dialogs

Postby Playmobil » Sun Jan 06, 2019 6:03 pm

All articles by Claude ATTARD in the ST-Magazine ! :D But it's in french ! :lol:

sashapont
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 144
Joined: Sat Jun 03, 2017 9:40 pm

Re: Gem dialogs

Postby sashapont » Sun Jan 06, 2019 7:06 pm

lp wrote:Examples at https://ptonthat.fr/
All source codes can be downloaded.


Thank you! It is very useful for me! U find way to create dialog boxes with recurse manager. Is it possible to create for example buttons in runtime?
Atari Falcon, Firebee

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 454
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: Gem dialogs

Postby Rajah Lone » Sun Jan 06, 2019 7:37 pm

sashapont wrote:U find way to create dialog boxes with recurse manager. Is it possible to create for example buttons in runtime?

"recurse manager" -> I guess you mean "ressource editor". It's the better way. Using "Interface" or "Ressource Master" (provided in the programs set on the FireBee) is easier.
Creating objects from the program is possible, but not an easy task. There are AES functions to handle objects add/delete/etc. You'll have to handle memory block and real C structures.

Better method is to create the object in the ressouce editor, and set or unset the "hidden" flag (+ redraw) to give the feeling that something was created.

Careful about my sources:
- I use the object index directly, not constant names generated by the ressource editor (Ressource Master shows the objc index with the mouse cursor passing on it).
- Most of the time, the dialogs are in not-blocking windows, AES functions are used here and there in the program: it's not the primitive method, but it suits well under multitasking environement.
- start with small programs such as MyJester or fVDISnap, and don't be afraid to rewrite and change my code for you own purposes: it's allowed and strongly advised for learning.

sashapont
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 144
Joined: Sat Jun 03, 2017 9:40 pm

Re: Gem dialogs

Postby sashapont » Mon Jan 07, 2019 2:28 pm

Rajah Lone wrote:- start with small programs such as MyJester or fVDISnap, and don't be afraid to rewrite and change my code for you own purposes: it's allowed and strongly advised for learning.


I try to cut 2VDI Utilite from Roseta game. I made very simple example only with menu and 2 dialogs. But don't understand how I can make button clickable. They works in resource editor, but not respond in real app
Atari Falcon, Firebee

Playmobil
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 136
Joined: Fri Nov 13, 2015 7:40 pm

Re: Gem dialogs

Postby Playmobil » Mon Jan 07, 2019 3:20 pm

In the ressource editor, have you checked EXIT or TOUCHEXIT for your button ?

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 454
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: Gem dialogs

Postby Rajah Lone » Mon Jan 07, 2019 3:36 pm

sashapont wrote:I try to cut 2VDI Utilite from Roseta game. I made very simple example only with menu and 2 dialogs. But don't understand how I can make button clickable. They works in resource editor, but not respond in real app


primitive method: FORM_DO -> do everything, but blocks everything. Not counseled under multitasking environment. There is similar functions that does not block the other programs, but are not compatible with every systems.

my method: you handle everything. From the EVNT_MULTI in main procedure, you get keyboard and mouse events. Then with the mouse x, y, click, you find the clicked window (WIND_FIND) and the dialog within it (OBJC_FIND).
If object found under x,y,click, then I change its state (select, unselect) and redraw it with redraw function (black_white function ?).

The dialog is always relocated when the window is moved or resized (OB_X and OB_Y of the object 0 in the tree-dialog).
The redraw function redraws the wanted object (clipping xywh = coordonnates of the object) or the all window content.
Last edited by Rajah Lone on Mon Jan 07, 2019 3:38 pm, edited 1 time in total.

sashapont
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 144
Joined: Sat Jun 03, 2017 9:40 pm

Re: Gem dialogs

Postby sashapont » Mon Jan 07, 2019 3:37 pm

Playmobil wrote:In the ressource editor, have you checked EXIT or TOUCHEXIT for your button ?

I set this attributes^ but nothing changed :(

https://cloud.mail.ru/public/N9k8/jpASeJMzj
Atari Falcon, Firebee

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 454
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: Gem dialogs

Postby Rajah Lone » Mon Jan 07, 2019 3:51 pm

chemin$ is missing is declare_1: use to locate precisely the RSC file. If empty string, then your program must start from the clicked window. May sound strange, but one can launch your application

Error due to too must cleaning: search in the original source, some ABSOLUTE instructions, which locates m_fenetre& and others variables from the event_multi in the m_adr% block.

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2440
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: Gem dialogs

Postby lp » Mon Jan 07, 2019 4:08 pm

Have a look at the Tim Oren Pro Gem series (English). The examples are in 'C' but the explanations apply to any language. It was the most useful tutorial for me.
Can be found at https://www.dev-docs.org/docs/

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 454
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: Gem dialogs

Postby Rajah Lone » Mon Jan 07, 2019 4:08 pm

+ Errors (still to much code cleaning) : the mouse event (BTST(evnt&, 1 or 0)) is missing, so clicks are not handled. This should go to window-dialog management with win_find and objc_find, parts you have deleted.


Social Media

     

Return to “GFA BASIC”

Who is online

Users browsing this forum: No registered users and 1 guest