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 20-Oct-2014 17:27:06

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

problem creating color for edwindowtoolbar [solved]

hello

i'm trying to create a toolbar....the vm can't seem to find the _colorNew function (perhaps it doesn't exist since g2k is still a work in process?)

in any case, how would i create a color for a toolbar (scol uses several formats for colors, I assume this is g2k but I'm not sure, and the online doc example, http://www.scolring.org/files/doc_html/_colorNew.html, doesn't appear complete (it doesn't contain a _colorNew example with an alpha value)

as always I may be missing something under my nose

here is my code

  let _colorNew _channel 65365 0xFFFF 0xFFFF -> toolbar_color in
  let crEdWindowToolBar mainWindow 0 0 nw 50 5 1 toolbar_color ETB_HORIZONTAL -> tbstr in

the consolse states that _colorNew is unknown

here are the loaded .pkg's (the same as loaded in the os3dplayer)

  let "tools/os3dlib/tools.pkg"::

    "tools/os3dlib/xmlparser.pkg"::

    "tools/os3dlib/keyblib.pkg"::

    "tools/os3dlib/ogrematparser.pkg"::

    "tools/os3dlib/v3dlib.pkg"::

    "tools/os3dlib/v3dlib_physics.pkg"::

    "tools/os3dlib/2dglib.pkg"::

    "tools/os3dlib/minidhdms.pkg"::

    "tools/os3dlib/mkapplet.pkg"::

    "tools/os3dlib/netcomlib.pkg"::

    "tools/os3dlib/os3dpaths.pkg"::

    "tools/os3dlib/os3dstruct.pkg"::

    "tools/os3dlib/os3dtypeconv.pkg"::

    "tools/os3dlib/os3dplugins.pkg"::

    "tools/os3dlib/os3dpluginscb.pkg"::

    "tools/os3dlib/os3dloader.pkg"::

    "tools/mediaoctopus3dplayer/os3dversion.pkg"::

    "tools/mediaoctopus3dplayer/os3dlogs.pkg"::

    "tools/mediaoctopus3dplayer/mediaoctopus3dplayer.pkg"::

Last edited by hebdemnobad (20-Oct-2014 20:20:46)

Offline

#2 20-Oct-2014 18:06:58

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

Re: problem creating color for edwindowtoolbar [solved]

use make_rgb or make_rgba
make_rgb 255 0 0; for example

Offline

#3 20-Oct-2014 18:11:25

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

Re: problem creating color for edwindowtoolbar [solved]

arkeon wrote:

use make_rgb or make_rgba
make_rgb 255 0 0; for example

yes that works....on to creating some buttons smile ...... so when I am using the os3d api, i should use make_rgb to make a color, but using the scol 2d graphic api (say for painting containers or fonts) i use hex values.

Iri I see a section of the O'Reilly book on colors.

Last edited by hebdemnobad (20-Oct-2014 18:23:30)

Offline

#4 20-Oct-2014 18:46:47

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

Re: problem creating color for edwindowtoolbar [solved]

_colorNew is for Scol 2d GTK API, so to build GTK interface. My work is not finished about GTK.

Offline

#5 20-Oct-2014 19:17:20

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

Re: problem creating color for edwindowtoolbar [solved]

make_rbg convert the rgb component values into hex color value. this is just an easy way to set colors.
hex value works too

Offline

#6 20-Oct-2014 20:12:42

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

Re: problem creating color for edwindowtoolbar [solved]

arkeon wrote:

make_rbg convert the rgb component values into hex color value. this is just an easy way to set colors.
hex value works too

thx,
this table is a proper reference for hex colors, correct? http://www.nthelp.com/colorcodes.htm

Offline

#7 20-Oct-2014 20:33:20

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

Re: problem creating color for edwindowtoolbar [solved]

yes it should

Offline

Board footer

Powered by FluxBB