(XDK360) XUI Background and fixes

This commit is contained in:
Swizzy 2015-01-13 00:48:26 +01:00
parent 16dd8a9a44
commit ecf655d165
7 changed files with 617 additions and 17 deletions

BIN
media/360/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

View File

@ -8,9 +8,27 @@
<Id>XuiScene1</Id>
<Width>824.000061</Width>
<Height>496.000061</Height>
<Position>226.769989,123.938545,0.000000</Position>
<Position>225.000000,122.000000,0.000000</Position>
<ClassOverride>RetroArchMain</ClassOverride>
</Properties>
<XuiImage>
<Properties>
<Id>XuiBackground</Id>
<Width>1280.000000</Width>
<Height>720.000000</Height>
<Position>-225.000000,-122.000000,0.000000</Position>
<SizeMode>16</SizeMode>
<ImagePath>../background.png</ImagePath>
</Properties>
</XuiImage>
<XuiControl>
<Properties>
<Id>Panel</Id>
<Width>824.000000</Width>
<Height>496.000000</Height>
<Visual>XuiScene_WhitePanel</Visual>
</Properties>
</XuiControl>
<XuiText>
<Properties>
<Id>XuiTxtTitle</Id>
@ -366,6 +384,100 @@
<Visual>XuiButton_two_col</Visual>
</Properties>
</XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>254.000000</Width>
<Height>40.000000</Height>
<Position>7.000000,26.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton_two_col</Visual>
</Properties>
</XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>254.000000</Width>
<Height>40.000000</Height>
<Position>7.000000,26.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton_two_col</Visual>
</Properties>
</XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
</XuiCommonList>
<XuiText>
<Properties>

View File

@ -17956,4 +17956,351 @@
</Timeline>
</Timelines>
</XuiVisual>
<XuiVisual>
<Properties>
<Id>XuiControl_PanelGlow</Id>
<Width>1024.000000</Width>
<Height>516.000000</Height>
</Properties>
<XuiFigure>
<Properties>
<Id>figGlow_BL</Id>
<Width>40.000000</Width>
<Height>40.000000</Height>
<Position>-40.000000,516.000000,0.000000</Position>
<Anchor>9</Anchor>
<Stroke>
<Properties>
<StrokeColor>0xff0f0f80</StrokeColor>
</Properties>
</Stroke>
<Fill>
<Properties>
<FillType>3</FillType>
<FillColor>0xffebebeb</FillColor>
<Gradient>
<Properties>
<Radial>true</Radial>
<NumStops>2</NumStops>
<StopColor index="0">0x64000000</StopColor>
<StopColor index="1">0x00000000</StopColor>
<StopPos index="0">0.000000</StopPos>
<StopPos index="1">1.000000</StopPos>
</Properties>
</Gradient>
<Translation>0.500000,0.500000,0.000000</Translation>
<Rotation>270.000000</Rotation>
</Properties>
</Fill>
<Closed>true</Closed>
<Points>4,0.000000,0.000000,0.000000,0.000000,12.000000,0.000000,0,12.000000,0.000000,12.000000,0.000000,12.000000,12.000000,0,12.000000,12.000000,12.000000,12.000000,0.000000,12.000000,0,0.000000,12.000000,0.000000,12.000000,0.000000,0.000000,0,</Points>
</Properties>
</XuiFigure>
<XuiFigure>
<Properties>
<Id>figGlow_L</Id>
<Width>20.000000</Width>
<Height>516.000000</Height>
<Position>-20.000000,0.000000,0.000000</Position>
<Anchor>11</Anchor>
<Stroke>
<Properties>
<StrokeColor>0xff0f0f80</StrokeColor>
</Properties>
</Stroke>
<Fill>
<Properties>
<FillType>2</FillType>
<FillColor>0xffebebeb</FillColor>
<Gradient>
<Properties>
<NumStops>2</NumStops>
<StopColor index="0">0x64000000</StopColor>
<StopColor index="1">0x00000000</StopColor>
<StopPos index="0">0.000000</StopPos>
<StopPos index="1">1.000000</StopPos>
</Properties>
</Gradient>
<Rotation>180.000000</Rotation>
</Properties>
</Fill>
<Closed>true</Closed>
<Points>4,0.000000,0.000000,0.000000,0.000000,12.000000,0.000000,0,12.000000,0.000000,12.000000,0.000000,12.000000,12.000000,0,12.000000,12.000000,12.000000,12.000000,0.000000,12.000000,0,0.000000,12.000000,0.000000,12.000000,0.000000,0.000000,0,</Points>
</Properties>
</XuiFigure>
<XuiFigure>
<Properties>
<Id>figGlow_TL</Id>
<Width>40.000000</Width>
<Height>40.000000</Height>
<Position>-40.000000,-40.000000,0.000000</Position>
<Anchor>3</Anchor>
<Stroke>
<Properties>
<StrokeColor>0xff0f0f80</StrokeColor>
</Properties>
</Stroke>
<Fill>
<Properties>
<FillType>3</FillType>
<FillColor>0xffebebeb</FillColor>
<Gradient>
<Properties>
<Radial>true</Radial>
<NumStops>2</NumStops>
<StopColor index="0">0x64000000</StopColor>
<StopColor index="1">0x00000000</StopColor>
<StopPos index="0">0.000000</StopPos>
<StopPos index="1">1.000000</StopPos>
</Properties>
</Gradient>
<Translation>0.500000,0.500000,0.000000</Translation>
<Rotation>180.000000</Rotation>
</Properties>
</Fill>
<Closed>true</Closed>
<Points>4,0.000000,0.000000,0.000000,0.000000,12.000000,0.000000,0,12.000000,0.000000,12.000000,0.000000,12.000000,12.000000,0,12.000000,12.000000,12.000000,12.000000,0.000000,12.000000,0,0.000000,12.000000,0.000000,12.000000,0.000000,0.000000,0,</Points>
</Properties>
</XuiFigure>
<XuiFigure>
<Properties>
<Id>figGlow_T</Id>
<Width>1024.000000</Width>
<Height>20.000000</Height>
<Position>0.000000,-20.000000,0.000000</Position>
<Anchor>7</Anchor>
<Stroke>
<Properties>
<StrokeColor>0xff0f0f80</StrokeColor>
</Properties>
</Stroke>
<Fill>
<Properties>
<FillType>2</FillType>
<FillColor>0x00000000</FillColor>
<Gradient>
<Properties>
<NumStops>2</NumStops>
<StopColor index="0">0x64000000</StopColor>
<StopColor index="1">0x00000000</StopColor>
<StopPos index="0">0.000000</StopPos>
<StopPos index="1">1.000000</StopPos>
</Properties>
</Gradient>
<Rotation>90.000000</Rotation>
<TransformVersion>1</TransformVersion>
</Properties>
</Fill>
<Closed>true</Closed>
<Points>4,0.000000,0.000000,0.000000,0.000000,580.000000,0.000000,0,580.000000,0.000000,580.000000,0.000000,580.000000,41.000000,0,580.000000,41.000000,580.000000,41.000000,0.000000,41.000000,0,0.000000,41.000000,0.000000,41.000000,0.000000,0.000000,0,</Points>
</Properties>
</XuiFigure>
<XuiFigure>
<Properties>
<Id>figGlow_TR</Id>
<Width>40.000000</Width>
<Height>40.000000</Height>
<Position>1024.000000,-40.000000,0.000000</Position>
<Anchor>6</Anchor>
<Stroke>
<Properties>
<StrokeColor>0xff0f0f80</StrokeColor>
</Properties>
</Stroke>
<Fill>
<Properties>
<FillType>3</FillType>
<FillColor>0xffebebeb</FillColor>
<Gradient>
<Properties>
<Radial>true</Radial>
<NumStops>2</NumStops>
<StopColor index="0">0x64000000</StopColor>
<StopColor index="1">0x00000000</StopColor>
<StopPos index="0">0.000000</StopPos>
<StopPos index="1">1.000000</StopPos>
</Properties>
</Gradient>
<Translation>0.500000,0.500000,0.000000</Translation>
<Rotation>90.000000</Rotation>
</Properties>
</Fill>
<Closed>true</Closed>
<Points>4,0.000000,0.000000,0.000000,0.000000,12.000000,0.000000,0,12.000000,0.000000,12.000000,0.000000,12.000000,12.000000,0,12.000000,12.000000,12.000000,12.000000,0.000000,12.000000,0,0.000000,12.000000,0.000000,12.000000,0.000000,0.000000,0,</Points>
</Properties>
</XuiFigure>
<XuiFigure>
<Properties>
<Id>figGlow_BR</Id>
<Width>40.000000</Width>
<Height>40.000000</Height>
<Position>1024.000000,516.000000,0.000000</Position>
<Anchor>12</Anchor>
<Stroke>
<Properties>
<StrokeColor>0xff0f0f80</StrokeColor>
</Properties>
</Stroke>
<Fill>
<Properties>
<FillType>3</FillType>
<FillColor>0xffebebeb</FillColor>
<Gradient>
<Properties>
<Radial>true</Radial>
<NumStops>2</NumStops>
<StopColor index="0">0x64000000</StopColor>
<StopColor index="1">0x00000000</StopColor>
<StopPos index="0">0.000000</StopPos>
<StopPos index="1">1.000000</StopPos>
</Properties>
</Gradient>
<Translation>0.500000,0.500000,0.000000</Translation>
</Properties>
</Fill>
<Closed>true</Closed>
<Points>4,0.000000,0.000000,0.000000,0.000000,12.000000,0.000000,0,12.000000,0.000000,12.000000,0.000000,12.000000,12.000000,0,12.000000,12.000000,12.000000,12.000000,0.000000,12.000000,0,0.000000,12.000000,0.000000,12.000000,0.000000,0.000000,0,</Points>
</Properties>
</XuiFigure>
<XuiFigure>
<Properties>
<Id>figGlow_B</Id>
<Width>1024.000000</Width>
<Height>20.000000</Height>
<Position>0.000000,516.000000,0.000000</Position>
<Anchor>13</Anchor>
<Stroke>
<Properties>
<StrokeColor>0xff0f0f80</StrokeColor>
</Properties>
</Stroke>
<Fill>
<Properties>
<FillType>2</FillType>
<FillColor>0x00000000</FillColor>
<Gradient>
<Properties>
<NumStops>2</NumStops>
<StopColor index="0">0x64000000</StopColor>
<StopColor index="1">0x00000000</StopColor>
<StopPos index="0">0.000000</StopPos>
<StopPos index="1">1.000000</StopPos>
</Properties>
</Gradient>
<Rotation>270.000000</Rotation>
<TransformVersion>1</TransformVersion>
</Properties>
</Fill>
<Closed>true</Closed>
<Points>4,0.000000,0.000000,0.000000,0.000000,580.000000,0.000000,0,580.000000,0.000000,580.000000,0.000000,580.000000,41.000000,0,580.000000,41.000000,580.000000,41.000000,0.000000,41.000000,0,0.000000,41.000000,0.000000,41.000000,0.000000,0.000000,0,</Points>
</Properties>
</XuiFigure>
<XuiFigure>
<Properties>
<Id>figGlow_R</Id>
<Width>20.000000</Width>
<Height>516.000000</Height>
<Position>1024.000000,0.000000,0.000000</Position>
<Anchor>14</Anchor>
<Stroke>
<Properties>
<StrokeColor>0xff0f0f80</StrokeColor>
</Properties>
</Stroke>
<Fill>
<Properties>
<FillType>2</FillType>
<FillColor>0xffebebeb</FillColor>
<Gradient>
<Properties>
<NumStops>2</NumStops>
<StopColor index="0">0x64000000</StopColor>
<StopColor index="1">0x00000000</StopColor>
<StopPos index="0">0.000000</StopPos>
<StopPos index="1">1.000000</StopPos>
</Properties>
</Gradient>
</Properties>
</Fill>
<Closed>true</Closed>
<Points>4,0.000000,0.000000,0.000000,0.000000,12.000000,0.000000,0,12.000000,0.000000,12.000000,0.000000,12.000000,12.000000,0,12.000000,12.000000,12.000000,12.000000,0.000000,12.000000,0,0.000000,12.000000,0.000000,12.000000,0.000000,0.000000,0,</Points>
</Properties>
</XuiFigure>
</XuiVisual>
<XuiVisual>
<Properties>
<Id>XuiScene_WhitePanel</Id>
<Width>525.000000</Width>
<Height>454.000031</Height>
</Properties>
<XuiControl>
<Properties>
<Id>PanelGlow</Id>
<Width>525.000000</Width>
<Height>454.000000</Height>
<Anchor>15</Anchor>
<Visual>XuiControl_PanelGlow</Visual>
</Properties>
</XuiControl>
<XuiFigure>
<Properties>
<Id>Panel</Id>
<Width>525.000000</Width>
<Height>454.000000</Height>
<Anchor>15</Anchor>
<Stroke>
<Properties>
<StrokeColor>0xff000000</StrokeColor>
</Properties>
</Stroke>
<Fill>
<Properties>
<FillColor>0xff968d96</FillColor>
<Gradient>
<Properties>
<NumStops>2</NumStops>
<StopColor index="0">0xffebebeb</StopColor>
<StopColor index="1">0xff0f0f0f</StopColor>
<StopPos index="0">0.000000</StopPos>
<StopPos index="1">1.000000</StopPos>
</Properties>
</Gradient>
<TransformVersion>1</TransformVersion>
</Properties>
</Fill>
<Closed>true</Closed>
<Points>4,0.000000,0.000000,0.000000,0.000000,177.000000,0.000000,0,177.000000,0.000000,177.000000,0.000000,177.000000,132.000000,0,177.000000,132.000000,177.000000,132.000000,0.000000,132.000000,0,0.000000,132.000000,0.000000,132.000000,0.000000,0.000000,0,</Points>
</Properties>
</XuiFigure>
<XuiFigure>
<Properties>
<Id>Border</Id>
<Width>525.000000</Width>
<Height>454.000000</Height>
<Anchor>15</Anchor>
<Stroke>
<Properties>
<StrokeWidth>1.000000</StrokeWidth>
<StrokeColor>0xff444444</StrokeColor>
</Properties>
</Stroke>
<Fill>
<Properties>
<FillType>0</FillType>
<FillColor>0xffffffff</FillColor>
<Gradient>
<Properties>
<NumStops>1</NumStops>
<StopColor index="0">0x00000000</StopColor>
<StopPos index="0">0.000000</StopPos>
</Properties>
</Gradient>
<TransformVersion>1</TransformVersion>
</Properties>
</Fill>
<Closed>true</Closed>
<Points>4,0.000000,0.000000,0.000000,0.000000,736.000000,0.000000,0,736.000000,0.000000,736.000000,0.000000,736.000000,405.000000,0,736.000000,405.000000,736.000000,405.000000,0.000000,405.000000,0,0.000000,405.000000,0.000000,405.000000,0.000000,0.000000,0,</Points>
</Properties>
</XuiFigure>
</XuiVisual>
</XuiCanvas>

View File

@ -11,6 +11,24 @@
<Position>57.279999,51.040001,0.000000</Position>
<ClassOverride>RetroArchMain</ClassOverride>
</Properties>
<XuiImage>
<Properties>
<Id>XuiBackground</Id>
<Width>640.007507</Width>
<Height>479.917419</Height>
<Position>-57.347713,-50.961960,0.000000</Position>
<SizeMode>4</SizeMode>
<ImagePath>../background.png</ImagePath>
</Properties>
</XuiImage>
<XuiControl>
<Properties>
<Id>Panel</Id>
<Width>499.135925</Width>
<Height>354.303986</Height>
<Visual>XuiScene_WhitePanel</Visual>
</Properties>
</XuiControl>
<XuiText>
<Properties>
<Id>XuiTxtTitle</Id>
@ -294,6 +312,18 @@
<Visual>XuiButton_two_col</Visual>
</Properties>
</XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
</XuiCommonList>
<XuiText>
<Properties>

View File

@ -28,7 +28,6 @@
#include "../../gfx/gfx_context.h"
#include "../../settings_data.h"
#include "../../message_queue.h"
#include "../../general.h"
#include "../../gfx/d3d/d3d.h"
@ -49,10 +48,10 @@
HXUIOBJ m_menulist;
HXUIOBJ m_menutitle;
HXUIOBJ m_menutitlebottom;
HXUIOBJ m_background;
HXUIOBJ m_back;
HXUIOBJ root_menu;
HXUIOBJ current_menu;
HXUIFONT m_menufont;
static msg_queue_t *xui_msg_queue;
class CRetroArch : public CXuiModule
@ -146,7 +145,7 @@ HRESULT CRetroArchMain::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
GetChildById(L"XuiMenuList", &m_menulist);
GetChildById(L"XuiTxtTitle", &m_menutitle);
GetChildById(L"XuiTxtBottom", &m_menutitlebottom);
XuiCreateFont(L"Arial Unicode MS", 14, XUI_FONT_STYLE_NORMAL, 0, &m_menufont);
GetChildById(L"XuiBackground", &m_background);
if (XuiHandleIsValid(m_menutitlebottom))
{
@ -159,6 +158,106 @@ HRESULT CRetroArchMain::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
return 0;
}
HRESULT XuiTextureLoader(IXuiDevice *pDevice, LPCWSTR szFileName, XUIImageInfo *pImageInfo, IDirect3DTexture9 **ppTex)
{
CONST BYTE *pbTextureData = 0;
UINT cbTextureData = 0;
HXUIRESOURCE hResource = 0;
BOOL bIsMemoryResource = FALSE;
HRESULT hr;
hr = XuiResourceOpenNoLoc(szFileName, &hResource, &bIsMemoryResource);
if (FAILED(hr))
return hr;
if (bIsMemoryResource)
{
hr = XuiResourceGetBuffer(hResource, &pbTextureData);
if (FAILED(hr))
goto cleanup;
cbTextureData = XuiResourceGetTotalSize(hResource);
}
else
{
hr = XuiResourceRead(hResource, NULL, 0, &cbTextureData);
if (FAILED(hr))
goto cleanup;
pbTextureData = (BYTE *)XuiAlloc(cbTextureData);
if (pbTextureData == 0)
{
hr = E_OUTOFMEMORY;
goto cleanup;
}
hr = XuiResourceRead(hResource, (BYTE*)pbTextureData, cbTextureData, &cbTextureData);
if (FAILED(hr))
goto cleanup;
XuiResourceClose(hResource);
hResource = 0;
}
//Format specific code to initialize pImageInfo and create our texture
D3DXIMAGE_INFO pSrc;
// Cast our d3d device into our IDirect3DDevice9* interface
IDirect3DDevice9 * d3dDevice = (IDirect3DDevice9*)pDevice->GetD3DDevice();
if( d3dDevice == NULL )
goto cleanup;
// Create our texture based on our conditions
hr = D3DXCreateTextureFromFileInMemoryEx(
d3dDevice,
pbTextureData,
cbTextureData,
D3DX_DEFAULT_NONPOW2,
D3DX_DEFAULT_NONPOW2,
1,
D3DUSAGE_CPU_CACHED_MEMORY,
D3DFMT_LIN_A8R8G8B8,
D3DPOOL_DEFAULT,
D3DX_FILTER_NONE,
D3DX_FILTER_NONE,
0,
&pSrc,
NULL,
ppTex
);
if(hr != D3DXERR_INVALIDDATA )
{
pImageInfo->Depth = pSrc.Depth;
pImageInfo->Format = pSrc.Format;
pImageInfo->Height = pSrc.Height;
pImageInfo->ImageFileFormat = pSrc.ImageFileFormat;
pImageInfo->MipLevels = pSrc.MipLevels;
pImageInfo->ResourceType = pSrc.ResourceType;
pImageInfo->Width = pSrc.Width;
}
else
RARCH_ERR("D3DXERR_INVALIDDATA Encountered\n");
cleanup:
if (bIsMemoryResource && hResource != 0)
{
XuiResourceReleaseBuffer(hResource, pbTextureData);
}
else
{
XuiFree((LPVOID)pbTextureData);
}
if (hResource != 0)
{
XuiResourceClose(hResource);
}
return hr;
}
static void* rmenu_xui_init(void)
{
HRESULT hr;
@ -185,8 +284,8 @@ static void* rmenu_xui_init(void)
video_info.rgb32 = false;
d3d_make_d3dpp(d3d, &video_info, &d3dpp);
hr = app.InitShared(d3d->dev, &d3dpp, XuiPNGTextureLoader);
hr = app.InitShared(d3d->dev, &d3dpp, (PFN_XUITEXTURELOADER)XuiTextureLoader);
if (FAILED(hr))
{
@ -350,6 +449,10 @@ static void blit_line(int x, int y, const char *message, bool green)
static void rmenu_xui_render_background(void)
{
if (g_extern.content_is_init)
XuiElementSetShow(m_background, FALSE);
else
XuiElementSetShow(m_background, TRUE);
}
static void rmenu_xui_render_messagebox(const char *message)
@ -363,7 +466,7 @@ static void rmenu_xui_set_list_text(int index, const wchar_t* leftText, const wc
HXUIOBJ hVisual = NULL, hControl = NULL, hTextLeft = NULL, hTextRight = NULL, hRightEdge = NULL;
LPCWSTR currText;
float width, height;
XUIRect* pRect;
XUIRect pRect;
D3DXVECTOR3 textPos, rightEdgePos;
hControl = XuiListGetItemControl(m_menulist, index);
@ -378,9 +481,8 @@ static void rmenu_xui_set_list_text(int index, const wchar_t* leftText, const wc
XuiElementGetBounds(hTextLeft, &width, &height);
if (!currText || wcscmp(currText, leftText) || width <= 5)
{
pRect = new XUIRect();
XuiMeasureText(m_menufont, leftText, -1, XUI_FONT_STYLE_NO_WORDWRAP, 0, pRect);
XuiElementSetBounds(hTextLeft, pRect->GetWidth(), height);
XuiTextElementMeasureText(hTextLeft, leftText, &pRect);
XuiElementSetBounds(hTextLeft, pRect.GetWidth(), height);
}
XuiTextElementSetText(hTextLeft, leftText);
XuiElementGetChildById(hVisual, L"RightText", &hTextRight);
@ -390,15 +492,14 @@ static void rmenu_xui_set_list_text(int index, const wchar_t* leftText, const wc
XuiElementGetBounds(hTextRight, &width, &height);
if (!currText || wcscmp(currText, rightText) || width <= 5)
{
pRect = new XUIRect();
XuiMeasureText(m_menufont, rightText, -1, XUI_FONT_STYLE_NO_WORDWRAP, 0, pRect);
XuiElementSetBounds(hTextRight, pRect->GetWidth(), height);
XuiTextElementMeasureText(hTextRight, rightText, &pRect);
XuiElementSetBounds(hTextRight, pRect.GetWidth(), height);
XuiElementGetPosition(hTextLeft, &textPos);
XuiElementGetChildById(hVisual, L"graphic_CapRight", &hRightEdge);
XuiElementGetPosition(hRightEdge, &rightEdgePos);
textPos.x = rightEdgePos.x - (pRect->GetWidth() + textPos.x);
textPos.x = rightEdgePos.x - (pRect.GetWidth() + textPos.x);
XuiElementSetPosition(hTextRight, &textPos);
}
XuiTextElementSetText(hTextRight, rightText);
@ -532,7 +633,9 @@ static void rmenu_xui_list_delete(void *data, size_t idx,
{
(void)data;
(void)idx;
XuiListDeleteItems(m_menulist, 0, list_size);
int x = XuiListGetItemCount( m_menulist );
if( list_size > x ) list_size = x;
if( list_size > 0 ) XuiListDeleteItems(m_menulist, 0, list_size);
}
static void rmenu_xui_list_clear(void *data)

View File

@ -120,7 +120,7 @@
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<AdditionalDependencies>xapilibd.lib;d3d9d.lib;d3dx9d.lib;xgraphicsd.lib;xboxkrnl.lib;xnetd.lib;xaudiod2.lib;xactd3.lib;x3daudiod.lib;xmcored.lib;xbdm.lib;vcompd.lib;xuirun.lib;xuirender.lib;$(TargetDir)libretro_xdk360.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>xapilibd.lib;d3d9d.lib;d3dx9d.lib;xgraphicsd.lib;xboxkrnl.lib;xnetd.lib;xaudiod2.lib;xactd3.lib;x3daudiod.lib;xmcored.lib;xbdm.lib;vcompd.lib;xuirund.lib;xuirenderd.lib;$(TargetDir)libretro_xdk360.lib;%(AdditionalDependencies)</AdditionalDependencies>
<StackCommitSize>524288</StackCommitSize>
</Link>
<Deploy>
@ -434,7 +434,12 @@
<Command Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_main.xui" "$(OutDir)media\hd\rarch_main.xur"</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\media\360\background.png">
<FileType>Document</FileType>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -36,5 +36,8 @@
<CustomBuild Include="..\..\media\360\rarch_scene_skin.xui">
<Filter>Source Files\media</Filter>
</CustomBuild>
<CustomBuild Include="..\..\media\360\background.png">
<Filter>Source Files\media</Filter>
</CustomBuild>
</ItemGroup>
</Project>