For a forum that prides itself on trying new things, for the love of all that is novel and interesting, please can we have a new QotM? - Krill

Create an account  

 
Context / Help

Jiihaa!

Is right clicking reserved for context / help system (in those places where it did that originally) ?

See my awesome progress! (Don't laugh it took me like 3 hours!) First step is to see if there is a button at the right-clicked coordinates. That will most of the time help with selecting what text to display on the help scroll. I guess next I need to learn how to locate the scroll graphics? And then make the xml descriptions.

Now off to bed.

[Image: Image4.jpg]
Reply

Let me give you a my 2 cents.

It works like this: The UILogic passes the mousevent to the screen
the screen checks, if there is an underlying button, and calls its click method.
the click method gets the info of which side of the mouse was pressed.

A simple solution: each button should get a helpcontext injected. then, you could check for left-buttonness in the screen, and propagate the event to the buttons helpcontext(if any), instead of the button. Then the helpcontext could throw up the IDialog.

The remaining task is to determine how it is easyest to select the appropriate help content.
YOu might need to add some buttons.
Reply

(December 5th, 2013, 17:45)Shendemiar Wrote: Is right clicking reserved for context / help system (in those places where it did that originally) ?
since we want to copy the original game (in the first step), i'd say yes.
dance!
Reply

Except for units on the map. And units on the mainscreen stack display. And possibly some more.
Reply

Where should the help text be stored? Some of is generic always the same, and some of it is per ruleset information. That would suggest that the help text is spread out between both defRules and defUIRules.

Then, where should it be loaded to? I think my skill is enough to make a separate library that the buttons can query whenever necessary, but if the help texts needs to be integrated into Object manager or something similar then I need to study more on how things work.
Reply

I think it should be in UIRules only.
Reply

do not just display help text. display things like
prerequesites: <list taken from ruleset.xml>
it should always display the correct values, even if they get changed.
dance!
Reply

(December 16th, 2013, 19:00)letsdance Wrote: do not just display help text. display things like
prerequesites: <list taken from ruleset.xml>
it should always display the correct values, even if they get changed.

In general UIButtons will have ButtonID and HelpText, as well as x&y pos and x&y size. These can be edited in the gamestatechanger just as anything else. Hard coded buttons will gradually be replaced by buttons dynamically created from the buttons list from uirules.buttons

Special effects per button will be worked in gradually such as race specific info, maybe this prerequisites idea, and such.

The rev 190 only added the framework to load save and edit the UIButtons. It's not much but I'm learning. You have to remember I have never used C#, visual studio, XML or svn before.
Reply

Additional info:

Code:
namespace reMOM.UI.UIRuleset
{
    public class UIButton
    {
        public string ID { get; set; }          // Spcifies the button purpose as well as acts as identifier between screens.button and UIButton aka
                                                // if Button.ID = UIButton.ID then show the help text on right click
        public string HelpIcon { get; set; }    // Icon for help caption
        public string HelpTitle { get; set; }   // Caption for help
        public string HelpText { get; set; }    // Help body text. May contain variables and effects such as color. Markup still open.
        public int PosX { get; set; }           // In case the screens.button is created from UIButton information, this is the location and size data
        public int PosY { get; set; }           // In case the screens.button is created from UIButton information, this is the location and size data
        public int SizeX { get; set; }          // In case the screens.button is created from UIButton information, this is the location and size data
        public int SizeY { get; set; }          // In case the screens.button is created from UIButton information, this is the location and size data
    }
}
Reply

I am missing CreateButtonForm, and its components.
Reply



Forum Jump: