Browse Source

Fixed page buttons' hitboxes

pull/11/head
Anairkoen Schno 5 years ago
parent
commit
346dc5b0cb
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      BSIPA-ModList/UI/ViewControllers/MarkdownView.cs

+ 10
- 2
BSIPA-ModList/UI/ViewControllers/MarkdownView.cs View File

@ -131,7 +131,11 @@ namespace BSIPA_ModList.UI.ViewControllers
pup_rt.anchoredPosition = new Vector2(pup_xoff, pup_rt.anchoredPosition.y);
var pup_bg_rt = pup_rt.Find("BG") as RectTransform;
pup_bg_rt.sizeDelta = new Vector2(pup_bg_rt.sizeDelta.y, pup_bg_rt.sizeDelta.y);
//Destroy(pageUp.GetComponent<Touchable>()); // destroy Touchable component to fix hitboxes
// fix hitbox
pup_rt.anchorMin = new Vector2(.5f, pup_rt.anchorMin.y);
pup_rt.anchorMax = new Vector2(.5f, pup_rt.anchorMax.y);
pup_rt.sizeDelta = new Vector2(pup_rt.sizeDelta.y, pup_rt.sizeDelta.y);
}
{
var pdn_rt = pageDown.transform as RectTransform;
@ -140,7 +144,11 @@ namespace BSIPA_ModList.UI.ViewControllers
pdn_rt.anchoredPosition = new Vector2(pdn_xoff, pdn_rt.anchoredPosition.y);
var pdn_bg_rt = pdn_rt.Find("BG") as RectTransform;
pdn_bg_rt.sizeDelta = new Vector2(pdn_bg_rt.sizeDelta.y, pdn_bg_rt.sizeDelta.y);
//Destroy(pageDown.GetComponent<Touchable>()); // destroy Touchable component to fix hitboxes
// fix hitbox
pdn_rt.anchorMin = new Vector2(.5f, pdn_rt.anchorMin.y);
pdn_rt.anchorMax = new Vector2(.5f, pdn_rt.anchorMax.y);
pdn_rt.sizeDelta = new Vector2(pdn_rt.sizeDelta.y, pdn_rt.sizeDelta.y);
}
scrView = gameObject.AddComponent<ScrollView>();


Loading…
Cancel
Save