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.
here is my idea for a scol app loading screen:
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
the image loading problem is solved....the loading function didn't work with .png files, so i converted to .bmp and it appears.
Offline
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
_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
_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
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
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
You can make also with _drawRectangle, some more lines are needed.
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
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