Beispiel #1
0
 protected void ButtonTextBaseSetting(EzGui_Button_Outline _Button, SpriteRoot.ANCHOR_METHOD _Anchor, string _Text, EZValueChangedDelegate _Del)
 {
     _Button.SetAnchor(_Anchor);
     _Button.SetAnchor(SpriteText.Anchor_Pos.Middle_Center);
     _Button.SetTextureSize(80.0f, 40.0f);
     _Button.SetFontPos(-40.0f, 20.0f);
     _Button.SetText(_Text);
     _Button.SetValueChangedDelegate(_Del);
 }
Beispiel #2
0
    protected override void SetResources()
    {
        m_txtSetTurnSpeed.SetAnchor(SpriteText.Anchor_Pos.Lower_Left);
        m_txtSetTurnType.SetAnchor(SpriteText.Anchor_Pos.Lower_Left);

        m_txtSetMapX.SetAnchor(SpriteText.Anchor_Pos.Lower_Left);
        m_txtSetMapY.SetAnchor(SpriteText.Anchor_Pos.Lower_Left);

#if             UNITY_EDITOR
        TextFieldBaseSetting(m_fieldSetTurnSpeed, 4, Color.white);
        TextFieldBaseSetting(m_fieldSetTurnType, 1, Color.white);

        TextFieldBaseSetting(m_fieldSetMapX, 2, Color.white);
        TextFieldBaseSetting(m_fieldSetMapY, 2, Color.white);
#elif   UNITY_IPHONE || UNITY_ANDROID
        TextFieldBaseSetting(m_fieldSetTurnSpeed, TouchScreenKeyboardType.NumberPad, 4, Color.white);
        TextFieldBaseSetting(m_fieldSetTurnType, TouchScreenKeyboardType.NumberPad, 1, Color.white);

        TextFieldBaseSetting(m_fieldSetMapX, TouchScreenKeyboardType.NumberPad, 2, Color.white);
        TextFieldBaseSetting(m_fieldSetMapY, TouchScreenKeyboardType.NumberPad, 2, Color.white);
#else
        TextFieldBaseSetting(m_fieldSetTurnSpeed, 4, Color.white);
        TextFieldBaseSetting(m_fieldSetTurnType, 1, Color.white);

        TextFieldBaseSetting(m_fieldSetMapX, 2, Color.white);
        TextFieldBaseSetting(m_fieldSetMapY, 2, Color.white);
#endif

        ButtonTextBaseSetting(m_btnNowTurnType, SpriteRoot.ANCHOR_METHOD.BOTTOM_RIGHT, "", null);
        ButtonTextBaseSetting(m_btnNowTurnSpeed, SpriteRoot.ANCHOR_METHOD.BOTTOM_RIGHT, "", null);
        ButtonTextBaseSetting(m_btnNowMapSize, SpriteRoot.ANCHOR_METHOD.BOTTOM_RIGHT, "", null);

        m_btnNowTurnType.SetTextureSizeX(120.0f);
        m_btnNowTurnType.SetFontPos(-60.0f, 20.0f);

        ButtonTextBaseSetting(m_btnSetApply, SpriteRoot.ANCHOR_METHOD.BOTTOM_RIGHT, GameString.strApply, SetApplyProcess);
        ButtonTextBaseSetting(m_btnSetNewGame, SpriteRoot.ANCHOR_METHOD.BOTTOM_RIGHT, GameString.strNewGame, SetNewGameProcess);

        m_btnNowTurnType.SetBasePos((int)HUD_BASE_POS._TOP_LEFT);
        m_btnNowTurnSpeed.SetBasePos((int)HUD_BASE_POS._TOP_LEFT);
        m_btnNowMapSize.SetBasePos((int)HUD_BASE_POS._TOP_LEFT);
        m_btnNowTurnType.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
        m_btnNowTurnSpeed.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
        m_btnNowMapSize.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
        m_btnNowTurnType.SetFontPos(60.0f, -20.0f);
        m_btnNowTurnSpeed.SetFontPos(40.0f, -20.0f);
        m_btnNowMapSize.SetFontPos(40.0f, -20.0f);

        m_txtSetTurnSpeed.SetBasePos((int)HUD_BASE_POS._BOTTOM_LEFT);
        m_txtSetTurnType.SetBasePos((int)HUD_BASE_POS._BOTTOM_LEFT);

        m_txtSetMapX.SetBasePos((int)HUD_BASE_POS._BOTTOM_LEFT);
        m_txtSetMapY.SetBasePos((int)HUD_BASE_POS._BOTTOM_LEFT);

        m_fieldSetTurnSpeed.SetBasePos((int)HUD_BASE_POS._BOTTOM_LEFT);
        m_fieldSetTurnType.SetBasePos((int)HUD_BASE_POS._BOTTOM_LEFT);

        m_fieldSetMapX.SetBasePos((int)HUD_BASE_POS._BOTTOM_LEFT);
        m_fieldSetMapY.SetBasePos((int)HUD_BASE_POS._BOTTOM_LEFT);
    }