Skip to content

Commit

Permalink
Source
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapiainen committed Dec 6, 2014
1 parent 4b79eed commit 59ae276
Show file tree
Hide file tree
Showing 21 changed files with 394 additions and 0 deletions.
Binary file added Data/Interface/Translations/Extended UI_CZECH.txt
Binary file not shown.
Binary file added Data/Interface/Translations/Extended UI_ENGLISH.txt
Binary file not shown.
Binary file added Data/Interface/Translations/Extended UI_FRENCH.txt
Binary file not shown.
Binary file added Data/Interface/Translations/Extended UI_GERMAN.txt
Binary file not shown.
Binary file added Data/Interface/Translations/Extended UI_ITALIAN.txt
Binary file not shown.
Binary file added Data/Interface/Translations/Extended UI_JAPANESE.txt
Binary file not shown.
Binary file added Data/Interface/Translations/Extended UI_POLISH.txt
Binary file not shown.
Binary file added Data/Interface/Translations/Extended UI_RUSSIAN.txt
Binary file not shown.
Binary file added Data/Interface/Translations/Extended UI_SPANISH.txt
Binary file not shown.
Binary file added Data/Interface/console.swf
Binary file not shown.
Binary file added Data/Interface/statsmenu.swf
Binary file not shown.
Binary file added Data/Scripts/EXUI_ConsoleMenu.pex
Binary file not shown.
Binary file added Data/Scripts/EXUI_MCM.pex
Binary file not shown.
Binary file added Data/Scripts/EXUI_SleepWaitMenu.pex
Binary file not shown.
Binary file added Data/Scripts/EXUI_StatsMenu.pex
Binary file not shown.
100 changes: 100 additions & 0 deletions Data/Scripts/Source/EXUI_ConsoleMenu.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Scriptname EXUI_ConsoleMenu extends ReferenceAlias

Actor PlayerRef
EXUI_MCM Property MCM Auto

;Events
Event OnInit()
PlayerRef = Self.GetActorReference()
OnVersionUpdate(GetVersion())
RegisterEvents()
EndEvent

Event OnPlayerLoadGame()
UnregisterForAllMenus()
UnregisterForAllModEvents()
OnVersionUpdate(GetVersion())
RegisterEvents()
EndEvent

Function RegisterEvents()
RegisterForMenu("Console")
RegisterForModEvent("EXUI_GetCurrentCrosshairRef", "OnGetCrosshairRef")
RegisterForModEvent("EXUI_WriteToPapyrusLog", "OnWriteToLog")
RegisterForModEvent("EXUI_LoadMenu", "OnLoadMenu")
EndFunction

;Set cell name and FormID when opening the console
Event OnMenuOpen(string menuName)
;Fullscreen
If(MCM.bConsoleFullscreen)
UI.Invoke("Console", "_root.ConsoleMenu_mc.ConsoleInstance_mc.setFullscreen");
EndIf

;Current cell
Cell kCell = PlayerRef.GetParentCell()
If(kCell != None)
String sCellName = kCell.GetName()
Int iCellFormID = kCell.GetFormID()
Int iHandle = UICallback.Create("Console", "_root.ConsoleMenu_mc.ConsoleInstance_mc.setCurrentCell")
If(iHandle)
UICallback.PushString(iHandle, sCellName)
UICallback.PushInt(iHandle, iCellFormID)
UICallback.Send(iHandle)
EndIf
EndIf
EndEvent

;Get the name, ReferenceID, and FormID of the reference currently in the crosshair
Event OnGetCrosshairRef(string asEventName, string asStringArg, float afNumArg, form akSender)
;Current crosshair ref
ObjectReference kCurrentCrosshairRef = Game.GetCurrentCrosshairRef()
If(kCurrentCrosshairRef != None)
Form kCurrentCrosshairRefBase = kCurrentCrosshairRef.GetBaseObject()
String sCurrentCrosshairRefName = kCurrentCrosshairRefBase.GetName()
Int iCurrentCrosshairRefFormID = kCurrentCrosshairRefBase.GetFormID()
Int iCurrentCrosshairRefReferenceID = kCurrentCrosshairRef.GetFormID()
Int iHandle = UICallback.Create("Console", "_root.ConsoleMenu_mc.ConsoleInstance_mc.setCurrentCrosshairRef")
If(iHandle)
UICallback.PushString(iHandle, sCurrentCrosshairRefName)
UICallback.PushInt(iHandle, iCurrentCrosshairRefFormID)
UICallback.PushInt(iHandle, iCurrentCrosshairRefReferenceID)
UICallback.Send(iHandle)
EndIf
EndIf
EndEvent

;Write asStringArg to Papyrus log
Event OnWriteToLog(string asEventName, string asStringArg, float afNumArg, form akSender)
Debug.Trace(asStringArg)
EndEvent

;Open and close custom menus with asStringArg being the file to load
Event OnLoadMenu(string asEventName, string asStringArg, float afNumArg, form akSender)
If(UI.IsMenuOpen("CustomMenu"))
UI.CloseCustomMenu()
Else
If(asStringArg != "")
UI.OpenCustomMenu(asStringArg)
EndIf
EndIf
EndEvent

;Script versioning
Int iScriptVersion = 0

Int Function GetVersion()
Return 1
EndFunction

String Function GetTrace(Int aiVersion)
Return "===== Extended UI: Console Menu - Version " + aiVersion + " ====="
EndFunction

Function OnVersionUpdate(Int aiVersion)
If((aiVersion >= 1) && (iScriptVersion < 1))
Debug.Trace(GetTrace(aiVersion))
EndIf

iScriptVersion = aiVersion
EndFunction
82 changes: 82 additions & 0 deletions Data/Scripts/Source/EXUI_MCM.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
Scriptname EXUI_MCM extends SKI_ConfigBase

;Events
Event OnConfigInit()
ModName = "$EXUI_MODTITLE"
EndEvent

Event OnPageReset(string a_page)
SetCursorFillMode(TOP_TO_BOTTOM)
SetCursorPosition(0)
AddHeaderOption("$EXUI_SLEEPWAITTITLE")
AddToggleOptionST("toggleMaximumSleepWait", "$EXUI_SLEEPWAITMODMAXVAL", bSleepWaitMaximum)
AddSliderOptionST("sliderMaximumSleepWait", "$EXUI_SLEEPWAITMAXVAL", fSleepWaitMaximum, "$EXUI_HOURSFORMAT")
SetCursorPosition(1)
AddHeaderOption("$EXUI_CONSOLETITLE")
AddToggleOptionST("toggleConsoleFullscreen", "$EXUI_CONSOLEFULLSCREEN", bConsoleFullscreen)
EndEvent

State toggleConsoleFullscreen
Event OnSelectST()
bConsoleFullscreen = !bConsoleFullscreen
SetToggleOptionValueST(bConsoleFullscreen)
EndEvent

Event OnDefaultST()
bConsoleFullscreen = False
SetToggleOptionValueST(bConsoleFullscreen)
EndEvent
EndState

State toggleMaximumSleepWait
Event OnSelectST()
bSleepWaitMaximum = !bSleepWaitMaximum
SetToggleOptionValueST(bSleepWaitMaximum)
EndEvent

Event OnDefaultST()
bSleepWaitMaximum = True
SetToggleOptionValueST(bSleepWaitMaximum)
EndEvent
EndState

State sliderMaximumSleepWait
Event OnSliderOpenST()
SetSliderDialogStartValue(fSleepWaitMaximum)
SetSliderDialogDefaultValue(24.0)
SetSliderDialogRange(2.0, 999.0)
SetSliderDialogInterval(1.0)
EndEvent

Event OnSliderAcceptST(float a_value)
fSleepWaitMaximum = a_value
SetSliderOptionValueST(fSleepWaitMaximum, "$EXUI_HOURSFORMAT")
EndEvent

Event OnDefaultST()
fSleepWaitMaximum = 24.0
SetSliderOptionValueST(fSleepWaitMaximum, "$EXUI_HOURSFORMAT")
EndEvent
EndState

;Private variables

;Public variables
Bool Property bSleepWaitMaximum = True Auto Hidden
Float Property fSleepWaitMaximum = 24.0 Auto Hidden
Bool Property bConsoleFullscreen = False Auto Hidden

;Script versioning
Int Function GetVersion()
Return 1
EndFunction

String Function GetTrace(Int aiVersion)
Return "===== Extended UI: MCM - Version " + aiVersion + " ====="
EndFunction

Event OnVersionUpdate(int a_version)
If((a_version >= 1) && (CurrentVersion < 1))
Debug.Trace(GetTrace(a_version))
EndIf
EndEvent
43 changes: 43 additions & 0 deletions Data/Scripts/Source/EXUI_SleepWaitMenu.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Scriptname EXUI_SleepWaitMenu extends ReferenceAlias

EXUI_MCM Property MCM Auto

Event OnInit()
OnVersionUpdate(GetVersion())
RegisterEvents()
EndEvent

Event OnPlayerLoadGame()
UnregisterForAllMenus()
OnVersionUpdate(GetVersion())
RegisterEvents()
EndEvent

Function RegisterEvents()
RegisterForMenu("Sleep/Wait Menu")
EndFunction

Event OnMenuOpen(string menuName)
If(MCM.bSleepWaitMaximum)
UI.SetFloat("Sleep/Wait Menu", "_root.SleepWaitMenu_mc.HoursSlider.maximum", MCM.fSleepWaitMaximum)
EndIf
EndEvent

;Script versioning
Int iScriptVersion = 0

Int Function GetVersion()
Return 1
EndFunction

String Function GetTrace(Int aiVersion)
Return "===== Extended UI: Sleep/Wait Menu - Version " + aiVersion + " ====="
EndFunction

Function OnVersionUpdate(Int aiVersion)
If((aiVersion >= 1) && (iScriptVersion < 1))
Debug.Trace(GetTrace(aiVersion))
EndIf

iScriptVersion = aiVersion
EndFunction
57 changes: 57 additions & 0 deletions Data/Scripts/Source/EXUI_StatsMenu.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Scriptname EXUI_StatsMenu extends ReferenceAlias

MiscObject Property kSkillDummy Auto
Int iHighlightedSkill = -1

;Events
Event OnInit()
OnVersionUpdate(GetVersion())
RegisterEvents()
EndEvent

Event OnPlayerLoadGame()
UnregisterForAllModEvents()
UnregisterForAllMenus()
OnVersionUpdate(GetVersion())
RegisterEvents()
EndEvent

;Stats menu was opened, send back the skill that was the last to be highlighed when stats menu was last open
Event OnStatsMenuOpen(String asEventName, String asStringArg, Float afNumArg, Form akSender)
iHighlightedSkill = kSkillDummy.GetWeight() as Int
UI.InvokeNumber("StatsMenu", "_root.StatsMenuBaseInstance.initializeHighlighting", iHighlightedSkill as Float)
EndEvent

Event OnSkillHighlightChange(String asEventName, String asStringArg, Float afNumArg, Form akSender)
iHighlightedSkill = afNumArg as Int
EndEvent

Event OnMenuClose(string menuName)
kSkillDummy.SetWeight(iHighlightedSkill as Float)
EndEvent

;Functions
Function RegisterEvents()
RegisterForModEvent("EXUI_OnStatsMenuOpen", "OnStatsMenuOpen")
RegisterForModEvent("EXUI_OnSkillHighlightChange", "OnSkillHighlightChange")
RegisterForMenu("StatsMenu")
EndFunction

;Script versioning
Int iScriptVersion = 0

Int Function GetVersion()
Return 1
EndFunction

String Function GetTrace(Int aiVersion)
Return "===== Extended UI: Stats Menu - Version " + aiVersion + " ====="
EndFunction

Function OnVersionUpdate(Int aiVersion)
If((aiVersion >= 1) && (iScriptVersion < 1))
Debug.Trace(GetTrace(aiVersion))
EndIf

iScriptVersion = aiVersion
EndFunction
Binary file added Extended UI.esp
Binary file not shown.
112 changes: 112 additions & 0 deletions Readme - Extended UI.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
Extended UI
Version: 1.0.4a
Author: MrJack

Table of contents
- Description
- Requirements
- Compatibility
- How to install
- How to uninstall
- Known issues
- Credits
- How to contact the author
- Changelog


--Description--
Extended UI is a project that attempts to fix parts of the user interface. At the moment the intent is for Extended UI to be a complementary mod to SkyUI rather than to replace parts of SkyUI.

Menus that this mod currently affects:
-Skills menu-
- The name and progress of every skill can be seen when browsing skills. The selected skill is highlighted.
- Superfluous UI elements slide out of the way when switching to browsing perks.
- More perk names are visible at the same time.
- Support for longer skill and perk descriptions.

-Sleep/wait menu-
- Adjustable maximum sleeping/waiting value (2-720 hours).

-Console-
- The name and FormID is shown for the cell that the player is currently in.
- A few new commands:
"exui_help" - Display information about the other new commands.
"exui_fullscreen" - Makes the console fill the entire screen and show more information at once.
"exui_log: MESSAGE" - Prints MESSAGE in the Papyrus log.
"exui_sendmodevent: EVENTNAME, STRINGARG, NUMARG" - Send an SKSE mod event (EVENTNAME) with up to two parameters (STRINGARG, NUMARG).
"exui_getcrosshairref" - Returns the name, ReferenceID, and FormID of the reference that is currently in the crosshairs of the player.
"exui_loadmenu: FILENAME" - Opens up/closes the menu in FILENAME.swf in the "\Skyrim\Data\Interface" folder.


--Requirements--
Skyrim (>= 1.9.32.0.8)
SKSE (>= 1.7.1)

-Optional, but highly recommended-
SkyUI (>= 4.1) for configuring the mod.


--Compatibility--
Mods that edit the following files are, or may be, incompatible with Extended UI:
- statsmenu.swf
- console.swf
- sleepwaitmenu.swf


--How to install--
1. Extract all files to "\Skyrim\Data" or install with your favorite mod manager.
2. Activate Extended UI.esp.


--How to uninstall--
Uninstalling this mod in the middle of a playthrough is not officially supported. Once the files have been removed, then you should either start a new game
or revert to a save that has not seen this mod.

Remove the following files:
"\Skyrim\Data\Extended UI.esp"
"\Skyrim\Data\Extended UI.bsa"


--Known issues--
-Skills menu-
Browsing perks may sometimes lead to switching to browsing skills (can happen in vanilla skills menu as well), which can lead to the wrong skill being highlighted in the bottom part of the menu. Scrolling through the whole list of skills or restarting the game should fix this.


--Credits--
SkyUI team for making the resources, which this mod is built upon, available to the public. Special thanks to schlangster for his help and advice that made this mod possible.
SKSE team for all their hard work, which has made this mod possible.

Translations:
Polish - markosboss
Russian - kopasov

--How to contact the author--
PM MrJack on the official Bethesda forums or mrpwn on Nexus.


--Changelog--
1.0.4a:
- Fixed a bug where the skill title for Vampire Lord and Werewolf skills would show up as "undefined" due to relevant data not being received from the game.
- Fixed a bug where Vampire Lord and Werewolf skills would wrongly indicate that they were eligible for becoming Legendary.
1.0.4:
- Added a Russian translation of MCM.
- Added "exui_help" command to display information about other "exui_" commands.
- Raised maximum possible sleep/wait value to 999.
- Skill title added on top of the skill description.
- Fixed issue where making a skill Legendary didn't update the affected skill's marker without needing to reopen the skills menu.
- Added icon and counter for the Legendary status of a skill.
- Added indicator for when a skill can be made Legendary.
1.0.3:
- Moved the skill markers a bit to the left as it was a bit lopsided.
- Skill/perk descriptions now support HTML tags again.
- The numbers indicating skill levels now change color when a skill is modified by a (de)buff.
- Added a Polish translation of MCM.
1.0.2a:
- Updated translation files.
1.0.2:
- Changed the fonts in the skills menu and rearranged the skill markers in the bottom bar.
- Added toggle for fullscreen console in MCM to always open the console in fullscreen mode.
1.0.1:
- Standardized font in the upper bar in the Skills menu.
1.0.0:
- Initial release

0 comments on commit 59ae276

Please sign in to comment.