Skip to content

Commit

Permalink
Finished keyboard implementation, which is now very smooth and clean.…
Browse files Browse the repository at this point in the history
… All weapons are now assigned to their actual keys instead of makeshifts. Still working on fixing colours.

Signed-off-by: Adam Hintz <[email protected]>
  • Loading branch information
adam000 committed Sep 5, 2009
1 parent 22fc98b commit 2c9874b
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 37 deletions.
16 changes: 8 additions & 8 deletions Resources/Scripts/Modes/AresSplash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ fontsize = 22
splash_stride = 26
splash_num = 0

local execs = { { coordx = splash_shift_left, coordy = top_of_splash, length = splash_shift_right - splash_shift_left, text = "Start New Game", justify = "left", boxColour = c_lightYellow, textColour = c_purple, execute = nil, letter = "S" },
{ coordx = splash_shift_left, coordy = top_of_splash - 1 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Start Network Game", justify = "left", boxColour = c_darkGreen, textColour = c_purple, execute = nil, letter = "N" },
{ coordx = splash_shift_left, coordy = top_of_splash - 2 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Replay Intro", justify = "left", boxColour = c_grey, textColour = c_purple, execute = nil, letter = "R" },
{ coordx = splash_shift_left, coordy = top_of_splash - 3 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Demo", justify = "left", boxColour = c_grey_brown, textColour = c_purple, execute = nil, letter = "D" },
{ coordx = splash_shift_left, coordy = top_of_splash - 4 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Options", justify = "left", boxColour = c_lightGreen, textColour = c_purple, execute = nil, letter = "O" },
{ coordx = splash_shift_left, coordy = top_of_splash - 5 * splash_stride, length = splash_shift_right - splash_shift_left, text = "About Ares and Xsera", justify = "left", boxColour = c_grey_brown, textColour = c_purple, execute = nil, letter = "A" },
{ coordx = splash_shift_left, coordy = top_of_splash - 6 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Xsera Main Menu", justify = "left", boxColour = c_lightYellow, textColour = c_purple, execute = nil, letter = "M" },
{ coordx = splash_shift_left, coordy = top_of_splash - 7 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Quit", justify = "left", boxColour = c_lightRed, textColour = c_purple, execute = nil, letter = "Q" } }
local execs = { { coordx = splash_shift_left, coordy = top_of_splash, length = splash_shift_right - splash_shift_left, text = "Start New Game", justify = "left", boxColour = c_lightYellow, textColour = clut_colour(13, 9), execute = nil, letter = "S" },
{ coordx = splash_shift_left, coordy = top_of_splash - 1 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Start Network Game", justify = "left", boxColour = c_darkGreen, textColour = clut_colour(13, 9), execute = nil, letter = "N" },
{ coordx = splash_shift_left, coordy = top_of_splash - 2 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Replay Intro", justify = "left", boxColour = c_grey, textColour = clut_colour(13, 9), execute = nil, letter = "R" },
{ coordx = splash_shift_left, coordy = top_of_splash - 3 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Demo", justify = "left", boxColour = c_grey_brown, textColour = clut_colour(13, 9), execute = nil, letter = "D" },
{ coordx = splash_shift_left, coordy = top_of_splash - 4 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Options", justify = "left", boxColour = c_lightGreen, textColour = clut_colour(13, 9), execute = nil, letter = "O" },
{ coordx = splash_shift_left, coordy = top_of_splash - 5 * splash_stride, length = splash_shift_right - splash_shift_left, text = "About Ares and Xsera", justify = "left", boxColour = c_grey_brown, textColour = clut_colour(13, 9), execute = nil, letter = "A" },
{ coordx = splash_shift_left, coordy = top_of_splash - 6 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Xsera Main Menu", justify = "left", boxColour = c_lightYellow, textColour = clut_colour(13, 9), execute = nil, letter = "M" },
{ coordx = splash_shift_left, coordy = top_of_splash - 7 * splash_stride, length = splash_shift_right - splash_shift_left, text = "Quit", justify = "left", boxColour = c_lightRed, textColour = clut_colour(13, 9), execute = nil, letter = "Q" } }

function init()
sound.stop_music()
Expand Down
10 changes: 5 additions & 5 deletions Resources/Scripts/Modes/Briefing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import('BoxDrawing')

freezeMenuNum = 0
levelSwitching = true
background1 = { { coordx = -280, coordy = 140, length = 560, text = " ", boxColour = c_teal, textColour = c_purple, execute = nil, letter = "Select Level", underbox = -145 },
{ coordx = -260, coordy = -205, length = 150, text = "Cancel", boxColour = c_brightYellow, textColour = c_purple, execute = nil, letter = "ESC" },
{ coordx = 110, coordy = -205, length = 150, text = "Begin", boxColour = c_lightGreen, textColour = c_purple, execute = nil, letter = "RTRN" },
{ coordx = -260, coordy = -105, length = 150, text = "Previous", boxColour = c_teal, textColour = c_purple, execute = nil, letter = "LEFT" },
{ coordx = 110, coordy = -105, length = 150, text = "Next", boxColour = c_teal, textColour = c_purple, execute = nil, letter = "RGHT", special = "disabled" } }
background1 = { { coordx = -280, coordy = 140, length = 560, text = " ", boxColour = c_teal, textColour = clut_colour(13, 9), execute = nil, letter = "Select Level", underbox = -145 },
{ coordx = -260, coordy = -205, length = 150, text = "Cancel", boxColour = c_brightYellow, textColour = clut_colour(13, 9), execute = nil, letter = "ESC" },
{ coordx = 110, coordy = -205, length = 150, text = "Begin", boxColour = c_lightGreen, textColour = clut_colour(13, 9), execute = nil, letter = "RTRN" },
{ coordx = -260, coordy = -105, length = 150, text = "Previous", boxColour = c_teal, textColour = clut_colour(13, 9), execute = nil, letter = "LEFT" },
{ coordx = 110, coordy = -105, length = 150, text = "Next", boxColour = c_teal, textColour = clut_colour(13, 9), execute = nil, letter = "RGHT", special = "disabled" } }

background2 = { { coordx = -280, coordy = 175, length = 560, text = " ", boxColour = c_grey, textColour = c_grey, execute = nil, letter = "Mission Analysis", underbox = -200 },
{ coordx = -280, coordy = -225, length = 170, text = "Previous", boxColour = c_grey, textColour = c_grey, execute = nil, letter = "LEFT" },
Expand Down
4 changes: 2 additions & 2 deletions Resources/Scripts/Modes/KeyControls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import('KeyboardControl')

background = { { top = 170, left = -280, bottom = -60, right = 280, boxColour = c_teal },
{ top = -70, left = -280, bottom = -110, right = 280, boxColour = c_rust },
{ coordx = -280, coordy = -205, length = 100, text = "nodraw", boxColour = c_brightYellow, textColour = c_purple, execute = nil, letter = "CANCEL" },
{ coordx = -280, coordy = -205, length = 100, text = "nodraw", boxColour = c_brightYellow, textColour = clut_colour(13, 9), execute = nil, letter = "CANCEL" },
{ coordx = -265, coordy = 170, length = 63, text = "nodraw", boxColour = colour_add(c_teal, c_lighten2), textColour = c_teal, execute = nil, letter = "Ship" },
{ coordx = -177, coordy = 170, length = 93, text = "nodraw", boxColour = c_teal, textColour = c_teal, execute = nil, letter = "Command" },
{ coordx = -54, coordy = 170, length = 95, text = "nodraw", boxColour = c_teal, textColour = c_teal, execute = nil, letter = "Shortcuts" },
{ coordx = 71, coordy = 170, length = 71, text = "nodraw", boxColour = c_teal, textColour = c_teal, execute = nil, letter = "Utility" },
{ coordx = 177, coordy = 170, length = 87, text = "nodraw", boxColour = c_teal, textColour = c_teal, execute = nil, letter = "HotKeys" },
{ coordx = 180, coordy = -205, length = 100, text = "nodraw", boxColour = c_lightGreen, textColour = c_purple, execute = nil, letter = "DONE" } }
{ coordx = 180, coordy = -205, length = 100, text = "nodraw", boxColour = c_lightGreen, textColour = clut_colour(13, 9), execute = nil, letter = "DONE" } }

keyboard_num = 1

Expand Down
20 changes: 10 additions & 10 deletions Resources/Scripts/Modes/Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import('BoxDrawing')

soundLevel = 8
soundMax = 8
background = { { coordx = -280, coordy = 140, length = 560, text = " ", boxColour = c_purple2, textColour = c_purple, execute = nil, letter = "Sound Options", underbox = -85 },
{ coordx = -260, coordy = -30, length = 520, text = " ", boxColour = c_purple2, textColour = c_purple, execute = nil, letter = "VOLUME", underbox = -75 },
{ coordx = 110, coordy = 20, length = 150, text = "nodraw", boxColour = c_purple2, textColour = c_purple, execute = nil, letter = "Volume Down" },
{ coordx = 110, coordy = 100, length = 150, text = "nodraw", boxColour = c_purple2, textColour = c_purple, execute = nil, letter = "Volume Up" },
{ coordx = -245, coordy = 100, length = 250, text = "nodraw", boxColour = c_purpleBlue, textColour = c_purple, execute = nil, letter = "Music During Action", radio = "off" },
{ coordx = -245, coordy = 60, length = 250, text = "nodraw", boxColour = c_purpleBlue, textColour = c_purple, execute = nil, letter = "Music During Interlude", radio = "off" },
{ coordx = -245, coordy = 20, length = 250, text = "nodraw", boxColour = c_lightBlue4, textColour = c_purple, execute = nil, letter = "Speak Network Messages", radio = "off" },
{ coordx = -260, coordy = -205, length = 150, text = "Cancel", boxColour = c_brightYellow, textColour = c_purple, execute = nil, letter = "ESC" },
{ coordx = 110, coordy = -205, length = 150, text = "Done", boxColour = c_lightGreen, textColour = c_purple, execute = nil, letter = "RTRN" },
{ coordx = 110, coordy = -145, length = 150, text = "Key Controls", boxColour = c_teal, textColour = c_purple, execute = nil, letter = "K" } }
background = { { coordx = -280, coordy = 140, length = 560, text = " ", boxColour = c_purple2, textColour = clut_colour(13, 9), execute = nil, letter = "Sound Options", underbox = -85 },
{ coordx = -260, coordy = -30, length = 520, text = " ", boxColour = c_purple2, textColour = clut_colour(13, 9), execute = nil, letter = "VOLUME", underbox = -75 },
{ coordx = 110, coordy = 20, length = 150, text = "nodraw", boxColour = c_purple2, textColour = clut_colour(13, 9), execute = nil, letter = "Volume Down" },
{ coordx = 110, coordy = 100, length = 150, text = "nodraw", boxColour = c_purple2, textColour = clut_colour(13, 9), execute = nil, letter = "Volume Up" },
{ coordx = -245, coordy = 100, length = 250, text = "nodraw", boxColour = c_purpleBlue, textColour = clut_colour(13, 9), execute = nil, letter = "Music During Action", radio = "off" },
{ coordx = -245, coordy = 60, length = 250, text = "nodraw", boxColour = c_purpleBlue, textColour = clut_colour(13, 9), execute = nil, letter = "Music During Interlude", radio = "off" },
{ coordx = -245, coordy = 20, length = 250, text = "nodraw", boxColour = c_lightBlue4, textColour = clut_colour(13, 9), execute = nil, letter = "Speak Network Messages", radio = "off" },
{ coordx = -260, coordy = -205, length = 150, text = "Cancel", boxColour = c_brightYellow, textColour = clut_colour(13, 9), execute = nil, letter = "ESC" },
{ coordx = 110, coordy = -205, length = 150, text = "Done", boxColour = c_lightGreen, textColour = clut_colour(13, 9), execute = nil, letter = "RTRN" },
{ coordx = 110, coordy = -145, length = 150, text = "Key Controls", boxColour = c_teal, textColour = clut_colour(13, 9), execute = nil, letter = "K" } }

function init()
sound.stop_music()
Expand Down
4 changes: 1 addition & 3 deletions Resources/Scripts/Modules/ColourHandle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ c_brightYellow = { r = 0.7, g = 0.7, b = 0.0, a = 1.0 }
c_darkYellow = { r = 0.1, g = 0.1, b = 0.0, a = 1.0 }

--PURPLE
c_lightPurple = { r = 0.8, g = 0.5, b = 0.7, a = 1.0 }
c_purple = { r = 0.7, g = 0.4, b = 0.6, a = 1.0 }
c_purple2 = { r = 0.6, g = 0.3, b = 0.5, a = 1.0 }
c_purple2 = { r = 0.7, g = 0.4, b = 0.6, a = 1.0 }
c_purpleBlue = { r = 0.4, g = 0.2, b = 0.5, a = 1.0 }
c_darkPurple = { r = 0.3, g = 0.0, b = 0.2, a = 1.0 }

Expand Down
18 changes: 9 additions & 9 deletions Resources/Scripts/Modules/Interfaces.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function messages()
end

function mission_status()
menu_level = { "BRIEFING",
menu_level = { "MISSION STATUS",
{ scen.briefing, false } }
end

Expand Down Expand Up @@ -379,14 +379,14 @@ function drawPanels()
-- Factory build bar (purple)
planet = scen.planet
if planet ~= nil then
graphics.draw_line(382, 181, 392, 181, 0.5, c_purple)
graphics.draw_line(382, 181, 382, 177, 0.5, c_purple)
graphics.draw_line(392, 177, 392, 181, 0.5, c_purple)
graphics.draw_line(382, 159, 392, 159, 0.5, c_purple)
graphics.draw_line(382, 163, 382, 159, 0.5, c_purple)
graphics.draw_line(392, 159, 392, 163, 0.5, c_purple)
graphics.draw_box(179, 384, 161, 390, 0, c_purple)
graphics.draw_box(18 * (100 - planet.buildqueue.percent) / 100 + 161, 384, 161, 390, 0, c_lightPurple)
graphics.draw_line(382, 181, 392, 181, 0.5, clut_colour(13, 9))
graphics.draw_line(382, 181, 382, 177, 0.5, clut_colour(13, 9))
graphics.draw_line(392, 177, 392, 181, 0.5, clut_colour(13, 9))
graphics.draw_line(382, 159, 392, 159, 0.5, clut_colour(13, 9))
graphics.draw_line(382, 163, 382, 159, 0.5, clut_colour(13, 9))
graphics.draw_line(392, 159, 392, 163, 0.5, clut_colour(13, 9))
graphics.draw_box(179, 384, 161, 390, 0, clut_colour(13, 9))
graphics.draw_box(18 * (100 - planet.buildqueue.percent) / 100 + 161, 384, 161, 390, 0, clut_colour(13, 5))
end

--[[------------------
Expand Down

0 comments on commit 2c9874b

Please sign in to comment.