Skip to content

[gui] Various GUI fixes and improvements - #359

Open
vrifftech wants to merge 19 commits into
modawan:masterfrom
vrifftech:master
Open

vrifftech wants to merge 19 commits into
modawan:masterfrom
vrifftech:master

Conversation

@vrifftech

@vrifftech vrifftech commented Oct 24, 2026 •

Copy link
Copy Markdown

Cleaned up a lot of the GUIs that are going to be used in a later skills PR, and several of the GUIs involved in feats/force powers/level up as to polish everything touching combat.

  • Computer panel:

    • it shows the leader's Computer Use and Repair totals and the party's spikes and repair parts, with KotOR's icons;
    • the terminal hum plays while it's up;
    • KotOR takes its frame and backdrop from comptypes.2da, with the static bands drawn at 40%.
  • Conversations:

    • an entry is shown before its scripts run, and its replies are listed when it ends;
    • Return, keypad Enter, a click, the number keys and the arrow keys skip and choose replies;
    • a skip asked for while paused is honoured on the next update;
    • TSL's alien voices come from alienvo.2da and emotion.2da;
    • one-liners play their line's sound, and text shows with subtitles off unless a voice-over alone speaks it.
  • Experience:

    • the experience a level needs comes from exptable.2da, read unsigned;
    • it decides when a level-up is due, TSL's G_PC_LEVEL, the level-up notice and the character sheet, which hides the amount at the maximum level;
    • adding experience never lowers it;
    • the HUD portrait opens the character sheet while a level-up is due;
    • TSL runs k_level_dlg after a status summary;
  • GUI pulse: one shared pulse, advanced in real time, drives pulsing frames, fills and text. It covers:

    • selected buttons;
    • the abilities rows and the chart nodes;
    • character creation's current step;
    • the pause prompt;
    • the character sheet's level-up buttons;
    • the map's party arrow.

    Each border has one opacity, which the pulse replaces.

- the leader's Computer Use and Repair totals and the party's computer
  spikes and repair parts, written once per entry, when its replies are
  listed;
- the two skill names from skills.2da, and in KotOR their icons;
- the terminal hum, computer_lp_04, looping at 30 of 127 while the panel
  is up and stopping for a camera shot;
- in KotOR, the panel frame from comptypes.2da by the dialogue's
  ComputerType, and the four static bands drawn at 40% opacity instead
  of hidden.
row = level, read as 32 unsigned bits and compared unsigned. It decides
when a level-up is due, how far the experience reaches (TSL's
G_PC_LEVEL, the auto level-up), the level-up notice and the character
sheet, which hides the amount at the title's maximum level.
AddMultiClass's award counts, in KotOR, up to the first row the
experience falls short of, from the first row; in TSL from the levels
taken.

Adding experience never lowers it: a negative amount, or one that would pass
the most an int holds, changes nothing, so a TSL companion made a Jedi
while a level-up is due keeps its experience and only its joining
experience drops.

The controlled character's HUD portrait opens the character sheet while
a level-up is due, the equipment otherwise
opacity of pulsing frames, fills and texts, as layouts and screens ask.
The abilities screen's selected skill row pulses as in each game, and
the charts' chosen node pulses alone on the shared pulse.
…both

  titles): PARTLY FIXED. Conversation::loadEntry lists the replies after
  runScripts. Left: the game lists replies when the entry's delay ends,
  and presents the entry before its scripts (recorded in the log).
- modawan#2 the computer panel's numbers: FIXED. Written when the message is
  set and again when the replies are listed, after the entry's scripts.
- modawan#10 comptypes.2da: FIXED. Looked up at each conversation start; a
  missing or empty table leaves the frame and type unchanged.
- modawan#11 KotOR's backdrop: FIXED. comp<N> from the clamped computer type
  (one BackgroundType::Computer with a number).
- modawan#12 no hum for a KotOR computer one-liner: FIXED. The panel starts
  hidden; the hum starts when it shows.
…mount at the

  leader's level up to and including the cap, shows it unless it is
  0xFFFFFFFF, and prints it signed; isLevelUpPending keeps its own cap test.
- modawan#7 FIXED: giveXP caps the lagging classes at five (nothing kept) and
  refuses only a positive addition past the most experience, including on a
  total held past it; SetXP ignores a negative amount and compares unsigned.
- modawan#8 FIXED: IsPC is kept as the record's byte; potentialLevel walks the
  table only when it is exactly 1, else gives getSpellLevel(false), so TSL's
  G_PC_LEVEL follows.
… pulses, and

  an ImageButton's where the GUI says so (TSL: every GUI, the HUD and the
  save-name box). The abilities rows' per-screen call is gone. The colour
  part (TSL COLOR_NEW_HIGHLIGHT, K1 label-hilights keeping theirs) stays
  with PR 12's hilight text colour; K1 buttons are already yellow.
- modawan#14 FIXED: deselecting such a control stops its text's pulse, except a
  list's prototype, which is reselected for every row.
- modawan#17 FIXED: setHilightPulsing leaves a control without a hilight alone.
- modawan#9 FIXED: one alpha per border; _borderFillOpacity is gone, the HUD's
  idle queue slot sets the border alpha, and a pulse replaces it.
- modawan#13 FIXED: a progress bar's PROGRESS is a border; its fill pulses as
  authored.
- modawan#15 FIXED: the pulse clock ticks after the death sequence, at its time
  scale.
- modawan#5 FIXED: the map screen's party arrow is drawn at the pulsing alpha;
  the minimap's stays steady.
- modawan#4 FIXED: the current chargen/level-up step's number and name pulse, and
  pulse again when the steps panel returns; chargen points rows pulse
  while hovered; the pause reason and prompt pulse; the character sheet's
  level-up buttons pulse until first left. The difficulty text is a
  Button, so modawan#3 covers it.
…and,

  with the replies listed, choose the selected reply (the first row as
  they are listed) with the click sound; a left button press skips. Both
  panels and the computer camera shot, both titles. The camera overlay
  has no input of its own any more (no LBL_RETURN click, no Escape).
  The gamepad accept event stays with the deferred gamepad row.
- TSL alien voices: FIXED. TSL nodes take their sound from emotion.2da
  and alienvo.2da by AlienRaceNode/AlienRaceOwner and Emotion, never from
  the Sound field; such a sound is voiced and plays with a variation
  number drawn per conversation from a walk seeded by the dialog's name
  (one-liners take 1 to 3 at random).
- A skip during pause: FIXED. A skip is asked for paused or not, and the
  next update that runs the conversation honours it if the entry can be
  skipped then; every skip goes through this path.
ran out at the next refill, unless it was stopped or is paused: a source
paused for a movie, or created paused, is left for resume().
of picture; a movie finished before it is ever updated plays no sound.
authors it, and moved by as much as the box moves.
…Close

buttons. The back button now takes the labels and Equip is shown only
over a slot's items; its click no longer closes the screen.
  text of a reply taken without a choice, is shown.
- A reply is taken only by a place below the number listed (20 in
  KotOR, 30 in TSL): none while an entry shows, none past the last.
  The number keys test the same count.
- A closed conversation keeps no replies.
to its end over the menu or the game, with the sounds the movie had held
let go beneath it.

Finishing a movie stops its sound too. A movie that ends by itself
leaves its sound to end on its own, as before.
off the battle music, the pending restart and the ambient loop before
arrival too, and leaves the music to start on arrival.
whole, looping by the source's own flag, so its playback runs on the
device's clock whatever the main loop does; a clip that changes format
part-way is still streamed. A source can also be set to loop or not
after it starts.
menu music stops. Nothing starts while the load's transition movies are
listed; music that is there is resumed; else the set track starts,
looping, in the streamed music group. A movie holds it, as it holds
every sound but its own.
creature or placeable playing an animation authored in world space (the
cut bands from 1200 and from 1600) takes no other animation: no pose,
script animation, one-shot, overlay, flinch, return to its loop or
state-driven refresh. It keeps the clip, and its last frame once a
one-shot has run, until the conversation's animation list gives it a new
animation or releases it, or the cutscene closes. The game refuses every
animation request in that state and clears the hold only from the
dialog's animation lists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant