Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 23-Oct-2014 15:33:01

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

ui design for loading screen,what functions to use

here is my idea for a scol app loading screen:

app loading window

so the bitmap is in the background, and I use _drawrectangle to make a loading bar. two text controls would display name of .pkg loaded and percentage of pkg's loaded....the rectangle and text controls should appear in front of the bitmap.

I tried this:

 let _GETscreenSize -> [ssw ssh] in
  let _checkpack "tools/mediaoctopus3dplayer/OCTOPUS.png" -> bmpfile in 
  let _LDbitmap _channel  bmpfile -> bmp in
  let _CRwindow _channel nil ((ssw/2)-200) ((ssh/2)-75) 400 250 WN_NOBORDER|WN_NOCAPTION|WN_TOPMOST "Loading window" -> log_window in
  let _CRtext _channel log_window 0 150  400 100 ET_AVSCROLL|ET_VSCROLL|ET_ALIGN_LEFT strcat  "package names will go here" "\n" -> text_control in
  let _envchannel _channel -> environment in 
  //open let brace
  (
  //***octo
  _BLTbitmap log_window bmp 0 0;
  _PAINTwindow log_window; 
  _DSbitmap bmp; 
///more code

but no bitmap displays on the window
needless to say I'm trying to use scol components that work as fast as possible and use the least resources (I want to make a good impression without turning the loading screen in the main production)

thx for your input

Last edited by hebdemnobad (23-Oct-2014 15:34:10)

Offline

#2 23-Oct-2014 16:15:11

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: ui design for loading screen,what functions to use

the image loading problem is solved....the loading function didn't work with .png files, so i converted to .bmp and it appears.

Offline

#3 23-Oct-2014 17:31:47

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: ui design for loading screen,what functions to use

I see that the loading window for the editor is done with the variable winSplash (I'm just putting it here so I or whoever  can find out how to make a splash/loading screen)....however  that method uses the 2dglib.pkg, so I will try to stick with the core api using the more basic elements I described above.

Offline

#4 23-Oct-2014 19:24:59

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: ui design for loading screen,what functions to use

_BLTbitmap also need to be called in _cbwinpaint.

You can do it with containers it should be better for this.
Instead of a _drawRectanble you can use a compBitmap where you change the size.

Offline

#5 23-Oct-2014 19:30:45

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: ui design for loading screen,what functions to use

arkeon wrote:

_BLTbitmap also need to be called in _cbwinpaint.

You can do it with containers it should be better for this.
Instead of a _drawRectanble you can use a compBitmap where you change the size.

I see, I was thinking of that since I don't want the default window color. I'll report if I have problems (hopefully not due to stupid mistakes.).
Is the 'comp' api windows dependent, or could the vm in theory call similar api's on ios and android?

Offline

#6 23-Oct-2014 19:50:43

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: ui design for loading screen,what functions to use

at first this api was multi platform, but as always everything will have to be made again.
In android you should have only on window I think.

Offline

#7 24-Oct-2014 12:48:41

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: ui design for loading screen,what functions to use

Thx arkeon using the comp interface works fine. It is slightly slower but it's easier to use a bunch of different UI elements.

Offline

#8 24-Oct-2014 12:57:10

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: ui design for loading screen,what functions to use

You can make also with _drawRectangle, some more lines are needed.

hebdemnobad wrote:

the loading function didn't work with .png files, so i converted to .bmp and it appears.

You must use _LDalphaBitmap to load a PNG file otherwise the loading will always return nil. Next, if any, _GETalphaBitmaps to get the ObjBitmap..
http://www.scolring.org/files/doc_html/ … itmap.html

Offline

#9 24-Oct-2014 15:07:38

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: ui design for loading screen,what functions to use

So _LDalphaBitmap means if I have a png with alpha channel I can skip the step of loading a bmp8....
Is _LDalphaBitmap less expensive?

Offline

#10 24-Oct-2014 15:49:20

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: ui design for loading screen,what functions to use

Only _LDalphaBitmap loads a PNG file.

Offline

Board footer

Powered by FluxBB