About Store Forum Documentation Contact



Post Reply 
Interresting By Engine
Author Message
Esenthel Offline
Administrator

Post: #61
Re: Interresting By Engine
Hello,

No problem I'm working on adding AZERTY support right now

Gui:

1) What specific element do you need?

2) yes, you can:
-in the Gui Editor edit a Gui Style, and manipulate 'shadow' 0..255, and 'back color' first component (its alpha transparency), save the Gui Style to a file and the set it to your custom window
-or in the code create a GuiStyle object, edit it's parameters and assign it to a window (Window::style)

3) after loading the gui objects, find your GViewport object and set it's render (GViewport::render) variable to point to a custom rendering function, in that function you can just render objects, for example

Code:
void MainRender()
{
switch(Renderer())
{
.. render here
}
}
void ViewportRender(GViewport &viewport)
{
  Renderer(MainRender);
}

// after loading/creating GViewport object
gui_viewport.render=ViewportRender; // assign rendering function


As for the game it's most possible that it just has a lot fewer number of shaders (it was developed a year ago, with less graphics options), however I'll look at it, thanks for the info.
11-24-2008 01:50 PM
Find all posts by this user Quote this message in a reply
Hirogens Offline
Member

Post: #62
Re: Interresting By Engine
Hi,

For the keyboard, the numeric keyboards don't work..may be cause, QWERTY..

Gui:

1) What specific element do you need?

http://www.freeorion.org/index.php/Screenshots

I'd like it like this, approxymatly.


2) Thank, work perfectly

3) Thank, work perfectly

regards
11-24-2008 06:36 PM
Find all posts by this user Quote this message in a reply
Hirogens Offline
Member

Post: #63
Re: Interresting By Engine
Hi,

another question,

Now, I have 3 Viewports,1 For the Background, and 2 on GUI, but the "CamHandle" is apply on all Viewport.
I like, "CamHandle" on Background Viewport, and for my 2 GUIs Viewport just my animation (rotation) it's a planete...

Scuse me there questions, I come from the world of IRRLICHT.

regards
11-24-2008 07:14 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #64
Re: Interresting By Engine
Hi,

CamHandle operates on current camera ('Cam'),
so first of all you would have to have few cameras (Camera camera_a,camera_bwink and :
-update them manually ( for example camera_a.yaw += Tm.d; )
-or activate the desired camera (camera_a.set(); which will copy itself to 'Cam') and then call CamHandle (which will operate on 'Cam'), store results to 'camera_a' (camera_a=Cam)

Let me know if you need more info and I'll make a tutorial about multiple cameras.

I think I've finished working on the AZERTY keyboard support, I'll be updating engine soon.

As for the Gui modifications:
please check Gui header file, these are elements which you could play with

Code:
struct GUI // Graphical User Interface
{
   U32     kb_lit     ; // keyboard focus highlight color
   TextDS tds_button  , // gui button       text draw settings
          tds_cmenu   , // gui context menu text draw settings
          tds_desc    , // gui description  text draw settings
          tds_list    , // gui list         text draw settings
          tds_textline, // gui text line    text draw settings
          tds_text    ; // gui text         text draw settings

   Gfx gfx_button  [3], // button   image
       gfx_checkbox[2], // checkbox image
       gfx_slider     , // slider   image
       gfx_progress   , // progress image
       gfx_window     , // window   image
       gfx_shadow     , // shadow   image
       gfx_minimize   , // minimize button image
       gfx_maximize   , // maximize button image
       gfx_close      ; // close    button image

   GuiStyle style_window, // default Window GuiStyle
            style_region; // default Region GuiStyle

also check Buttons

Code:
struct Button : GuiObj // Gui Button
{
   Char   text[32]    ; // button text
   Byte   mode        , // BUTTON_MODE                , default=BUTTON_DEFAULT
          draw_mode   , // BUTTON_DRAW_MODE           , default=BDM_BUTTON
          shadow      , // shadow intensity 0..255    , default=0
   U32    color       ; // color                      , default=0xFFFFFFFF
   Flt    text_align  , // text aligning              , default=0.0
          shadow_width; // shadow width               , default=0.06
   Gfx   *gfx         ; // image                      , default=&Gui.gfx_button[0]
11-24-2008 08:33 PM
Find all posts by this user Quote this message in a reply
Hirogens Offline
Member

Post: #65
Re: Interresting By Engine
Hi,

yes, if you have an example for the cameras with differents viewports and differents scenes



regards
11-25-2008 06:04 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #66
Re: Interresting By Engine
Hi,
I've uploaded new engine version including:
-AZERTY support
-tutorial with multiple viewports and cameras.
11-25-2008 05:12 PM
Find all posts by this user Quote this message in a reply
Hirogens Offline
Member

Post: #67
Re: Interresting By Engine
Esenthel Wrote:Hi,
I've uploaded new engine version including:
-AZERTY support
-tutorial with multiple viewports and cameras.

good work I'm impressive...

I'm test now.

regards
11-25-2008 05:24 PM
Find all posts by this user Quote this message in a reply
Hirogens Offline
Member

Post: #68
Re: Interresting By Engine
Hi,

I have another problem

I draw a sphere. (it's ok, lol)

but I want draw a texture on it.

and with my test the texture don't draw normaly...

the texture for example : http://www.wormhole-the-game.com/jupiter.jpg

regards.
11-25-2008 05:55 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #69
Re: Interresting By Engine
Hi,
How are you applying the texture?
Most commonly textures should be applied on models in Mesh Editor tool, they're processed there automatically.
You can check the Mesh Editor documentation for that.
Let me know if you'll need more assistance with this.
11-25-2008 06:03 PM
Find all posts by this user Quote this message in a reply
Hirogens Offline
Member

Post: #70
Re: Interresting By Engine
Hi,

I have this result

<!-- m --><a class="postlink" href="http://www.wormhole-the-game.com/Result.jpg">http://www.wormhole-the-game.com/Result.jpg</a><!-- m -->

It's not a good planete,lol..

regards
11-25-2008 06:23 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #71
Re: Interresting By Engine
It seems that you're using cube uv mapping, you should either:
-import a model with correct mapping from an external graphics program
-or in code use Mshb::create2(Ball &,.. instead of Mshb::create(Ball &,..) (create2 creates a ball in a different way with different mapping)
11-25-2008 06:36 PM
Find all posts by this user Quote this message in a reply
Hirogens Offline
Member

Post: #72
Re: Interresting By Engine
Hi

scuse me,

I cant undestand how to use Create2 and apply a material (texture)

regards
11-25-2008 08:50 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #73
Re: Interresting By Engine
Hi,

instead of "mesh.create(1).B(0).create(Ball(1),VTX_TX0|VTX_NRM|VTX_TNG);"
you can do "mesh.create(1).B(0).create2(Ball(1),VTX_TX0|VTX_NRM|VTX_TNG);"
11-25-2008 09:53 PM
Find all posts by this user Quote this message in a reply
Hirogens Offline
Member

Post: #74
Re: Interresting By Engine
Esenthel Wrote:Hi,

instead of "mesh.create(1).B(0).create(Ball(1),VTX_TX0|VTX_NRM|VTX_TNG);"
you can do "mesh.create(1).B(0).create2(Ball(1),VTX_TX0|VTX_NRM|VTX_TNG);"


Hi,

I'm a low, sorry, and tired...

regards
11-26-2008 12:56 AM
Find all posts by this user Quote this message in a reply
Hirogens Offline
Member

Post: #75
Re: Interresting By Engine
...
11-26-2008 07:46 AM
Find all posts by this user Quote this message in a reply
Post Reply