Uu now i get what you mean and what you are trying to achieve
To answer your 1st question
You need to have have your map and all that indicators and crap on layer which is below on the list of layer of your UI layer
By ui layer i mean in your 1st post you pasted screenshot
You have there black background that covers everything and just have cut out box for map
So layer with that black background need to be above layer of map and eventually layer with any kind of indicator
So if you look on layer list it should be
UI
Markers
Indicators
StarMap
In this order
And now when you use drag actions in events you simply need to add action for each layer you want to move
To answer your 2nd question
There are 2 things you need to do
1 - There is condition camera X position and same for Y
Now for you to understand
Value of X which is - means more to the left so -10 means move 10 pixels to the left
While +10 will mean move 10 pixels to the right
Now for Y - means go up + go down
Armed with that knowledge you add conditions to event where you drag camera
Camera X position is higher than > SOME VALUE
Camera X position is lower than < SOME VALUE
And same for Y
And now you need to find these values
You are looking for value on the right side so it will be higher than + something
Looking for lower than you are looking for - value on the left
This way you are checking if camera X is between some X position and not outside of it
IF you do the same for Y you created virtual box in which camera will be able to be dragged
Meaning if you drag your camera outside of that virtual box you will stop dragging from working
2nd thing
Using same values or little closer to center value by let’s say 5 or 10 pixels (just for example)
You do like
Condition
Camera X position is lower than < X - some value (checking if camera is moved too far to the left)
In action you change camera position to X add + 20 for example
This way if you move camera too far to the left it will be moved back to the right 20 pixels enabling again camera dragging
Now you do another event (for each side here you need separate event)
Condition
Camera X position is higher than > X + some value
Action
Change camera X position - Subtract 20
And you repeat process for Y
Basically you invert here checking higher than > and < lower than to what i wrote in 1st point of this post
Because in there you were creating virtual box inside which camera will be allowed to be dragged
Here you check OUTSIDE of this box if camera went outside of that virtual box and do your movement logic to it
For you to have easy time
- DO NOT do all sides all at once
Prepare events for one side then test it and if it work you move to preparing events for next side
- Start with stoping camera events
Once you got that right you can use same values for moving camera back inside virtual box
- If you FOR EXAMPLE stop camera on X -1000 (meaning it is too far to the left)
You use that -1000 for your change camera position event
But i would suggest instead of going
Conditon
Camera X position is lower than < X-1000
Going with X-995
For example so you leave yourself some extra space before you hit dead end
Then in action change camera X position +add 10 or 20
And that 10 or 20 needs to be higher number than difference between where you turn of camera dragging and camera position check for moving it back into virtual box
- In this case it is 5 since -1000 and -995
IDK what would be better here 10 or 20 maybe even 7 would be good for your
You need to find your numbers yourself
I simply described logic for you and i hope you get all that
- I intentionally typed it in words and signs and double checked if i am correct on each part
Higher than is >
Lower than is <
Do not mess it up or you will not get it working
Or simply like i said do one side at a time and then you can mix > or <
It is like either option A or option B will work so you can only make mistake once for each side
And as my last words trust me
Most important thing here
ONE THING AT A TIME then test if it works or not