Author Topic: SCI1.1: Editing the title screen menu  (Read 2054 times)

0 Members and 1 Guest are viewing this topic.

Offline Kawa

SCI1.1: Editing the title screen menu
« on: June 20, 2015, 01:21:39 PM »
As you know, at this moment the title screen menu for the SCI1.1 template game is very Space Quest 5-like. A bit too much in my opinion. Through a combination of decompiles, comparisons, trial and error, and deeply-buried experience with SCI0, here's how to turn this

into this


The important bit is the buttons. As lskovlun guessed, this involves changing addColoredButton to addButton, so here's the details. You find this part, at line 127 of rm100.sc:
Code: [Select]
(5
(= seconds 0)
(= gCursor 999)
(gGame setCursor: 999 1)
(Print
dialog: myDialog
font: gFont
width: 150
mode: 1
addText: N_TITLEMENU V_LOOK 0 4 0 0 0
addText: N_TITLEMENU V_LOOK 0 5 0 10 0
addColorButton: 0 N_TITLEMENU V_LOOK 0 1 0 40 0 0 15 23 5 5 5
addColorButton: 1 N_TITLEMENU V_LOOK 0 2 0 50 0 0 15 23 5 5 5
)

(= temp0 (Print
addColorButton: 2 N_TITLEMENU V_LOOK 0 3 0 70 0 0 15 23 5 5 5
init:
))

(switch (temp0)
(0
(gRoom newRoom: 110)
)
(1
(gGame restore:)
(self changeState: state)
)
(2
(= gQuitGame TRUE)
)
)
)
And basically replace that with this:
Code: [Select]
(5
(= seconds 0)
(= gCursor 999)
(gGame setCursor: 999 1)
(Print
dialog: myDialog
font: gFont
width: 150
mode: 1
addText: N_TITLEMENU V_LOOK 0 5
addButton: 0 N_TITLEMENU V_LOOK 0 1 0 24
addButton: 1 N_TITLEMENU V_LOOK 0 2 0 40
)

(= temp0 (Print
addButton: 2 N_TITLEMENU V_LOOK 0 0 56
init:
))

(switch (temp0)
(0
(gRoom newRoom: 110)
)
(1
(gGame restore:)
(self changeState: state)
)
(2
(= gQuitGame TRUE)
)
)
)
Though personally I removed the message bits for preference and folded the print and assignment in one like this:
Code: [Select]
(= temp0 (Print
dialog: myDialog
font: gFont
width: 150
mode: 1
; addTitle: {Window title anyone?}
addText: {Hi there. Please, make your selection:}
addButton: 0 {Play a New Game} 0 24
addButton: 1 {Restore an Old Game} 0 40
addButton: 2 {Quit} 0 56
init:
))

Bonus
You'll notice my window is not beveled. That's a one-line change. main.sc line 1290:
Code: [Select]
(instance sq5Win of SysWindow //BorderWindowThat's it you're done. Technically I eliminated a whole lot more BorderWindow usages but this oughta do for anything (Print)ed.

Happy hacking.
« Last Edit: May 25, 2017, 01:25:59 PM by Kawa »




SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.114 seconds with 23 queries.