Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements system to customize the mouse cursor type properties. #1000

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

CCHyper
Copy link
Contributor

@CCHyper CCHyper commented Mar 28, 2023

Closes #999

This pull request implements a new system to customize the mouse cursor type properties. Loading of a new INI has been where these properties can be adjusted, if the INI is not present, the game will default to the normal hardcoded mouse type properties.

The following is the MOUSE.INI that should be used;

;============================================================================
; MOUSE.INI
;
; This control file is used to control the frames and rates of the various
; mouse pointers.
;
; $Author: $
; $Archive: $
; $Modtime: $
; $Revision: $
;============================================================================


; ******* Mouse List *******
; Lists the mouse types in this control file. Each mouse pointer is given a
; unique (internal only) identifier name, these can not be renamed or removed!
;
; FORMAT;
;   <StartFrame>,<FrameCount>,<FrameRate>,<SmallFrame>,<SmallFrameCount>,<SmallFrameRate>,<HotspotX>,<HotspotY>
;
;   A hotspot value can either be an integer value (ranged between the negative value of the width/height
;   of the shape frame, and the positive value of the width/height of the shape frame), or one of the
;   following hotspot types;
;      HotspotX = left, center, right
;      HotspotY = top, middle, bottom
;
; NOTE: 
;   A SmallFrame value of "-1" means it will use the normal pointer when
;   the mouse is over the radar panel.

[MouseTypes]
Normal=0,1,0,1,1,0,left,top
ScrollN=2,1,0,-1,1,0,center,top
ScrollNE=3,1,0,-1,1,0,right,top
ScrollE=4,1,0,-1,1,0,right,middle
ScrollSE=5,1,0,-1,1,0,right,bottom
ScrollS=6,1,0,-1,1,0,center,bottom
ScrollSW=7,1,0,-1,1,0,left,bottom
ScrollW=8,1,0,-1,1,0,left,middle
ScrollNW=9,1,0,-1,1,0,left,top
NoScrollN=10,1,0,-1,1,0,center,top
NoScrollNE=11,1,0,-1,1,0,right,top
NoScrollE=12,1,0,-1,1,0,right,middle
NoScrollSE=13,1,0,-1,1,0,right,bottom
NoScrollS=14,1,0,-1,1,0,center,bottom
NoScrollSW=15,1,0,-1,1,0,left,bottom
NoScrollW=16,1,0,-1,1,0,left,middle
NoScrollNW=17,1,0,-1,1,0,left,top
CanSelect=18,13,4,-1,13,4,center,middle
CanMove=31,10,4,42,10,4,center,middle
NoMove=41,1,0,52,1,0,center,middle
StayAttack=53,5,4,63,5,4,center,middle
CanAttack=58,5,4,63,5,4,center,middle
AreaGuard=68,5,4,73,5,4,center,middle
Tote=78,10,4,-1,10,4,center,middle
NoTote=88,1,0,-1,1,0,center,middle
Enter=89,10,4,100,10,4,center,middle
NoEnter=99,1,0,63,1,0,center,middle
Deploy=110,9,4,-1,9,4,center,middle
NoDeploy=119,1,0,-1,1,0,center,middle
Undeploy=120,9,4,-1,9,4,center,middle
Sell=129,10,4,-1,10,4,center,middle
SellUnit=139,10,4,-1,10,4,center,middle
NoSell=149,1,0,-1,1,0,center,middle
GRepair=150,20,4,-1,20,4,center,middle
Repair=170,20,4,-1,20,4,center,middle
NoRepair=190,1,0,-1,1,0,center,middle
Waypoint=191,10,4,-1,10,4,center,middle
PlaceWaypoint=201,10,4,-1,10,4,center,middle
NoPlaceWaypoint=211,1,0,-1,1,0,center,middle
SelectWaypoint=212,7,4,-1,7,4,center,middle
EnterWaypointMode=219,10,4,-1,10,4,center,middle
FollowWaypoint=229,10,4,-1,10,4,center,middle
ToteWaypoint=239,10,4,-1,10,4,center,middle
RepairWaypoint=249,10,4,-1,10,4,center,middle
AttackWaypoint=259,10,4,-1,10,4,center,middle
EnterWaypoint=269,10,4,-1,10,4,center,middle
LoopWaypointPath=356,1,0,-1,1,0,center,middle
AirStrike=279,20,4,-1,20,4,center,middle               ; Ion Cannon
ChemBomb=299,10,4,-1,10,4,center,middle
Demolitions=309,10,4,-1,10,4,center,middle
NuclearBomb=319,10,4,-1,10,4,center,middle
TogglePower=329,16,2,-1,16,2,center,middle
NoTogglePower=345,1,0,-1,1,0,center,middle
Heal=346,10,4,42,10,4,center,middle
EMPulse=357,20,3,-1,20,3,center,middle
EMPulseRange=377,1,0,-1,1,0,center,middle
ScrollCoast=378,1,0,-1,1,0,center,middle
ScrollCoastN=379,1,0,-1,1,0,center,middle
ScrollCoastNE=380,1,0,-1,1,0,center,middle
ScrollCoastE=381,1,0,-1,1,0,center,middle
ScrollCoastSE=382,1,0,-1,1,0,center,middle
ScrollCoastS=383,1,0,-1,1,0,center,middle
ScrollCoastSW=384,1,0,-1,1,0,center,middle
ScrollCoastW=385,1,0,-1,1,0,center,middle
ScrollCoastNW=386,1,0,-1,1,0,center,middle
PatrolWaypoint=387,10,4,-1,10,4,center,middle

NOTE: All entries must be present in the INI, otherwise loading of the INI will fail!

@CCHyper CCHyper added the new-feature New feature or request. label Mar 28, 2023
@CCHyper CCHyper requested a review from a team March 28, 2023 19:25
@github-actions
Copy link

github-actions bot commented Mar 28, 2023

This comment is automaticly generated by Nightly.link and allows non-registered users to get download the artifacts for this pull request.

These links are also updated when the pull request is pushed to.

@CCHyper CCHyper self-assigned this Mar 28, 2023
@CCHyper CCHyper force-pushed the feature/mouse-cursors branch 3 times, most recently from 47dd248 to e6af600 Compare March 29, 2023 11:47
@Longshanks1
Copy link

Tested with Freeware TS and TS Client. Did not test every cursor on the list, but the ones I checked did work correctly. I did have two issues however. If you move the HotSpotX or Y locations for the Normal cursor, the game will crash on starting up. Also, the locations seem to be inverted, as I moved the Deploy cursor to left bottom and it showed up in top right

@CCHyper CCHyper force-pushed the feature/mouse-cursors branch 5 times, most recently from 17d842b to 3401a2e Compare February 5, 2024 01:40
@CCHyper CCHyper force-pushed the feature/mouse-cursors branch 3 times, most recently from 7cd63f3 to 1ec6234 Compare February 5, 2024 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New feature or request.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

[New Feature] Customize the mouse cursor type properties.
2 participants