Skip to content

Commit

Permalink
Added config to disable transparent UI, fixed get items menu, added v…
Browse files Browse the repository at this point in the history
…ersion to SDL title screen
  • Loading branch information
jwvhewitt committed Apr 3, 2016
1 parent 8b82c7b commit d3e0fcd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions backpack.pp
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ implementation
Procedure GetItemRedraw;
begin
SDLCombatDisplay( InfoGB );
InfoBox( ZONE_CenterMenu.GetRect() );
{DisplayGearInfo( InfoGear , InfoGB );}
end;
{$ENDIF}
Expand All @@ -586,7 +587,11 @@ implementation
{ pick one. }
end else if N > 1 then begin
DialogMsg( MsgString( 'GET_WHICH_ITEM?' ) );
{$IFDEF SDLMODE}
RPM := CreateRPGMenu( MenuItem , MenuSelect , ZONE_CenterMenu );
{$ELSE}
RPM := CreateRPGMenu( MenuItem , MenuSelect , ZONE_Menu );
{$ENDIF}
for t := 1 to N do begin
AddRPGMenuItem( RPM , GearName( GetVisibleItemAtSpot( GB , X , Y , T ) ) , T );
end;
Expand Down
3 changes: 2 additions & 1 deletion gharena.pas
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{$ENDIF}

const
Version = '1.201';
Version = '1.300';

var
RPM: RPGMenuPtr;
Expand All @@ -51,6 +51,7 @@
RedrawOpening();
InfoBox( ZONE_TitleScreenMenu.GetRect() );
DrawSprite( MyLogo, ZONE_TitleScreenLogo.GetRect(), 0 );
QuickTinyText( Version, ZONE_TitleScreenVersion.GetRect(), BrightYellow );
end;
{$ENDIF}

Expand Down
3 changes: 2 additions & 1 deletion sdlgfx.pp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ interface

ZONE_TitleScreenMenu: DynamicRect = ( dx:-100; dy:50; w:200; h:100; anchor: ANC_middle );
ZONE_TitleScreenLogo: DynamicRect = ( dx:-250; dy:-190; w:500; h:215; anchor: ANC_middle );
ZONE_TitleScreenVersion: DynamicRect = ( dx:-50; dy:-25; w:100; h:20; anchor: ANC_lowerright );

ZONE_TargetInfo: DynamicRect = ( dx: -Right_Column_Width -10 ; dy:10; w:Right_Column_Width; h:150; anchor: ANC_upperright );
ZONE_TargetDistance: DynamicRect = ( dx: -Right_Column_Width -10 ; dy:176; w:Right_Column_Width; h:20; anchor: ANC_upperright );
Expand Down Expand Up @@ -1488,7 +1489,7 @@ initialization
Infobox_Border := ConfirmSprite( 'sys_boxborder.png' , '', 8 , 8 );
Infobox_Backdrop := ConfirmSprite( 'sys_boxbackdrop.png' , '', 16 , 16 );

SDL_SetAlpha( Infobox_Backdrop^.Img , SDL_SRCAlpha , 224 );
if Transparent_Interface then SDL_SetAlpha( Infobox_Backdrop^.Img , SDL_SRCAlpha , 224 );

{ MIX_OpenAudio( MIX_DEFAULT_FREQUENCY , MIX_DEFAULT_FORMAT , MIX_CHANNELS , 4096 );
Music_List := LoadStringList( 'music.cfg' );
Expand Down
4 changes: 4 additions & 0 deletions ui4gh.pp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ interface

Use_Alpha_Blending: Boolean = True;
Alpha_Level: Byte = 135;
Transparent_Interface: Boolean = True;

Names_Above_Heads: Boolean = False;

Expand Down Expand Up @@ -423,6 +424,8 @@ implementation

end else if cmd = 'NOALPHA' then begin
Use_Alpha_Blending := False;
end else if cmd = 'NO_TRANSPARENT_INTERFACE' then begin
Transparent_Interface := False;
end else if cmd = 'ALPHALEVEL' then begin
T := ExtractValue( S );
if T > 255 then T := 255
Expand Down Expand Up @@ -531,6 +534,7 @@ implementation
AddBoolean( 'NAMESON' , Names_Above_Heads );

AddBoolean( 'NOALPHA' , not Use_Alpha_Blending );
AddBoolean( 'NO_TRANSPARENT_INTERFACE' , not Transparent_Interface );
writeln( F, 'ALPHALEVEL ' + BStr( Alpha_Level ) );

writeln( F, 'NUMPLOTS ' + BStr( Max_Plots_Per_Adventure ) );
Expand Down

0 comments on commit d3e0fcd

Please sign in to comment.