add a simple in-game IRC client

This commit is contained in:
Matthias Mailänder
2015-07-06 14:53:54 +02:00
parent 2df76ad962
commit dae3b62d2a
19 changed files with 660 additions and 66 deletions

70
mods/cnc/chrome/irc.yaml Normal file
View File

@@ -0,0 +1,70 @@
Container@SERVERBROWSER_IRC:
Logic: IrcLogic
Width: 700
Height: 250
Children:
Container@IRC_CONTAINER:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
ScrollPanel@HISTORY_PANEL:
Width: 565
Height: PARENT_BOTTOM - 30
ItemSpacing: 5
Label@HISTORY_TEMPLATE:
X: 5
Width: 530
Height: 25
WordWrap: True
TextField@INPUT_BOX:
Y: PARENT_BOTTOM - 25
Width: 565
Height: 25
ScrollPanel@NICKNAME_PANEL:
X: 570
Width: 130
Height: PARENT_BOTTOM - 30
Label@NICKNAME_TEMPLATE:
X: 5
Button@DISCONNECT_BUTTON:
X: 570
Y: PARENT_BOTTOM - 25
Width: 130
Height: 25
Text: Disconnect
Font: Bold
Background@IRC_CONNECT_BG:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Background: scrollpanel-bg
Children:
Label@GLOBAL_CHAT_LABEL:
Y: PARENT_BOTTOM / 4
Width: PARENT_RIGHT
Align: Center
Text: Global Chat
Font: Bold
Label@NICKNAME_LABEL:
X: 200
Y: PARENT_BOTTOM / 4 + 35
Text: Nickname:
TextField@NICKNAME_BOX:
X: 270
Y: PARENT_BOTTOM / 4 + 25
Width: 150
Height: 25
Checkbox@CONNECT_AUTOMATICALLY_CHECKBOX:
X: 270
Y: PARENT_BOTTOM / 4 + 75
Height: 20
Width: 180
Font: Regular
Text: Connect Automatically
Button@CONNECT_BUTTON:
X: 430
Y: PARENT_BOTTOM / 4 + 25
Width: 100
Height: 25
Text: Connect
Font: Bold

View File

@@ -1,74 +1,31 @@
Container@SERVERBROWSER_PANEL:
Logic: ServerBrowserLogic
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - 500)/2
Y: (WINDOW_BOTTOM - HEIGHT)/2
Width: 730
Height: 535
Height: 595
Children:
Label@TITLE:
Text: Multiplayer
Width: 740
Y: 0-25
Y: 0-10
Font: BigBold
Contrast: true
Align: Center
Background@bg:
Width: 730
Height: 500
Height: PARENT_BOTTOM - 30
Background: panel-black
Y: 15
Children:
Label@SHOW_LABEL_TITLE:
X: 20
Y: 465
Width: 20
Height: 25
Text: Show:
Font: Bold
Checkbox@WAITING_FOR_PLAYERS:
X: 80
Y: 467
Width: 100
Height: 20
Text: Waiting
TextColor: 50,205,50
Checkbox@EMPTY:
X: 180
Y: 467
Width: 100
Height: 20
Text: Empty
Checkbox@PASSWORD_PROTECTED:
X: 270
Y: 467
Width: 100
Height: 20
Text: Protected
TextColor: 255,0,0
Checkbox@ALREADY_STARTED:
X: 385
Y: 467
Width: 100
Height: 20
Text: Started
TextColor: 255,165,0
Checkbox@INCOMPATIBLE_VERSION:
X: 480
Y: 467
Width: 100
Height: 20
Text: Incompatible
TextColor: 190,190,190
Button@REFRESH_BUTTON:
X: PARENT_RIGHT - WIDTH - 15
Y: 465
Width: 100
Height: 25
Text: Refresh
ScrollPanel@SERVER_LIST:
Container@IRC_ROOT:
X: 15
Y: 15
ScrollPanel@SERVER_LIST:
X: 15
Y: 280
Width: 700
Height: 440
Height: 240
Children:
ScrollItem@HEADER_TEMPLATE:
Width: PARENT_RIGHT-27
@@ -129,35 +86,82 @@ Container@SERVERBROWSER_PANEL:
Height: 25
Label@PROGRESS_LABEL:
X: (PARENT_RIGHT - WIDTH) / 2
Y: PARENT_BOTTOM / 2 - HEIGHT
Y: PARENT_BOTTOM / 2 - HEIGHT + (280 / 2)
Width: 710
Height: 25
Font: Bold
Align: Center
Visible: false
Label@SHOW_LABEL_TITLE:
X: 20
Y: 525
Width: 20
Height: 25
Text: Show:
Font: Bold
Checkbox@WAITING_FOR_PLAYERS:
X: 80
Y: 527
Width: 100
Height: 20
Text: Waiting
TextColor: 50,205,50
Checkbox@EMPTY:
X: 180
Y: 527
Width: 100
Height: 20
Text: Empty
Checkbox@PASSWORD_PROTECTED:
X: 270
Y: 527
Width: 100
Height: 20
Text: Protected
TextColor: 255,0,0
Checkbox@ALREADY_STARTED:
X: 385
Y: 527
Width: 100
Height: 20
Text: Started
TextColor: 255,165,0
Checkbox@INCOMPATIBLE_VERSION:
X: 480
Y: 527
Width: 100
Height: 20
Text: Incompatible
TextColor: 190,190,190
Button@REFRESH_BUTTON:
X: PARENT_RIGHT - WIDTH - 15
Y: 525
Width: 100
Height: 25
Text: Refresh
Button@BACK_BUTTON:
Key: escape
X: 0
Y: 499
Y: PARENT_BOTTOM - 16
Width: 140
Height: 35
Text: Back
Button@CREATE_BUTTON:
X: PARENT_RIGHT - 140 - 10 - 140 - 10 - 140
Y: 499
Y: PARENT_BOTTOM - 16
Width: 140
Height: 35
Text: Create
Button@DIRECTCONNECT_BUTTON:
X: PARENT_RIGHT - 140 - 10 - 140
Y: 499
Y: PARENT_BOTTOM - 16
Width: 140
Height: 35
Text: Direct IP
Button@JOIN_BUTTON:
Key: return
X: PARENT_RIGHT - 140
Y: 499
Y: PARENT_BOTTOM - 16
Width: 140
Height: 35
Text: Join

View File

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

View File

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

69
mods/ra/chrome/irc.yaml Normal file
View File

@@ -0,0 +1,69 @@
Container@SERVERBROWSER_IRC:
Logic: IrcLogic
Width: 700
Height: 250
Children:
Container@IRC_CONTAINER:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
ScrollPanel@HISTORY_PANEL:
Width: 565
Height: PARENT_BOTTOM - 30
ItemSpacing: 5
Label@HISTORY_TEMPLATE:
X: 5
Width: 530
Height: 25
WordWrap: True
TextField@INPUT_BOX:
Y: PARENT_BOTTOM - 25
Width: 565
Height: 25
ScrollPanel@NICKNAME_PANEL:
X: 570
Width: 130
Height: PARENT_BOTTOM - 30
Label@NICKNAME_TEMPLATE:
X: 5
Button@DISCONNECT_BUTTON:
X: 570
Y: PARENT_BOTTOM - 25
Width: 130
Height: 25
Text: Disconnect
Font: Bold
Background@IRC_CONNECT_BG:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Background: scrollpanel-bg
Children:
Label@GLOBAL_CHAT_LABEL:
Y: PARENT_BOTTOM / 4
Width: PARENT_RIGHT
Align: Center
Text: Global Chat
Font: Bold
Label@NICKNAME_LABEL:
X: 200
Y: PARENT_BOTTOM / 4 + 35
Text: Nickname:
TextField@NICKNAME_BOX:
X: 270
Y: PARENT_BOTTOM / 4 + 25
Width: 150
Height: 25
Checkbox@CONNECT_AUTOMATICALLY_CHECKBOX:
X: 270
Y: PARENT_BOTTOM / 4 + 75
Height: 20
Width: 180
Text: Connect Automatically
Button@CONNECT_BUTTON:
X: 430
Y: PARENT_BOTTOM / 4 + 25
Width: 100
Height: 25
Text: Connect
Font: Bold

View File

@@ -3,7 +3,7 @@ Background@SERVERBROWSER_PANEL:
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - HEIGHT)/2
Width: 740
Height: 500
Height: 645
Children:
Label@MULTIPLAYER_LABEL_TITLE:
X: 0
@@ -58,7 +58,7 @@ Background@SERVERBROWSER_PANEL:
X: 20
Y: 80
Width: 700
Height: 360
Height: 240
Children:
ScrollItem@HEADER_TEMPLATE:
BaseName: scrollheader
@@ -118,6 +118,10 @@ Background@SERVERBROWSER_PANEL:
Y: 40
Align: Right
Height: 25
Container@IRC_ROOT:
X: 20
Y: 370
Width: 260
Label@PROGRESS_LABEL:
X: (PARENT_RIGHT - WIDTH) / 2
Y: PARENT_BOTTOM / 2 - HEIGHT
@@ -127,28 +131,28 @@ Background@SERVERBROWSER_PANEL:
Align: Center
Button@REFRESH_BUTTON:
X: 20
Y: PARENT_BOTTOM - 45
Y: 325
Width: 100
Height: 25
Text: Refresh
Font: Bold
Button@CREATE_BUTTON:
X: PARENT_RIGHT - 120 - 120 - 120 - 120
Y: PARENT_BOTTOM - 45
Y: 325
Width: 100
Height: 25
Text: Create
Font: Bold
Button@DIRECTCONNECT_BUTTON:
X: PARENT_RIGHT - 120 - 120 - 120
Y: PARENT_BOTTOM - 45
Y: 325
Width: 100
Height: 25
Text: Direct IP
Font: Bold
Button@JOIN_BUTTON:
X: PARENT_RIGHT - 120 - 120
Y: PARENT_BOTTOM - 45
Y: 325
Width: 100
Height: 25
Text: Join
@@ -156,7 +160,7 @@ Background@SERVERBROWSER_PANEL:
Key: return
Button@BACK_BUTTON:
X: PARENT_RIGHT - 120
Y: PARENT_BOTTOM - 45
Y: 325
Width: 100
Height: 25
Text: Cancel

View File

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

View File

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