# HG changeset patch # User Wuzzy # Date 1518383512 -3600 # Node ID 4772eb3c9929f2b2fe5410b5ee1670cb43abd7a9 # Parent 6d328f116044a3e68c754e43f716abf59f1f153e HedgeEditor: Tweak caption colors diff -r 6d328f116044 -r 4772eb3c9929 ChangeLog.txt --- a/ChangeLog.txt Sun Feb 11 20:39:39 2018 +0100 +++ b/ChangeLog.txt Sun Feb 11 22:11:52 2018 +0100 @@ -21,7 +21,6 @@ + Construction Mode: Show selected object at cursor and a crate preview icon + Construction Mode: Remember all selections + Construction Mode: Add subtle glow to healing station - + Construction Mode: Change message colors + Construction Mode: Allow to change "Switch Hedgehog" in weapon scheme + Construction Mode: Hide selected sub-modes from crate/object placer from enemies over the net + Racer, Tech Racer: First waypoint flashes before the hog starts moving diff -r 6d328f116044 -r 4772eb3c9929 share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua Sun Feb 11 20:39:39 2018 +0100 +++ b/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua Sun Feb 11 22:11:52 2018 +0100 @@ -253,15 +253,18 @@ HedgewarsScriptLoad("/Scripts/Params.lua") HedgewarsScriptLoad("/Scripts/TechMaps.lua") --- experimental crap ---local destroyMap = false - -- Fake ammo type for the gear placement tool local amCMGearPlacementTool = amAirAttack -- Special frames in Ammos.png/Ammos_bw.png local ammoFrameAirAttack = 63 +-- Caption colors +local colorErrorMessage = 0xFFFFFFFF +local colorInfoMessage = 0xFFFFFFFF +local colorPlaceMode1 = 0xFFBA00FF -- Main placement mode +local colorPlaceMode2 = 0xFFDE85FF -- Secondary mode + ----------------------------------------- -- tracking vars for save/load purposes ----------------------------------------- @@ -1186,9 +1189,9 @@ elseif pMode[pIndex] == loc("Deletion Mode") then sGear = GetClosestGear() if (sGear == nil) then - AddCaption(loc("Please click on a gear."),0xffba00ff,capgrpVolume) + AddCaption(loc("Please click on a gear."), colorErrorMessage, capgrpVolume) elseif (GetGearType(sGear) == gtHedgehog) then - AddCaption(loc("Hedgehogs can not be deleted."),0xffba00ff,capgrpVolume) + AddCaption(loc("Hedgehogs can not be deleted."), colorErrorMessage, capgrpVolume) else DeleteGear(sGear) end @@ -1205,7 +1208,7 @@ SetTeamIdentity(sGear) end else - AddCaption(loc("Please click on a hedgehog."),0xffba00ff,capgrpVolume) + AddCaption(loc("Please click on a hedgehog."), colorErrorMessage, capgrpVolume) end @@ -1237,7 +1240,7 @@ SetGearValues(sGear, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36 - newHealth) end else - AddCaption(loc("Please click on a hedgehog, barrel, health crate or dud mine."),0xffba00ff,capgrpVolume) + AddCaption(loc("Please click on a hedgehog, barrel, health crate or dud mine."), colorErrorMessage, capgrpVolume) end elseif cat[cIndex] == loc("Sprite Modification Mode") then @@ -1271,7 +1274,7 @@ if GetGearType(sGear) == gtCase then setGearValue(sGear, "tag","collection") else - AddCaption(loc("Please click on a crate."),0xffba00ff,capgrpVolume) + AddCaption(loc("Please click on a crate."), colorErrorMessage, capgrpVolume) end else if pMode[pIndex] == loc("Victory Condition: Destroy") then @@ -2353,7 +2356,7 @@ WriteLnToConsole("------ END GENERATED SCRIPT ------") - AddCaption(loc("Level Data Saved!")) + AddCaption(loc("Level Data Saved!"), colorInfoMessage, capgrpGameState) end @@ -2934,10 +2937,10 @@ -- update display selection criteria if (curWep == amGirder) or (curWep == amRubber) or (curWep == amCMGearPlacementTool) then - AddCaption(cat[cIndex],0xffba00ff,capgrpMessage) + AddCaption(cat[cIndex], colorPlaceMode1, capgrpMessage) showSecondaryMessage() if superDelete == true then - AddCaption(loc("Deletition Mode"),0xffba00ff,capgrpAmmoinfo) + AddCaption(loc("Deletition Mode"), colorPlaceMode1, capgrpAmmoinfo) end end @@ -3130,25 +3133,25 @@ elseif (commandMode() == true) and (s == 2) then if GetAmmoCount(CurrentHedgehog, amCMGearPlacementTool) == 100 then SetEditingWeps(0) - AddCaption(loc("The editor weapons and tools have been removed!")) + AddCaption(loc("The editor weapons and tools have been removed!"), colorInfoMessage, capgrpGameState) else SetEditingWeps(100) - AddCaption(loc("The editor weapons and tools have been added!")) + AddCaption(loc("The editor weapons and tools have been added!"), colorInfoMessage, capgrpGameState) end elseif (preciseOn == true) and (s == 1) then helpDisabled = not(helpDisabled) if helpDisabled then - AddCaption(loc("Help Disabled"),0xffba00ff,capgrpVolume) + AddCaption(loc("Help Disabled"), colorInfoMessage, capgrpVolume) else - AddCaption(loc("Help Enabled"),0xffba00ff,capgrpVolume) + AddCaption(loc("Help Enabled"), colorInfoMessage, capgrpVolume) end updateHelp() elseif (preciseOn == true) and (s == 3) then showGearTags = not(showGearTags) if showGearTags then - AddCaption(loc("Gear information shown"),0xffba00ff,capgrpVolume) + AddCaption(loc("Gear information shown"), colorInfoMessage, capgrpVolume) else - AddCaption(loc("Gear information hidden"),0xffba00ff,capgrpVolume) + AddCaption(loc("Gear information hidden"), colorInfoMessage, capgrpVolume) end elseif (cat[cIndex] == loc("Sprite Placement Mode")) or (cat[cIndex] == loc("Girder Placement Mode")) or (cat[cIndex] == loc("Rubber Placement Mode")) or (cat[cIndex] == loc("Sprite Modification Mode")) then @@ -3156,22 +3159,22 @@ if (cat[cIndex] == loc("Rubber Placement Mode")) then if s == 1 then landType = lfBouncy - AddCaption(loc("Bouncy Land"),0xffba00ff,capgrpAmmoinfo) + AddCaption(loc("Bouncy Land"), colorPlaceMode1, capgrpAmmoinfo) elseif s == 5 then superDelete = true end elseif s == 1 then landType = 0 - AddCaption(loc("Normal Land"),0xffba00ff,capgrpAmmoinfo) + AddCaption(loc("Normal Land"), colorPlaceMode1, capgrpAmmoinfo) elseif s == 2 then landType = lfIndestructible - AddCaption(loc("Indestructible Land"),0xffba00ff,capgrpAmmoinfo) + AddCaption(loc("Indestructible Land"), colorPlaceMode1, capgrpAmmoinfo) elseif s == 3 then landType = lfIce - AddCaption(loc("Icy Land"),0xffba00ff,capgrpAmmoinfo) + AddCaption(loc("Icy Land"), colorPlaceMode1, capgrpAmmoinfo) elseif (s == 4) then landType = lfBouncy - AddCaption(loc("Bouncy Land"),0xffba00ff,capgrpAmmoinfo) + AddCaption(loc("Bouncy Land"), colorPlaceMode1, capgrpAmmoinfo) elseif (s == 5) and (cat[cIndex] ~= loc("Sprite Modification Mode")) and (cat[cIndex] ~= loc("Sprite Placement Mode")) then superDelete = true end @@ -3222,7 +3225,7 @@ else caption2 = tostring(pMode[pIndex]) end - AddCaption(caption2, 0xffba00ff, capgrpMessage2) + AddCaption(caption2, colorPlaceMode2, capgrpMessage2) end ---------------------------------------------------------------