Author Topic: PCS 2 UI Discussion  (Read 36236 times)

0 Members and 1 Guest are viewing this topic.

Offline Getter Robo G

  • 211
  • Elite Super Robot Pilot
I have a funny feeling I'm not going to be able to leave this project without first implementing auto-path.

Oh the guns? Don't be alarmed, they're for you're protection... Yeah that's it!

 :nod:
"Don't think of it as being out-numbered, think of it as having a WIDE target selection!"

"I am the one and ONLY Star Dragon..."
Proof for the noobs:  Member Search

[I'm Just an idea guy, NOT: a modeler, texturer, or coder... Word of advice, "Watch out for the ducks!"]

Robotech II - Continuing...
FS2 Trek - Snails move faster than me...
Star Blazers: Journey to Iscandar...
FS GUNDAM - The Myth lives on... :)

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
and the ninja lawyer zombies wielding them? my protection also?
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
ok, for documentation purposes I'm going to describe the high level interface code.
this code is all that is needed for a minimal chunk level editor, it has no repetition of code anywhere in the work flow. other than the repetition of adding the specific controls and getting setting data from them, the primitive editors do a lot of work for you.

this is a minimal editor panel

Code: [Select]
#pragma once

#include"model_editor_ctrl.h"
#include"array_ctrl.h"
#include"primitive_ctrl.h"
#include"pcs_file.h"

class ACEN_ctrl
:public editor_ctrl<vector3d>
{
vector_ctrl*auto_center;

public:
ACEN_ctrl(wxWindow*parent)
:editor_ctrl<vector3d>(parent, "Auto-Center")
{
//add controls
add_control(auto_center=new vector_ctrl(this,0,0,60,40,"Point"),0,wxEXPAND );
}

//do nothing, needed so the base destructor will get called
virtual~ACEN_ctrl(){}

//set's the control's value
void set_value(const vector3d&t){
data=t;
auto_center->set_value(t);
}

//return's the control's value
vector3d get_value(){
return auto_center->get_value();
}

//populates the control with data from the model
void set_data(PCS_Model &model){
set_value(model.GetAutoCenter());
}

//applies the data in the control to the model
void apply_data(PCS_Model &model){
model.SetAutoCenter(get_value());
}
};

for each control there are six (minimum, you can overide preset behaviours to get diferent sizer behaviour) steps
1) make a derived class from editor_ctrl<chunk_type> with a pointer to a class derived from editor<member_type> for each member

2) in the constructor instantiate the controls with 'new' providing there minimum size, and the member title, be sure to use the add_control function on the resultant control so the control adds it to the proper sizers (the sown additional parameters ensure the normal resizeing behaviour). if you want to make a sub sizer use the function add_sizer on the top level sizer of a group of controls, this is usualy only needed if you want two controls on the same row.

3)override the set_value function, mostly this involves finding the member of the passed structure and calling the related control's set value function

4)override the get_value function, you need to build a structure from the data in the control and return it, this mostly consists of calling the get_value function of the editors in the control

5)override the set_data function, sets the editor's data, this is usually little more than getting the structure representing the chunk from the model or making one, then calling set_value with it.

6)override the apply_data function, applys the value in the editor to the model, usualy little more than calling the appropriate SetData function in the model with get_value() as the parameter.

setting the editor will be little more than
Code: [Select]
control_panel = new model_editor_ctrl<vector3d, ACEN_ctrl>(control_pane, model)model_editor_ctrl is a template that has the scroll window functionality and a common interface for setting and getting data.
note ACEN isn't the perfict example cause it is just one simple data type.

with this I should be able to build the whole inter face in a day or two, but it might be untill this weekend untill I get the time to actually do this. though I'll try to get at least two done tonight.

then I'll be able to get the tree working.

now unfortunately this requiers more direct access to the data elements of the model, but I implemented simple accessors for it so if there are any tricks it can be handeled there.
« Last Edit: March 27, 2007, 01:32:46 am by Bobboau »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
interesting approach, i can't wait to see it all once you've commited it to the repo
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I got textures done in 15 minutes, then I worked on weapon points, one minor draw back to this method is that you can't realy stager controls that much, in most situations this isn't that apparent, but with arrays it can make it a little off balanced looking, but the UI is setup to minimize horizontal useage, so I don't realy see a better way to do it without sacrificing that. here is a shot of the gun/missle point editor (btw it would have been a lot easer to do this control if we had two seperate arrays for gun and missle points, I realy hope the order they are in isn't important to any other code, don't bother changing this now. oh and I fixed a special case bug in the kaz_vector this=&src)

[attachment deleted by admin]
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
with that setup the proportions of the OpenGL surface are all outa whack, but the editor panel looks good

what is with the drop list?
i thought you were bringing back the tree?
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I will be, each section of that control is a seperate control, I can make a control for just one point, just one bank, one type or both types, but I'm going to try and get basic functionality (make all the main controls, then get them linked to a simplified version of the tree) before I go into minutia.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
the code for the full tree is still there - you just need to instantiate it (mostly just comment it) and allocate it some screen space
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 
Does your GUI toolkit support mouse wheels, I don't see why they shouldn't.  It would be nice to zoom in and out with the mouse wheel.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
im not sure but i think sdl has support for the mousewheel. if it does they could implement it without too much hassel.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
mouse wheel scrolling is an operating system service - therefore wxWidgets on windows should automatically have it

(wxWidget's implements it's libraries in a platforms native API, and presents the programmer with a 99.9% cross-platform unified UI)
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
updates?
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Turambar

  • Determined to inflict his entire social circle on us
  • 210
  • You can't spell Manslaughter without laughter
man i cant wait for this to come out.  it's going to make my life so much easier!

I very much appreciate what you guys are doing.
10:55:48   TurambarBlade: i've been selecting my generals based on how much i like their hats
10:55:55   HerraTohtori: me too!
10:56:01   HerraTohtori: :D

 

Offline takashi

  • Better than TrashMan
  • 29
seems its not working on XP pro service pack 2 (for me, anyway). any help? PCS 1 worked fine.

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
it's a problem with some peoples computers that i can't track down
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
I know it might make the UI a bit more complex and the feature itself could also be a though one, but would you make the object list... dynamic?

Let me expain what I mean. Now that alpha textures become more and more important for us, rendering order also got more important.
It would be really nice (killer feature) if you could change the rendering order in PCS, rather than having to export it again and again, till you got it right.

So the objects would have to be swap-able icons in PCS.

Practically a question to both of you. ;)
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
ideally id like the renderer to be a spot on match with the freespace engine so that transparancy debugging of models would be possible, without loading the game. a texture stack would be nice where you can move them up or down and see in real time the effects on transparency.

also better heirarchy debugging and editing would be nice. like say you screwed up something in conversion and your turret barrel was at the same level of hierarchy as the base when it should have been under it. would be nice if this kinda thing was fixable in program. also it would help if the program/format youre modeling in has suckey heirarchy support.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
spot on match would mean replication, and you can forget about that
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Raven2001

  • Machina Terra Reborn
  • 211
  • Im not the droid your looking for, move along
dunno if Im still on time for this, but a nice interface feature would be, that we had a way to "scroll" up and down the values, instead of typing them. And of course seeing the changes in realtime. See 3dsmax way of handling values, and youll see what I mean
Yeah, I know you were waiting for a very nice sig, in which I was quoting some very famous scientist or philosopher... guess what?!? I wont indulge you...

Why, you ask? What, do I look like a Shivan to you?!?


Raven is a god.

 

Offline takashi

  • Better than TrashMan
  • 29
maybe easier squad logo allocation as a panel? people are just texturing on their favorite squad and being done with it. maybe just a "select area" in the model viewer for setting it?