sglorz's Recent Forum Activity

  • Did you update InputSystem plugin?

  • No it's not stable yet

    I still have to add some widgets controlling and other things, like example.

    And yes It is Ok for commercial use as it is LGPL.

  • For mouse and cursor it's the same as Construct but with directX instead of Win32, and with more actions, conditions and expressions than Construct.

  • I see how to create the condition but you make it sound like it needs 2, so a sub event is needed also?

    No, only one condition. Why a sub event ?

    Also where do you find the widget names needed because after looking at the layout it seems they would be "Button", "CheckBox" or "RadioButton" etc but these don't work.

    It sounds really simple but for some reason nothing will work, could you make a simple cap example if possible?

    All widgets name are defined in the ".layout" file or when creating it in cap file.

  • Ok, I see exactly what you mean, the progress bar is redrawn every call to step as the tiled background waits to leave the loop for being redrawn.

    I have to look into this as like all Construct plugins, drawing is called after finishing events, so CGUI is updating only at this time.

  • What do you mean by frame rate independant?

  • How do you correctly link a button to a regular event?

    Button activation is done by widget mouse click. So, you set the event "On mouse button click" with the name of your widget then you add the condition "On Widget "name" mouse button click" to get the event.

  • Thank you all for giving support.

    About the documentation, I don't plan to create one as I won't have time to do it. But, if someone wants to build it, it would be great

    But I will translate all the MyGUI examples into CAP files.

  • Let me explain the example:

    First I set the plugin variables:

    Resources paths: Media/Demos/Demo_Themes;Media/Common/Demos;Media/Common/Themes

    The main resource file (with the main theme ): MyGUI_Core.xml

    Then the layouts (windows): Wallpaper.layout for the background, HelpPanel.layout for the top left window and Themes.layout for the main window.

    All this files are loaded at EditTime and at Runtime to render the layout.

    I create a private variable MainLayout which contains the layout of the main window (Themes.layout).

    Start of layout

    Step 7: I set the textbox called "Text" (described in HelpPanel.layout) with a caption. Then I create my demo window (call "CreateDemo").

    CreateDemo function with theme number to load as parameter:

    Step 8: First I unload the main window by calling "DestroyDemo".

    Step 9 to 11: depending on the value of function parameter, the main theme is changed by a load resource file.

    Step 12: I fill the entries of the combo box called "ComboBox" and set the index the same as the input parameter. I also set the ComboBox to be a drop box only with no edit field. Then I tell the ComboBox to react to "On accept" event with a "Set event". Some events have parameters. "On accept" has 2 parameters: sender (widget's name who sent the event) and index (the new selected index in the combo box). These parametes are retrieved using "GetEventParameter(paramNumber).

    DestroyDemo function

    Step 13: unload Themes.layout

    On ComboBox accept

    Step 14: I call CreateDemo with event parameter 1 which is the new selected index retrieved by "GetEventParameter(1)".

    I hope that will help to understand the demo a bit more

    By the way, GetEventParameter is zero-base indexed, shouldn't it be one-base indexed?

  • The mouse cursor is hidden by the CAP file, so there is no cursor displayed in the window, border included and if the window does not have the focus, no mouse message is sent.

  • YES !! I've found the reason. Colors and alpha are multiplied by Construct before rendering, for filter handling I think.

    I've added some hack for each vertices:

    				for(int c=0 ; c<4 ; c++)
    				{
    					vertexcolors[c].r /= vertexcolors[c].a;
    					vertexcolors[c].g /= vertexcolors[c].a;
    					vertexcolors[c].b /= vertexcolors[c].a;
    				}[/code:3p8lf3y9]
    
    Ugly but I don't know how to bypass this. A new demo should arrive soon.
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I've nearly finished to remove all the drawing bugs, but I'm stuck with some transparency problem and I need some construct/DirectX guru to help me

    Here is the problem. In Edit mode, the GUI is displayed using DirectX directly and all is fine. In runtime mode I can't do the same because of the filters, scrolling things, etc... So I use the runtime renderer functions (essentially Quad_xywh) and I have a transparency problem.

    Here is the original from MyGUI build:

    Here is the result in Construct:

    As you can see on the slider, transparency is not correct, there is a black shadow. In this 3rd image, you can see what happens when switching form one tab to another:

    I need to find a way to remove this black shadow. If anyone can help me, I'll be greatful.

    By the way, here are my DirectX states:

    		mpD3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
    		
    		mpD3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
    		mpD3DDevice->SetTextureStageState(0, D3DTSS_COLORARG0, D3DTA_DIFFUSE);
    		mpD3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    
    		mpD3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
    		mpD3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG0, D3DTA_DIFFUSE);
    		mpD3DDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    
    		mpD3DDevice->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
    		mpD3DDevice->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
    		mpD3DDevice->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_NONE );
    
    		mpD3DDevice->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
    		mpD3DDevice->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
    
    		mpD3DDevice->SetRenderState(D3DRS_SRCBLEND,   D3DBLEND_SRCALPHA);
    		mpD3DDevice->SetRenderState(D3DRS_DESTBLEND,  D3DBLEND_INVSRCALPHA);
    		
    		mpD3DDevice->SetRenderState(D3DRS_ZWRITEENABLE, FALSE);
    		mpD3DDevice->SetRenderState(D3DRS_ZENABLE, FALSE);
    		mpD3DDevice->SetRenderState(D3DRS_LIGHTING, 0);
    		mpD3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
    		
    		mpD3DDevice->SetFVF(D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1);[/code:1ilcusc7]
sglorz's avatar

sglorz

Member since 27 Apr, 2010

None one is following sglorz yet!

Trophy Case

  • 14-Year Club

Progress

14/44
How to earn trophies