游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1537|回复: 1

关于OgreLayout 中的坐标问题

[复制链接]

16

主题

36

帖子

36

积分

注册会员

Rank: 2

积分
36
发表于 2007-5-23 16:42:00 | 显示全部楼层 |阅读模式

  <GUILayout>中
        <Window Type="TaharezLook/TabControl" Name="OgreGuiDemo/TabCtrl">
            &ltroperty Name="UnifiedPosition" Value="{{0.0,0},{0.0,0}}" />
            <Property Name="UnifiedSize" Value="{{1,0},{ 0.75,0}}" />

           的 Value="{{0.0,0},{0.0,0}}和 Value="{{1,0},{ 0.75,0}}怎么理解阿,代表坐标吗,还是代表其他什么?长度、宽度?

高手指点下了,谢谢
               

193

主题

870

帖子

903

积分

高级会员

Rank: 4

积分
903
QQ
发表于 2007-5-26 15:26:00 | 显示全部楼层

Re:关于OgreLayout 中的坐标问题

CEGUI坐标不是简单的一个值而是一个UDim类,

  1. /*!
  2.     \brief
  3.         Class representing a unified dimension; that is a dimension that has both
  4.         a relative 'scale' portion and and absolute 'offset' portion.
  5.     */
  6.     class CEGUIEXPORT UDim
  7.     {
  8.     public:
  9.         UDim() {}
  10.         UDim(float scale, float offset) : d_scale(scale), d_offset(offset) {}

复制代码

每个坐标包括相对的scale值和绝对的offset两个值
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-26 08:06

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表