Jump to content

MCM: Is there a plain text option


darkling3100

Recommended Posts

I've been looking through the MCM API and base PSC file but can't find a simple text option. Something without an input. I found:

bool function ShowMessage(string a_message, bool a_withCancel = true, string a_acceptLabel = "$Accept", string a_cancelLabel = "$Cancel")
	{Shows a message dialog and waits until the user has closed it}
	Guard()
endFunction

but that is definitely now what I'm looking for. Any help or work-around would be greatly appreiciated.

Link to comment
Share on other sites

What do mean, as in text input or just text display on a mcm page? if it's just a text display on a mcm page:

AddTextOption(string text, string value, int flags = 0)

or

AddTextOptionST(string stateName, string text, string value, int flags = 0)

You don't need to register/catch if the user clicks the text, you don't have to have a value param or you can just use the value param and not the text param, or use both params.

It's fairly flexible.

If your wanting to write a page of text then you use lots of Text option controls.

 

If it's a case of user text input then you would use another third party library UILib or UI Extensions.

UILib be the better for text input in my opinion.

Edited by sLoPpYdOtBiGhOlE
Link to comment
Share on other sites

It's fairly flexible.

If your wanting to write a page of text then you use lots of Text option controls.

 

If it's a case of user text input then you would use another third party library UILib or UI Extensions.

You don't need to register/catch if the user clicks the text, you don't have to have a value param or you can just use the value param and not the text param, or use both params.

 

Thank you. For some reason I didn't think about having to process the event and can just use a blank string value. But MCM has a input option now.

; Add
int function AddInputOption(string text, string initialValue)

Along with the State version that brings up a pop up for user input. Although I've never used UILib or UI Extensions. May have to look into them to see if I can get a inline user input instead of a pop up.

 

ShowMessage is the one you want. It should work just fine for you.

 

Just do ShowMessage("Hey this is a message")

 

And Mattiewagg I don't mean to be so rude but why would ShowMessage work when I directly said that's not what I want? I needed a plain inline text option to describe something. Not a pop up window. Just confused why you would suggest this when I directly stated that is, "definitely now what I'm looking for."

Link to comment
Share on other sites

Thanks for the heads up on input in SkyUI
That'll teach me to actually read the SDK ski_configbase..
Awesome, look forward to using the input control if I ever update MHIYH.

They list that as since V4, but that is not true..
If you look at the 4.1 SDK ski_configbase has no such function listed at all.

It was actually added in version 5 and version 5.1 SDK has the function listed in ski_configbase with a comment that says since v4.

If it had been in version 4 I would have been using it back then.

Edited by sLoPpYdOtBiGhOlE
Link to comment
Share on other sites

Yeah this is actually why I thought my mod would work. I was first discouraged by all the old info but when I looked at the actual git it stated about the new input option. Don't see why they went with the pop up only option, would be easy enough to use inline or both, but hell I don't need another library for actual user input.

Link to comment
Share on other sites

The difference with UILib is you can call an input text box in game via any key or what ever method without opening the tween menu or MCM control panel.

It also offer a list menu, same thing, can be called to display a list directly in game.

 

MCM menu is great, but it needs to expose a very simple user method so a user can directly access the page in the mod menu without going through the navigation of the tween menu.

So for example I give the user a key they can configure, then they hit the key and it brings up my MCM menu at my page.

 

Also it should be able to Update Mod Name dynamically, which it can't as is.

 

Also needs a way of refreshing the list of Pages in your Mod Menu (The list of pages on the left of the your mod menu).

The way it currently if you want to remove or add or rename a page dynamically while in your mod menu then the only way is close the menu and reopen it.

These are just simple things that would MCM more dynamic to use.

 

I'd imagine you could probably do something using SKSE functions, but I haven't really wrapped my mind around SKSE UI functions and the menu structure of the swf file format and it's action script functions completely.

 

Maybe if I devote a bit more time learning curve I can probably work around my personal grievances with MCM short comings in those areas I mention.

Edited by sLoPpYdOtBiGhOlE
Link to comment
Share on other sites

 

 

It's fairly flexible.

If your wanting to write a page of text then you use lots of Text option controls.

 

If it's a case of user text input then you would use another third party library UILib or UI Extensions.You don't need to register/catch if the user clicks the text, you don't have to have a value param or you can just use the value param and not the text param, or use both params.

Thank you. For some reason I didn't think about having to process the event and can just use a blank string value. But MCM has a input option now.

; Add
int function AddInputOption(string text, string initialValue)
Along with the State version that brings up a pop up for user input. Although I've never used UILib or UI Extensions. May have to look into them to see if I can get a inline user input instead of a pop up.

ShowMessage is the one you want. It should work just fine for you.

 

Just do ShowMessage("Hey this is a message")

And Mattiewagg I don't mean to be so rude but why would ShowMessage work when I directly said that's not what I want? I needed a plain inline text option to describe something. Not a pop up window. Just confused why you would suggest this when I directly stated that is, "definitely now what I'm looking for."

Because you said that is "definitely now what I'm looking for". You said now, not not. I was confused and said if that's what you're looking for here's how to use it.

Link to comment
Share on other sites

Hmm well it would seem there is a

function ForcePageReset()
	{Forces a full reset of the current page}

And you could use a MessageBox to warn the user of an update although this isn't very dynamic. {Yeah never mind this isn't what you're looking for. Yeah it would seem it would all have to be done through the SKSE UI system and seems you already knew that, sorry.}

 

And I guess I don't understand why you would need to update your mod's name. I would think that would break quite a few SKSE functions loading and searching for your mod. Although I don't know if you've tried changing the ModName property in script I would think you would have to unload the entire menu to update it, but I could be very wrong.

 

 

Because you said that is "definitely now what I'm looking for". You said now, not not. I was confused and said if that's what you're looking for here's how to use it.

 

 

I'm very sorry Mattiewagg. I didn't even see that until you pointed it out. :tongue:

Edited by darkling3100
Link to comment
Share on other sites

Now a new problem. Per forum ettiquette I should probably start a new topic but I thought it wouldn't be too much of a problem and both of you seem fairly adept with MCM menu creation as long as you don't mind helping a bit more.

 

I am now having a problem with a MenuOption. My code compiles fine and has no problem loading in game. But when I click my MenuOption none of my MenuOptions are shown. It's just a blank field.

 

My code(reduced to the relevant bits):

String[] ConW_AVNames;
Int currentPlayerAVSelectionIndex;

event OnConfigInit()
    Pages = new string[2];
    Pages[0] = "Player";
    Pages[1] = "Items";
	
	currentPlayerAVSelectionIndex= 0;
	
	ConW_AVNames= new String[55];
	SetAVNames();		
endEvent

event OnPageReset(string page)
    SetCursorFillMode(TOP_TO_BOTTOM);
	
	If(page == "Player")
		AddHeaderOption("");
		AddMenuOptionST("ConW_AVSelector", "Change ", ConW_AVNames[currentPlayerAVSelectionIndex]);					Selects actor value to change
	ElseIf(page == "Items")
		;
	EndIf
EndEvent

State ConW_AVSelector
	Event OnMenuOpenST()
		SetMenuDialogOptions(ConW_AVNames);
		SetMenuDialogStartIndex(0);
		SetMenuDialogDefaultIndex(0);
	EndEvent

	Event OnMenuAcceptST(int a_index)
		currentPlayerAVSelectionIndex= a_index;
		currentPlayerAVSelectionValue= ActorRef.GetActorValue(ConW_AVNames[currentPlayerAVSelectionIndex]);
		currentPlayerAVSelectionBaseValue= ActorRef.GetBaseActorValue(ConW_AVNames[currentPlayerAVSelectionIndex]);
		SetMenuOptionValueST(ConW_AVNames[currentPlayerAVSelectionIndex]);
	EndEvent
	
	event OnDefaultST()
        currentPlayerAVSelectionIndex= 0
        SetMenuOptionValueST(ConW_AVNames[currentPlayerAVSelectionIndex])
    endEvent
EndState

Function SetAVNames ()
	ConW_AVNames[0]= "";
	ConW_AVNames[1]= "Health";
	ConW_AVNames[2]= "Magicka";
	ConW_AVNames[3]= "Stamina";
	ConW_AVNames[4]= "OneHanded";
	ConW_AVNames[5]= "TwoHanded";
	ConW_AVNames[6]= "Marksman";
	ConW_AVNames[7]= "Block";
	ConW_AVNames[8]= "Smithing";
	ConW_AVNames[9]= "HeavyArmor";
	ConW_AVNames[10]="LightArmor";
	ConW_AVNames[11]="Pickpocket";
	ConW_AVNames[12]="Lockpicking";
	ConW_AVNames[13]="Sneak";
	ConW_AVNames[14]="Alchemy";
	ConW_AVNames[15]="Speechcraft";
	ConW_AVNames[16]="Alteration";
	ConW_AVNames[17]="Conjuration";
	ConW_AVNames[18]="Destruction";
	ConW_AVNames[19]="Illusion";
	ConW_AVNames[20]="Restoration";
	ConW_AVNames[21]="Enchanting";
	ConW_AVNames[22]="HealRate";
	ConW_AVNames[23]="MagickaRate";
	ConW_AVNames[24]="StaminaRate";
	ConW_AVNames[25]="SpeedMult";
	ConW_AVNames[26]="WeaponSpeedMult";
	ConW_AVNames[27]="BowSpeedBonus";
	ConW_AVNames[28]="ShoutRecoveryMult";
	ConW_AVNames[29]="MovementNoiseMult";
	ConW_AVNames[30]="HealRateMult ";
	ConW_AVNames[31]="CombatHealthRegenMult";
	ConW_AVNames[32]="MagickaRateMult ";
	ConW_AVNames[33]="StaminaRateMult ";
	ConW_AVNames[34]="AttackDamageMult";
	ConW_AVNames[35]="MeleeDamage";
	ConW_AVNames[36]="UnarmedDamage";
	ConW_AVNames[37]="CritChance";
	ConW_AVNames[38]="CarryWeight";
	ConW_AVNames[39]="DamageResist";
	ConW_AVNames[40]="DiseaseResist";
	ConW_AVNames[41]="PoisonResist";
	ConW_AVNames[42]="FireResist";
	ConW_AVNames[43]="ElectricResist";
	ConW_AVNames[44]="FrostResist";
	ConW_AVNames[45]="MagicResist";
	ConW_AVNames[46]="Paralysis";
	ConW_AVNames[47]="Invisibility";
	ConW_AVNames[48]="WaterBreathing";
	ConW_AVNames[49]="WaterWalking";
	ConW_AVNames[50]="RightItemCharge";
	ConW_AVNames[51]="LeftItemCharge ";
	ConW_AVNames[52]="BypassVendorStolenCheckStatus";
	ConW_AVNames[53]="BypassVendorKeywordCheck";
	ConW_AVNames[54]="DragonSouls";
EndFunction

I really don't know what it could be. I'm really sorry for asking so much but there is little guidance in the lack of documentation between Papyrus, SKSE and SkyUI/MCM.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...