Overhaul the IRC implementation.

* Simplified UI plumbing.
* Improves handling of errors and kicks.
* Persists chat history between session.
* Fixes leaks of the old widget tree when exiting.
* A few small UI polish improvements.
This commit is contained in:
Paul Chote
2015-10-09 23:03:32 +01:00
parent 386f252736
commit a3fe2b3d35
21 changed files with 657 additions and 453 deletions

View File

@@ -1,22 +1,36 @@
Container@SERVERBROWSER_IRC:
Logic: IrcLogic
Width: 700
Height: 250
Container@GLOBALCHAT_PANEL:
Logic: GlobalChatLogic
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Container@IRC_CONTAINER:
Container@GLOBALCHAT_MAIN_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Background@TOPIC:
Width: 565
Height: 20
Background: panel-transparent
Children:
Label@CHANNEL_TOPIC:
X: 10
Y: 0-1
Width: PARENT_RIGHT - 20
Height: PARENT_BOTTOM
Font: TinyBold
Align: Center
ScrollPanel@HISTORY_PANEL:
Width: 565
Height: PARENT_BOTTOM - 30
Y: 19
Height: PARENT_BOTTOM - 49
ItemSpacing: 5
Label@HISTORY_TEMPLATE:
X: 5
Width: 530
Height: 25
WordWrap: True
TextField@INPUT_BOX:
Children:
Label@HISTORY_TEMPLATE:
X: 5
Width: 530
Height: 25
WordWrap: True
TextField@CHAT_TEXTFIELD:
Y: PARENT_BOTTOM - 25
Width: 565
Height: 25
@@ -24,8 +38,20 @@ Container@SERVERBROWSER_IRC:
X: 570
Width: 130
Height: PARENT_BOTTOM - 30
Label@NICKNAME_TEMPLATE:
X: 5
Children:
Container@NICKNAME_TEMPLATE:
Height: 20
Width: PARENT_RIGHT-25
Children:
Image@INDICATOR:
ImageCollection: lobby-bits
ImageName: admin
X: 4
Y: 9
Label@NICK:
X: 15
Width: PARENT_RIGHT-15
Height: 20
Button@DISCONNECT_BUTTON:
X: 570
Y: PARENT_BOTTOM - 25
@@ -33,7 +59,7 @@ Container@SERVERBROWSER_IRC:
Height: 25
Text: Disconnect
Font: Bold
Background@IRC_CONNECT_BG:
Background@GLOBALCHAT_CONNECT_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Background: scrollpanel-bg
@@ -48,7 +74,7 @@ Container@SERVERBROWSER_IRC:
X: 200
Y: PARENT_BOTTOM / 4 + 35
Text: Nickname:
TextField@NICKNAME_BOX:
TextField@NICKNAME_TEXTFIELD:
X: 270
Y: PARENT_BOTTOM / 4 + 25
Width: 150

View File

@@ -18,9 +18,11 @@ Container@SERVERBROWSER_PANEL:
Background: panel-black
Y: 15
Children:
Container@IRC_ROOT:
Container@GLOBALCHAT_ROOT:
X: 15
Y: 15
Width: 700
Height: 260
ScrollPanel@SERVER_LIST:
X: 15
Y: 280

View File

@@ -33,4 +33,6 @@ Metrics:
WaitingGameColor: 0,255,0
IncompatibleWaitingGameColor: 50,205,50
GameStartedColor: 255,165,0
IncompatibleGameStartedColor: 210,105,30
IncompatibleGameStartedColor: 210,105,30
GlobalChatTextColor: 255,255,255
GlobalChatNotificationColor: 211,211,211

View File

@@ -122,7 +122,7 @@ ChromeLayout:
./mods/cnc/chrome/assetbrowser.yaml
./mods/cnc/chrome/missionbrowser.yaml
./mods/cnc/chrome/editor.yaml
./mods/cnc/chrome/irc.yaml
./mods/cnc/chrome/globalchat.yaml
Voices:
./mods/cnc/audio/voices.yaml

View File

@@ -33,4 +33,6 @@ Metrics:
WaitingGameColor: 0,255,0
IncompatibleWaitingGameColor: 50,205,50
GameStartedColor: 255,165,0
IncompatibleGameStartedColor: 210,105,30
IncompatibleGameStartedColor: 210,105,30
GlobalChatTextColor: 255,255,255
GlobalChatNotificationColor: 211,211,211

View File

@@ -104,7 +104,7 @@ ChromeLayout:
./mods/d2k/chrome/missionbrowser.yaml
./mods/ra/chrome/confirmation-dialogs.yaml
./mods/ra/chrome/editor.yaml
./mods/ra/chrome/irc.yaml
./mods/ra/chrome/globalchat.yaml
Weapons:
./mods/d2k/weapons.yaml

View File

@@ -1,22 +1,36 @@
Container@SERVERBROWSER_IRC:
Logic: IrcLogic
Width: 700
Height: 250
Container@GLOBALCHAT_PANEL:
Logic: GlobalChatLogic
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Container@IRC_CONTAINER:
Container@GLOBALCHAT_MAIN_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
ScrollPanel@HISTORY_PANEL:
Background@TOPIC:
Width: 565
Height: PARENT_BOTTOM - 30
Height: 20
Background: dialog2
Children:
Label@CHANNEL_TOPIC:
X: 10
Y: 0-1
Width: PARENT_RIGHT - 20
Height: PARENT_BOTTOM
Font: TinyBold
Align: Center
ScrollPanel@HISTORY_PANEL:
Y:20
Width: 565
Height: PARENT_BOTTOM - 50
ItemSpacing: 5
Label@HISTORY_TEMPLATE:
X: 5
Width: 530
Height: 25
WordWrap: True
TextField@INPUT_BOX:
Children:
Label@HISTORY_TEMPLATE:
X: 5
Width: 530
Height: 25
WordWrap: True
TextField@CHAT_TEXTFIELD:
Y: PARENT_BOTTOM - 25
Width: 565
Height: 25
@@ -24,8 +38,20 @@ Container@SERVERBROWSER_IRC:
X: 570
Width: 130
Height: PARENT_BOTTOM - 30
Label@NICKNAME_TEMPLATE:
X: 5
Children:
Container@NICKNAME_TEMPLATE:
Height: 20
Width: PARENT_RIGHT-25
Children:
Image@INDICATOR:
ImageCollection: lobby-bits
ImageName: admin
X: 4
Y: 9
Label@NICK:
X: 15
Width: PARENT_RIGHT-15
Height: 20
Button@DISCONNECT_BUTTON:
X: 570
Y: PARENT_BOTTOM - 25
@@ -33,7 +59,7 @@ Container@SERVERBROWSER_IRC:
Height: 25
Text: Disconnect
Font: Bold
Background@IRC_CONNECT_BG:
Background@GLOBALCHAT_CONNECT_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Background: scrollpanel-bg
@@ -48,7 +74,7 @@ Container@SERVERBROWSER_IRC:
X: 200
Y: PARENT_BOTTOM / 4 + 35
Text: Nickname:
TextField@NICKNAME_BOX:
TextField@NICKNAME_TEXTFIELD:
X: 270
Y: PARENT_BOTTOM / 4 + 25
Width: 150

View File

@@ -118,10 +118,11 @@ Background@SERVERBROWSER_PANEL:
Y: 40
Align: Right
Height: 25
Container@IRC_ROOT:
Container@GLOBALCHAT_ROOT:
X: 20
Y: 370
Width: 260
Width: 700
Height: 255
Label@PROGRESS_LABEL:
X: (PARENT_RIGHT - WIDTH) / 2
Y: PARENT_BOTTOM / 2 - HEIGHT

View File

@@ -41,3 +41,5 @@ Metrics:
IncompatibleWaitingGameColor: 50,205,50
GameStartedColor: 255,165,0
IncompatibleGameStartedColor: 210,105,30
GlobalChatTextColor: 255,255,255
GlobalChatNotificationColor: 211,211,211

View File

@@ -115,7 +115,7 @@ ChromeLayout:
./mods/ra/chrome/missionbrowser.yaml
./mods/ra/chrome/confirmation-dialogs.yaml
./mods/ra/chrome/editor.yaml
./mods/ra/chrome/irc.yaml
./mods/ra/chrome/globalchat.yaml
Weapons:
./mods/ra/weapons/explosions.yaml

View File

@@ -33,4 +33,6 @@ Metrics:
WaitingGameColor: 0,255,0
IncompatibleWaitingGameColor: 50,205,50
GameStartedColor: 255,165,0
IncompatibleGameStartedColor: 210,105,30
IncompatibleGameStartedColor: 210,105,30
GlobalChatTextColor: 255,255,255
GlobalChatNotificationColor: 211,211,211

View File

@@ -169,7 +169,7 @@ ChromeLayout:
./mods/ra/chrome/missionbrowser.yaml
./mods/ra/chrome/confirmation-dialogs.yaml
./mods/ra/chrome/editor.yaml
./mods/ra/chrome/irc.yaml
./mods/ra/chrome/globalchat.yaml
Voices:
./mods/ts/audio/voices.yaml