PDA

View Full Version : Dialog Positioning



Pleng
04-28-2009, 12:18 PM
Can I set the special entity ChoiceDialog to appear at the top left of the screen rather than in the centre?

cheers!

Seth
04-30-2009, 04:09 AM
Hi, no there is currently no custom positioning/sizing in EntChoiceDialog, it's pretty basic.

Pleng
05-01-2009, 05:01 PM
OK. Thanks for the feedback.

Are there any plans to change that at some point in the future?

Seth
05-02-2009, 10:22 AM
Well, just adding positional controls would be easy enough, but I'm thinking about a totally better system that doesn't rely on ClanGUI() (to help with porting the player-part of the engine, say, to iPhone) and is implemented as a Brain (the recent brain changes allow brains to draw and do visuals too) - but it's the kind of thing I won't do until I actually need it...

The item system in the RPG is simple text for now, but I wrote it so later it could be plugged into a complex icon (possibly drag and drop) based item interface, like normal RPG's use in shop's and stuff.

But I'm sort of into iPhone land right now and not sure when I'm coming back.. :)

Pleng
05-02-2009, 10:52 AM
Well, just adding positional controls would be easy enough, but I'm thinking about a totally better system that doesn't rely on ClanGUI() (to help with porting the player-part of the engine, say, to iPhone) and is implemented as a Brain (the recent brain changes allow brains to draw and do visuals too) - but it's the kind of thing I won't do until I actually need it...


I see. The problem I'm having is that I'm limiting my play area to 800 x 480, which doesn't leave much room for the dialog, and dialog is currently spilling off the side of the screen, yet there's load of available space above and to the left of the dialog :)



But I'm sort of into iPhone land right now and not sure when I'm coming back.. :)

ew. iPhone. Well enjoy your stay in iPhone land. We will be waiting for you when you get back!

Pleng
05-12-2009, 11:16 AM
Well, just adding positional controls would be easy enough, but I'm thinking about a totally better system that doesn't rely on ClanGUI() (to help with porting the player-part of the engine, say, to iPhone) and is implemented as a Brain (the recent brain changes allow brains to draw and do visuals too) - but it's the kind of thing I won't do until I actually need it...


What file should I be looking at in the SVN if I were to have a crack at altering it myself?

Seth
05-12-2009, 11:41 PM
The file is clanlibstuff/novashell/source/EntChoiceDialog.cpp.

Right now it's setup to figure out how much text there is and center it.

You could modify void EntChoiceDialog::CalculateCenteredWindowPosition() to set it to where you need.

If you want to control it by script to set variables that would control it, you would add new stuff to EntChoiceDialog::ProcessInitString or EntChoiceDialog::HandleMessageString.

Pleng
05-13-2009, 02:55 PM
OK thanks Seth. I will have a look at it once I have a POC up and running for my game. Never coded in C++ before, just a little VB and Javascript, but I guess I should be able to sus it out.