Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95.1a is out! (12/10/21); Blog post: Hyperspace Topography (10/12/22)

Pages: 1 ... 624 625 [626]

Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 1399022 times)

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20990
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9375 on: November 29, 2022, 12:38:31 PM »

Not sure if a bug or just a consequence of tampering where one does not belong, but here's what I've encountered:

I decided to swap a grid layout in ability tooltip with tables, as I could not achieve desired precision of column alignment with grids (had to use spaces for adjustments, which was not pleasant), and after making the replacement I found out that tables produce a constant sound of mousing-over whenever I do actually mouse over them. My guess was that it was due to the tooltip constantly re-rendering, and tables are created by default without said re-rendering in mind.

Precisely speaking, each created row is in some way a Button, therefore at creation it is assigned setMouseOverSound("ui_button_mouseover"). Initially I thought the UITable instance is responsible for this behaviour, and tried to call setItemsSelectable() on it, but it turned out to be false. In the end, with the help of kind Viravain and Lyravega I was able to fix this behaviour by calling setMouseOverSound(null) on each row, but it's not exactly an optimal or easiest solution.

Perhaps an argument could be added to beginTable() in TooltipMakerAPI to have the rows created be without mouse-over sound? Of course hardly any modder finds himself with an urge to shove a table in his ability tooltip, I understand, and it does seem like a bit of work to implement...

Had a quick look - easy enough to add a check that should (I think) fixed this, but, I'm confused: if this is a tooltip of the sort that gets recreated every frame, then how are you mousing over the table without the mouse movement hiding the tooltip?

question
is planet renderer obfuscated? or i just simply can't find where it is?
i always assumed it's obfuscated, but then i stumbled on the corona renderer, which is actually exposed, so ehhhhhhhhhhh
can i have some concrete answer ?
i mean the whole thing that renders the 3d object ball with texture. can it be called somehow without creating a new sector entity? just for pure visuals?

It's obfuscated, sorry! I don't think there's an easy way to render it.
Logged

passwalker

  • Commander
  • ***
  • Posts: 176
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9376 on: November 29, 2022, 09:58:02 PM »

is there some hidden trick with fighters' engine controller?
i'm running a code to get where the fighter is trying to accelerate, but it is only returning accurate value for what seems to be the wing leader(?), and for other fighters in wing it returns 0, meaning none of the checks are ever true
Spoiler
Code
public static float getEngineAccelerationDirection(ShipAPI ship){
            float result=0;

            ShipEngineControllerAPI eng = ship.getEngineController();
            if(eng.isAccelerating()){result=ship.getFacing();}
            if(eng.isAcceleratingBackwards()){result=ship.getFacing()+180f;}
            if(eng.isStrafingLeft()){result=ship.getFacing()+90f;}
            if(eng.isStrafingRight()){result=ship.getFacing()-90f;}
            if(eng.isAccelerating()&&eng.isStrafingLeft()){result=ship.getFacing()+45f;}
            if(eng.isAccelerating()&&eng.isStrafingRight()){result=ship.getFacing()-45f;}
            if(eng.isAcceleratingBackwards()&&eng.isStrafingLeft()){result=ship.getFacing()+135f;}
            if(eng.isAcceleratingBackwards()&&eng.isStrafingRight()){result=ship.getFacing()-135f;}

            if(eng.isDecelerating()){result=VectorUtils.getFacing(ship.getVelocity())+180f;}

            return result;
        }
[close]
Logged
Any and ALL sprites i ever posted on this forum are FREE to use. even if i'm using them myself. Don't ever, EVER ask for permission, or i will come to your home and EAT YOUR DOG!!!
i do NOT want to see my name appear in the credits section of any published mod and will consider it a personal insult.

Ontheheavens

  • Ensign
  • *
  • Posts: 16
    • View Profile

Had a quick look - easy enough to add a check that should (I think) fixed this, but, I'm confused: if this is a tooltip of the sort that gets recreated every frame, then how are you mousing over the table without the mouse movement hiding the tooltip?

Ah, it's the same behaviour as with vanilla tooltips for sensor range and sensor profile: once the tooltip goes expanded, tooltip area encompasses mouse cursor and the tooltip does not go away until mouse is outside it.

Edit:
One more thing I wanted to ask: is there any way to pass text with images or just images as arguments for addRow for tables? What I want to do is something like vanilla table for commodity market shares, where there are images freely intermingled with text.
« Last Edit: Today at 05:39:18 AM by Ontheheavens »
Logged
Pages: 1 ... 624 625 [626]