標準UI更新メモ(パッチ 2018.03.29)

ただの覚え書き。
UserInterface/Default.zip更新内容。

主にグローバルチャットに関する更新。

他、ウルティマストアを開くアクション追加、メインメニューに「Ultima Store」項目が追加された。※ 正常に動作していない様に見える(メニュー選択すると接続が切断される)のは筆者のシャードにPub.99が導入されていないのが原因の様。

Default.zipルートディレクトリ

Interface.lua

更新。

*** Interface.lua	Thu Aug 31 15:22:32 2017
--- Interface.lua	Wed Mar 28 01:01:38 2018
***************
*** 822,824 ****
  		HotbarSystem.SetActionOnHotbar(SystemData.UserAction.TYPE_SPEECH_USER_COMMAND, 5015, 860015, Interface.MenuBar, 10)
! 		HotbarSystem.SetActionOnHotbar(SystemData.UserAction.TYPE_SPEECH_USER_COMMAND, 5743, 718,	 Interface.MenuBar, 11)
  		HotbarSystem.SetActionOnHotbar(SystemData.UserAction.TYPE_SPEECH_USER_COMMAND, 5011, 860011, Interface.MenuBar, 12)
--- 822,824 ----
  		HotbarSystem.SetActionOnHotbar(SystemData.UserAction.TYPE_SPEECH_USER_COMMAND, 5015, 860015, Interface.MenuBar, 10)
! 		HotbarSystem.SetActionOnHotbar(SystemData.UserAction.TYPE_SPEECH_USER_COMMAND, 5017, 860017, Interface.MenuBar, 11)
  		HotbarSystem.SetActionOnHotbar(SystemData.UserAction.TYPE_SPEECH_USER_COMMAND, 5011, 860011, Interface.MenuBar, 12)
***************
*** 923,924 ****
--- 923,925 ----
  		Interface.PaperdollFirstPositioning = true
+ 		Interface.GChatFirstPositioning = true
  		

Interface.xml

更新。

*** Interface.xml	Thu Aug 31 15:22:32 2017
--- Interface.xml	Tue Mar 27 01:01:44 2018
***************
*** 68,69 ****
--- 68,70 ----
  	<Include file="Source/ChannelWindow.xml" />
+ 	<Include file="Source/GChatRoster.xml" />
  	<Include file="Source/IgnoreWindow.xml" />
***************
*** 159,160 ****
--- 160,162 ----
  		<Script file="Source/ChannelWindow.lua" />
+ 		<Script file="Source/GChatRoster.lua" />
  		<Script file="Source/CharacterAbilities.lua" />

Sourceディレクトリ

GChatRoster.lua、GChatRoster.xml

ファイル追加。

Actions.lua

更新。

*** Source/Actions.lua	Thu Aug 31 15:22:32 2017
--- Source/Actions.lua	Tue Mar 27 01:01:44 2018
***************
*** 87,88 ****
--- 87,93 ----
  	end
+ 	if( not DoesWindowExist("GChatRoster") ) then
+ 		CreateWindow("GChatRoster", true)
+ 	else
+ 		DestroyWindow("GChatRoster")
+ 	end
  end
***************
*** 140,141 ****
--- 145,150 ----
  	end
+ end
+ 
+ function Actions.ToggleUOStoreWindow()
+     BroadcastEvent( SystemData.Events.UO_STORE_REQUEST)
  end

ActionsWindow.lua

更新。

*** Source/ActionsWindow.lua	Thu Aug 31 15:22:32 2017
--- Source/ActionsWindow.lua	Tue Mar 27 01:01:44 2018
***************
*** 227,228 ****
--- 227,229 ----
  	ActionsWindow.ActionData[5016] = { type=SystemData.UserAction.TYPE_SPEECH_USER_COMMAND,			inActionWindow=true, iconId=860016, detailString=L"", nameTid=1061037, callback=L"script Actions.ToggleHelpWindow()" }
+ 	ActionsWindow.ActionData[5017] = { type=SystemData.UserAction.TYPE_SPEECH_USER_COMMAND,			inActionWindow=true, iconId=860017, detailString=L"", nameTid=1157353, callback=L"script Actions.ToggleUOStoreWindow()" }
  

mainmenuwindow.lua

更新。

*** Source/mainmenuwindow.lua	Thu Aug 31 15:22:34 2017
--- Source/mainmenuwindow.lua	Tue Mar 27 01:01:44 2018
***************
*** 14,15 ****
--- 14,17 ----
  MainMenuWindow.TID.ACTIONS       = 1079812	-- Actions 
+ MainMenuWindow.TID.AGENTS     	 = 1154762	-- Agents 
+ MainMenuWindow.TID.UOSTORE     	 = 1157353	-- Ultima Store 
  
***************
*** 35,37 ****
  	LabelSetText("MainMenuWindowUserSettingsItemText", GetStringFromTid(MainMenuWindow.TID.USER_SETTINGS) )
! 	LabelSetText("MainMenuWindowAgentsSettingsItemText", GetStringFromTid(1154762) )
  	LabelSetText("MainMenuWindowMacrosItemText", GetStringFromTid(MainMenuWindow.TID.MACROS) )
--- 37,39 ----
  	LabelSetText("MainMenuWindowUserSettingsItemText", GetStringFromTid(MainMenuWindow.TID.USER_SETTINGS) )
! 	LabelSetText("MainMenuWindowAgentsSettingsItemText", GetStringFromTid(MainMenuWindow.TID.AGENTS) )
  	LabelSetText("MainMenuWindowMacrosItemText", GetStringFromTid(MainMenuWindow.TID.MACROS) )
***************
*** 39,40 ****
--- 41,43 ----
  	LabelSetText("MainMenuWindowHelpItemText", GetStringFromTid(MainMenuWindow.TID.HELP) )
+ 	LabelSetText("MainMenuWindowUOStoreText", GetStringFromTid(MainMenuWindow.TID.UOSTORE) )
  	
***************
*** 92,93 ****
--- 95,101 ----
      BroadcastEvent( SystemData.Events.REQUEST_OPEN_HELP_MENU )
+ 	WindowSetShowing("MainMenuWindow",false)
+ end
+ 
+ function MainMenuWindow.OnOpenUOStore()
+     BroadcastEvent( SystemData.Events.UO_STORE_REQUEST )
  	WindowSetShowing("MainMenuWindow",false)

mainmenuwindow.xml

更新。

*** Source/mainmenuwindow.xml	Thu Aug 31 15:22:34 2017
--- Source/mainmenuwindow.xml	Tue Mar 27 01:01:44 2018
***************
*** 81,83 ****
        <Size>
!         <AbsPoint x="214" y="395" />
        </Size>
--- 81,83 ----
        <Size>
!         <AbsPoint x="214" y="440" />
        </Size>
***************
*** 160,161 ****
--- 160,181 ----
  
+         <!-- User Settings -->
+         <Window name="$parentUOStore" inherits="MenuItemTemplate" >
+           <Anchors>
+             <Anchor point="bottom" relativePoint="top" relativeTo="$parentDivider2">
+               <AbsPoint x="3" y="0" />
+             </Anchor>
+           </Anchors>
+           <EventHandlers>
+             <EventHandler event="OnLButtonUp" function="MainMenuWindow.OnOpenUOStore" />
+           </EventHandlers>
+         </Window>
+ 
+         <HorizontalResizeImage name="$parentDivider3" inherits="MenuSmallDivider" >
+           <Anchors>
+             <Anchor point="bottom" relativePoint="top" relativeTo="$parentUOStore">
+               <AbsPoint x="-3" y="0" />
+             </Anchor>
+           </Anchors>
+         </HorizontalResizeImage>
+ 
  		 <!-- Agents Settings -->
***************
*** 163,165 ****
  			  <Anchors>
! 				  <Anchor point="bottom" relativePoint="top" relativeTo="$parentDivider2">
  					  <AbsPoint x="3" y="0" />
--- 183,185 ----
  			  <Anchors>
! 				  <Anchor point="bottom" relativePoint="top" relativeTo="$parentDivider3">
  					  <AbsPoint x="3" y="0" />
***************
*** 193,195 ****
  
!         <HorizontalResizeImage name="$parentDivider3" inherits="MenuSmallDivider" >
            <Anchors>
--- 213,215 ----
  
!         <HorizontalResizeImage name="$parentDivider4" inherits="MenuSmallDivider" >
            <Anchors>
***************
*** 204,206 ****
            <Anchors>
!             <Anchor point="bottom" relativePoint="top" relativeTo="$parentDivider3">
                <AbsPoint x="3" y="0" />
--- 224,226 ----
            <Anchors>
!             <Anchor point="bottom" relativePoint="top" relativeTo="$parentDivider4">
                <AbsPoint x="3" y="0" />
***************
*** 213,215 ****
  
!         <HorizontalResizeImage name="$parentDivider4" inherits="MenuSmallDivider" >
            <Anchors>
--- 233,235 ----
  
!         <HorizontalResizeImage name="$parentDivider5" inherits="MenuSmallDivider" >
            <Anchors>
***************
*** 224,226 ****
            <Anchors>
!             <Anchor point="bottom" relativePoint="top" relativeTo="$parentDivider4">
                <AbsPoint x="3" y="0" />
--- 244,246 ----
            <Anchors>
!             <Anchor point="bottom" relativePoint="top" relativeTo="$parentDivider5">
                <AbsPoint x="3" y="0" />
***************
*** 233,235 ****
  
!         <HorizontalResizeImage name="$parentDivider5" inherits="MenuSmallDivider" >
            <Anchors>
--- 253,255 ----
  
!         <HorizontalResizeImage name="$parentDivider6" inherits="MenuSmallDivider" >
            <Anchors>
***************
*** 245,247 ****
            <Anchors>
!             <Anchor point="bottom" relativePoint="top" relativeTo="$parentDivider5">
                <AbsPoint x="3" y="0" />
--- 265,267 ----
            <Anchors>
!             <Anchor point="bottom" relativePoint="top" relativeTo="$parentDivider6">
                <AbsPoint x="3" y="0" />

Tooltips.xml

更新。

*** Source/Tooltips.xml	Thu Aug 31 15:23:08 2017
--- Source/Tooltips.xml	Thu Mar 29 01:01:50 2018
***************
*** 6,8 ****
  			<Windows>
! 				<Label name="$parentCol1Text" inherits="UO_Default_Label_Color" font="UO_DefaultText" maxchars="512" textalign="topleft" autoresize="true" wordwrap="true">
  					<Size>
--- 6,8 ----
  			<Windows>
! 				<Label name="$parentCol1Text" inherits="UO_Default_Label_Color" font="UO_DefaultText" maxchars="2048" textalign="topleft" autoresize="true" wordwrap="true">
  					<Size>
***************
*** 18,20 ****
  				                              
! 				<Label name="$parentCol2Text" inherits="UO_Default_Label_Color" font="UO_DefaultText" maxchars="512" textalign="topleft" autoresize="true" wordwrap="true">
  					<Size>
--- 18,20 ----
  				                              
! 				<Label name="$parentCol2Text" inherits="UO_Default_Label_Color" font="UO_DefaultText" maxchars="2048" textalign="topleft" autoresize="true" wordwrap="true">
  					<Size>

UO_ChatWindow/Sourceディレクトリ

ChatSettings.lua

更新。

*** UO_ChatWindow/Source/ChatSettings.lua	Thu Aug 31 15:23:00 2017
--- UO_ChatWindow/Source/ChatSettings.lua	Tue Mar 27 01:01:44 2018
***************
*** 89,90 ****
--- 90,92 ----
      ChatSettings.ChannelSwitches[ SystemData.ChatLogFilters.CUSTOM ]       = SwitchText( L"/c ", L"[CHAT]:" )
+     ChatSettings.ChannelSwitches[ SystemData.ChatLogFilters.GLOBAL_CHAT]   = SwitchText( L"/x ", L"[CHAT]:" )
      
***************
*** 102,106 ****
      ChatSettings.Channels[ SystemData.ChatLogFilters.PRIVATE ]       = ChatChannel( L"Private",        SystemData.ChatLogFilters.PRIVATE,            "Chat",     true,           true,                false,		ChannelColor(207, 56, 223) )
!     ChatSettings.Channels[ SystemData.ChatLogFilters.CUSTOM ]        = ChatChannel( L"Chat (Global)",  SystemData.ChatLogFilters.CUSTOM,             "Chat",     true,           true,                false,		ChannelColor(75, 120, 230),     SystemData.ChatLogFilters.CUSTOM,       L"/chat" )
      ChatSettings.Channels[ SystemData.ChatLogFilters.GESTURE ]       = ChatChannel( L"Gesture",        SystemData.ChatLogFilters.GESTURE,            "Chat",     true,           true,                false,		ChannelColor(215, 215, 1) )
      ChatSettings.Channels[ SystemData.ChatLogFilters.GM ]            = ChatChannel( L"GM",			   SystemData.ChatLogFilters.GM,                 "Chat",     true,           true,                true,			ChannelColor(232, 48, 88),      SystemData.ChatLogFilters.GM,           L"/gm" )
  
--- 104,111 ----
      ChatSettings.Channels[ SystemData.ChatLogFilters.PRIVATE ]       = ChatChannel( L"Private",        SystemData.ChatLogFilters.PRIVATE,            "Chat",     true,           true,                false,		ChannelColor(207, 56, 223) )
!     ChatSettings.Channels[ SystemData.ChatLogFilters.CUSTOM ]        = ChatChannel( L"Chat (Channel)", SystemData.ChatLogFilters.CUSTOM,             "Chat",     true,           true,                false,		ChannelColor(75, 120, 230),     SystemData.ChatLogFilters.CUSTOM,       L"/chat" )
      ChatSettings.Channels[ SystemData.ChatLogFilters.GESTURE ]       = ChatChannel( L"Gesture",        SystemData.ChatLogFilters.GESTURE,            "Chat",     true,           true,                false,		ChannelColor(215, 215, 1) )
      ChatSettings.Channels[ SystemData.ChatLogFilters.GM ]            = ChatChannel( L"GM",			   SystemData.ChatLogFilters.GM,                 "Chat",     true,           true,                true,			ChannelColor(232, 48, 88),      SystemData.ChatLogFilters.GM,           L"/gm" )
+     ChatSettings.Channels[ SystemData.ChatLogFilters.GLOBAL_CHAT]    = ChatChannel( L"GChat",          SystemData.ChatLogFilters.GLOBAL_CHAT,         "Chat",     true,           true,                false,       ChannelColor(75, 120, 230),      SystemData.ChatLogFilters.GLOBAL_CHAT,  L"/x" )
+    
+     
  
***************
*** 119,120 ****
--- 124,126 ----
          SystemData.ChatLogFilters.GM,
+         SystemData.ChatLogFilters.GLOBAL_CHAT,
      }

ChatWindow.lua

更新。

*** UO_ChatWindow/Source/ChatWindow.lua	Thu Aug 31 15:23:00 2017
--- UO_ChatWindow/Source/ChatWindow.lua	Tue Mar 27 01:01:44 2018
***************
*** 43,44 ****
--- 43,45 ----
  ChatWindow.topWindow = ""
+ ChatWindow.firstGChatSelect = true
  
***************
*** 209,210 ****
--- 210,215 ----
  
+     WindowRegisterEventHandler( "ChatWindow", SystemData.Events.GHAT_ROSTER_UPDATE,       "ChatWindow.OnGChatRosterUpdate")
+     
+     
+     
      for idxW, wnd in pairs(ChatWindow.Windows) do
***************
*** 1021,1022 ****
--- 1026,1029 ----
              ChatWindow.SwitchToChatChannel (prevChannel, ChatWindow.FormatWhisperPrompt (whisperTarget), existingText)
+         elseif (prevChannel == SystemData.ChatLogFilters.GLOBAL_CHAT) then
+             ChatWindow.SwitchToGChatSelectedChannel(existingText)
          else
***************
*** 1221,1223 ****
      WindowSetId( "ChatChannelSelectionWindowChatButton", SystemData.ChatLogFilters.CUSTOM)
!     ButtonSetText("ChatChannelSelectionWindowChatButton", L"/Chat (Global)" )
      ButtonSetTextColor("ChatChannelSelectionWindowChatButton", Button.ButtonState.NORMAL, channelColor.r, channelColor.g, channelColor.b)
--- 1228,1230 ----
      WindowSetId( "ChatChannelSelectionWindowChatButton", SystemData.ChatLogFilters.CUSTOM)
!     ButtonSetText("ChatChannelSelectionWindowChatButton", L"/Chat (Channel)" )
      ButtonSetTextColor("ChatChannelSelectionWindowChatButton", Button.ButtonState.NORMAL, channelColor.r, channelColor.g, channelColor.b)
***************
*** 1226,1227 ****
--- 1233,1237 ----
      ButtonSetTextColor("ChatChannelSelectionWindowChatButton", Button.ButtonState.PRESSED_HIGHLIGHTED, channelColor.r, channelColor.g, channelColor.b)
+ 
+     ChatWindow.firstGChatSelect = true
+     ChatWindow.OnGChatRosterUpdate()    
  end
***************
*** 1356,1357 ****
--- 1366,1410 ----
  
+ function ChatWindow.SwitchToGChatSelectedChannel(existingText)
+     
+     if (existingText == nil) then
+         existingText = L"";
+     end
+ 
+     local windowId = WindowGetId(SystemData.ActiveWindow.name)       
+     local chatChannelId =  SystemData.ChatLogFilters.GLOBAL_CHAT
+     WindowData.GChatIndex = ComboBoxGetSelectedMenuItem( "ChatChannelSelectionWindowGChatActiveFriendSelectCombo")
+     
+     if((WindowData.GChatIndex <= 0) or (WindowData.GChatCount == 0))then
+         return
+     end
+     Debug.Print("SwitchToGChatSelectedChannel("..tostring(WindowData.GChatIndex)..") Before")
+     if(ChatWindow.firstGChatSelect)then
+         WindowData.GChatIndex = WindowData.GChatIndex - 1
+         ChatWindow.firstGChatSelect = false
+         ChatWindow.OnGChatRosterUpdate()         
+     end    
+     Debug.Print("SwitchToGChatSelectedChannel("..tostring(WindowData.GChatIndex)..") After")
+     
+     local friendName = L"["..towstring(WindowData.GChatNameList[WindowData.GChatIndex])..L"]:"
+     local friendPresence = WindowData.GChatPresenceList[WindowData.GChatIndex]
+     
+     ChatWindow.SwitchToChatChannel(chatChannelId, friendName, existingText)
+     ChatWindow.UpdateCurrentChannel(chatChannelId)
+     -- Show the Text Input Window and Hide the menu
+     WindowAssignFocus( "ChatChannelSelectionWindow", false )
+     WindowSetShowing( "ChatWindowContainer", true )
+     WindowAssignFocus( "ChatWindowContainerTextInput", true )
+     WindowSetShowing("ChatChannelSelectionWindow", false)
+     
+     -- if the window is faded to minimum, and is not in the midst of fading in, fade it in immediately.
+     if (ChatWindow.dockableWindowData[1].isWindowAlphaMin == true and ChatWindow.dockableWindowData[1].fadeInTimer == 0)
+     then
+         -- Chat Window should be faded in
+         ChatWindow.PerformFadeIn(1)
+         ChatWindow.dockableWindowData[1].fadeOutTimer = 0
+     end
+ 
+     GChatRoster.SelectActiveFriend(WindowData.GChatIndex)
+ end
+ 
  function ChatWindow.ToggleInputText()
***************
*** 1458,1459 ****
--- 1511,1514 ----
                      ChatWindow.HandleTellCommand (ChatWindowContainerTextInput.Text, firstWord, spaceIdx, restOfLine)
+                 elseif (ixChannel == SystemData.ChatLogFilters.GLOBAL_CHAT) then
+                     ChatWindow.SwitchToGChatSelectedChannel()
                  else
***************
*** 1533,1535 ****
      
!     local channelColor = ChatSettings.ChannelColors[ ichannelIdx ]
      
--- 1588,1592 ----
  
!     local channelColorIdx = ichannelIdx
! 
!     local channelColor = ChatSettings.ChannelColors[ channelColorIdx ]
      
***************
*** 2382,2383 ****
  	Tooltips.AnchorTooltip( Tooltips.ANCHOR_WINDOW_TOP )	
! end
\ No newline at end of file
--- 2439,2460 ----
  	Tooltips.AnchorTooltip( Tooltips.ANCHOR_WINDOW_TOP )	
! end
! 
! function ChatWindow.OnGChatRosterUpdate()    
!     ComboBoxClearMenuItems("ChatChannelSelectionWindowGChatActiveFriendSelectCombo")
!     if(WindowData.GChatCount == 0 or ChatWindow.firstGChatSelect)then
!         ComboBoxAddMenuItem( "ChatChannelSelectionWindowGChatActiveFriendSelectCombo",  L"/Select Friend" )
!         WindowData.GChatIndex = 1;
!         ComboBoxSetSelectedMenuItem( "ChatChannelSelectionWindowGChatActiveFriendSelectCombo",  WindowData.GChatIndex)        
!     end
!     for i = 1, WindowData.GChatCount do
!        ComboBoxAddMenuItem( "ChatChannelSelectionWindowGChatActiveFriendSelectCombo",  towstring(WindowData.GChatNameList[i]))        
!     end
!     if((WindowData.GChatIndex > 0) and (WindowData.GChatIndex <= WindowData.GChatCount))then
!         ComboBoxSetSelectedMenuItem( "ChatChannelSelectionWindowGChatActiveFriendSelectCombo",  WindowData.GChatIndex)        
!     else
!         ComboBoxSetSelectedMenuItem( "ChatChannelSelectionWindowGChatActiveFriendSelectCombo", 1 ) --SystemData.ChatLogFilters.GLOBAL_CHAT
!         WindowData.GChatIndex = 1   
!     end     
! end
! 
! 

ChatWindow.xml

更新。

*** UO_ChatWindow/Source/ChatWindow.xml	Thu Aug 31 15:23:00 2017
--- UO_ChatWindow/Source/ChatWindow.xml	Tue Mar 27 01:01:44 2018
***************
*** 416,418 ****
              <Size>
!                 <AbsPoint x="133" y="162" />
              </Size>
--- 416,418 ----
              <Size>
!                 <AbsPoint x="200" y="200" />
              </Size>
***************
*** 448,450 ****
                  
!                 <Button name="$parentChatButton" inherits="ChannelMenuButton">
                      <Anchors>
--- 448,453 ----
                  
!                 <ComboBox name="$parentGChatActiveFriendSelectCombo" inherits="UO_Default_ComboBox" >
! 								<EventHandlers>
! 									<EventHandler event="OnSelChanged" function="ChatWindow.SwitchToGChatSelectedChannel" />                 
! 								</EventHandlers>
  								<Anchors>
***************
*** 454,455 ****
--- 457,465 ----
  								</Anchors>
+ 								</ComboBox>
+                 <Button name="$parentChatButton" inherits="ChannelMenuButton">
+                     <Anchors>
+                         <Anchor point="bottomleft" relativePoint="topleft" relativeTo="$parentGChatActiveFriendSelectCombo">
+                             <AbsPoint x="0" y="8" />
+                         </Anchor>
+                     </Anchors>
                  </Button>

コメントを残す

※ 送信されたコメントは、管理者の承認後に公開されます。