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-May-2014 21:52:32

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

how to keep 2 viewports from appearing with parented windows in os3d

this image sums up the problem i've encountered with making a comptext window appear as part of an os3d scene. the comptext window appears in front of an additional viewport.  is there a way I should restructure the window/container hierarchy here.  here is the image:

2 viewports?

here is the code that creates the container and window hierarchy. even if I split my multiplayer plugit into two components, this problem will remain as I think I am not handling the viewport correctly:

//other code
let (V3DgetSessionView c3dXsession) -> viewstr in

let viewstr.V3D_win -> fatherwin in

// fatherwin the ObjWin used to create the 3d buffer
set parent_chat_window = _CRwindow _channel fatherwin 0 450 800 150 WN_NOBORDER|WN_CHILDINSIDE "A window";

set hacker_window_object_container= _CRcontainerFromObjWin _channel parent_chat_window 0 0 800 150 CO_CHILDINSIDE 0x000000 "hackerwindow";

set hacker_font = _CRfont _channel 12 0 0 "Lucida Console";

set ongoing_chat_textfield = _CRcompText _channel hacker_window_object_container  nil [0 0] OBJ_ENABLE|OBJ_VISIBLE|CT_LEFT|CT_LABEL|CT_WORDWRAP|CT_LABEL|CT_SELECT OBJ_CONTAINER_KEYDOWN 800 100  strcat "hacker window chat text field"  "\n" hacker_font [0x00FFFF 0 0 0xFFFF00] [0xFFFFFF 50] nil nil;
 
set chat_entry_textfield = _CRcompText _channel hacker_window_object_container  nil [0 101] OBJ_ENABLE|OBJ_VISIBLE|CT_LEFT|CT_WORDWRAP|CT_EDITLINE 0 800 50  "hacker entry field" hacker_font [0x00FFFF 0 0 0xFFFF00] [0xFFFFFF 50] nil nil;
 _PAINTcontainer hacker_window_object_container;  

//callback for when user hits the enter key after entering chat string
_CBcompTextValidation chat_entry_textfield @localuser_enter_text nil  CT_VALIDENTER;
_CBcontainerKeyDown hacker_window_object_container @containerkeydown nil;
	
//more code

Offline

#2 21-May-2014 00:26:46

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

Re: how to keep 2 viewports from appearing with parented windows in os3d

it looks more like a window resizing problem.
the window container must be resized but not the container itself. so the background you see could be just a memory content from the not initialized part of the container bitmap.

I'm not sure if I'm clear ^^

there is only one viewport in OS3D until you create an another one intentionally.

Offline

#3 21-May-2014 00:37:13

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

Re: how to keep 2 viewports from appearing with parented windows in os3d

Hmmm also the 3D buffer can don't like to have a child window inside it ^^
I'll try this code tomorow

Offline

#4 21-May-2014 00:55:10

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

Re: how to keep 2 viewports from appearing with parented windows in os3d

arkeon wrote:

Hmmm also the 3D buffer can don't like to have a child window inside it ^^

I'll try this code tomorow


Perhaps the buffer and chat window can be children of a root window/container?

Offline

#5 21-May-2014 09:49:30

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

Re: how to keep 2 viewports from appearing with parented windows in os3d

tried and could not reproduce your strange behavior hmm

Offline

#6 21-May-2014 12:06:22

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

Re: how to keep 2 viewports from appearing with parented windows in os3d

arkeon wrote:

tried and could not reproduce your strange behavior hmm

I guess it's my laptop gpu then. After I split my plugit into two components, I guess I can create a chat window as a separate window from the 3d buffer.

Offline

Board footer

Powered by FluxBB